@keep-network/tbtc-v2 0.1.1-dev.5 → 0.1.1-dev.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,7 +83,16 @@
83
83
  "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract TestERC721 is ERC721 {\n string public constant NAME = \"Test ERC721 Token\";\n string public constant SYMBOL = \"TT\";\n\n constructor() ERC721(NAME, SYMBOL) {}\n\n function mint(address to, uint256 tokenId) public {\n _mint(to, tokenId);\n }\n}\n"
84
84
  },
85
85
  "contracts/bridge/Bridge.sol": {
86
- "content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity 0.8.4;\n\n/// @title BTC Bridge\n/// @notice Bridge manages BTC deposit and redemption and is increasing and\n/// decreasing balances in the Bank as a result of BTC deposit and\n/// redemption operations.\n///\n/// Depositors send BTC funds to the most-recently-created-wallet of the\n/// bridge using pay-to-script-hash (P2SH) which contains hashed\n/// information about the depositor’s minting Ethereum address. Then,\n/// the depositor reveals their desired Ethereum minting address to the\n/// Ethereum chain. The Bridge listens for these sorts of messages and\n/// when it gets one, it checks the Bitcoin network to make sure the\n/// funds line up. If they do, the off-chain wallet may decide to pick\n/// this transaction for sweeping, and when the sweep operation is\n/// confirmed on the Bitcoin network, the wallet informs the Bridge\n/// about the sweep increasing appropriate balances in the Bank.\n/// @dev Bridge is an upgradeable component of the Bank.\ncontract Bridge {\n struct DepositInfo {\n uint64 amount;\n address vault;\n uint32 revealedAt;\n }\n\n /// @notice Collection of all unswept deposits indexed by\n /// keccak256(fundingTxHash | fundingOutputIndex | depositorAddress).\n /// This mapping may contain valid and invalid deposits and the\n /// wallet is responsible for validating them before attempting to\n /// execute a sweep.\n mapping(uint256 => DepositInfo) public unswept;\n\n event DepositRevealed(\n uint256 depositId,\n bytes32 fundingTxHash,\n uint8 fundingOutputIndex,\n address depositor,\n uint64 blindingFactor,\n bytes refundPubKey,\n uint64 amount,\n address vault\n );\n\n /// @notice Used by the depositor to reveal information about their P2SH\n /// Bitcoin deposit to the Bridge on Ethereum chain. The off-chain\n /// wallet listens for revealed deposit events and may decide to\n /// include the revealed deposit in the next executed sweep.\n /// Information about the Bitcoin deposit can be revealed before or\n /// after the Bitcoin transaction with P2SH deposit is mined on the\n /// Bitcoin chain.\n /// @param fundingTxHash The BTC transaction hash containing BTC P2SH\n /// deposit funding transaction\n /// @param fundingOutputIndex The index of the transaction output in the\n /// funding TX with P2SH deposit, max 256\n /// @param blindingFactor The blinding factor used in the BTC P2SH deposit,\n /// max 2^64\n /// @param refundPubKey The refund pub key used in the BTC P2SH deposit\n /// @param amount The amount locked in the BTC P2SH deposit\n /// @param vault Bank vault to which the swept deposit should be routed\n /// @dev Requirements:\n /// - `msg.sender` must be the Ethereum address used in the P2SH BTC deposit,\n /// - `blindingFactor` must be the blinding factor used in the P2SH BTC deposit,\n /// - `refundPubKey` must be the refund pub key used in the P2SH BTC deposit,\n /// - `amount` must be the same as locked in the P2SH BTC deposit,\n /// - BTC deposit for the given `fundingTxHash`, `fundingOutputIndex`\n /// can be revealed by `msg.sender` only one time.\n ///\n /// If any of these requirements is not met, the wallet _must_ refuse\n /// to sweep the deposit and the depositor has to wait until the\n /// deposit script unlocks to receive their BTC back.\n function revealDeposit(\n bytes32 fundingTxHash,\n uint8 fundingOutputIndex,\n uint64 blindingFactor,\n bytes calldata refundPubKey,\n uint64 amount,\n address vault\n ) external {\n uint256 depositId =\n uint256(\n keccak256(\n abi.encode(fundingTxHash, fundingOutputIndex, msg.sender)\n )\n );\n\n DepositInfo storage deposit = unswept[depositId];\n require(deposit.revealedAt == 0, \"Deposit already revealed\");\n\n deposit.amount = amount;\n deposit.vault = vault;\n /* solhint-disable-next-line not-rely-on-time */\n deposit.revealedAt = uint32(block.timestamp);\n\n emit DepositRevealed(\n depositId,\n fundingTxHash,\n fundingOutputIndex,\n msg.sender,\n blindingFactor,\n refundPubKey,\n amount,\n vault\n );\n }\n\n /// @notice Used by the wallet to prove the BTC deposit sweep transaction\n /// and to update Bank balances accordingly. Sweep is only accepted\n /// if it satisfies SPV proof.\n ///\n /// The function is performing Bank balance updates by first\n /// computing the Bitcoin fee for the sweep transaction. The fee is\n /// divided evenly between all swept deposits. Each depositor\n /// receives a balance in the bank equal to the amount they have\n /// declared during the reveal transaction, minus their fee share.\n ///\n /// It is possible to prove the given sweep only one time.\n /// @param txVersion Transaction version number (4-byte LE)\n /// @param txInputVector All transaction inputs prepended by the number of\n /// inputs encoded as a VarInt, max 0xFC(252) inputs\n /// @param txOutput Single sweep transaction output\n /// @param txLocktime Final 4 bytes of the transaction\n /// @param merkleProof The merkle proof of transaction inclusion in a block\n /// @param txIndexInBlock Transaction index in the block (0-indexed)\n /// @param bitcoinHeaders Single bytestring of 80-byte bitcoin headers,\n /// lowest height first\n function sweep(\n bytes4 txVersion,\n bytes memory txInputVector,\n bytes memory txOutput,\n bytes4 txLocktime,\n bytes memory merkleProof,\n uint256 txIndexInBlock,\n bytes memory bitcoinHeaders\n ) external {\n // TODO We need to read `fundingTxHash`, `fundingOutputIndex` and\n // P2SH script depositor address from `txInputVector`.\n // We then hash them to obtain deposit identifier and read\n // DepositInfo. From DepositInfo we know what amount was declared\n // by the depositor in their reveal transaction and we use that\n // amount to update their Bank balance, minus fee.\n //\n // TODO We need to validate if the sum in the output minus the\n // amount from the previous wallet balance input minus fees is\n // equal to the amount by which Bank balances were increased.\n //\n // TODO We need to validate txOutput to see if the balance was not\n // transferred away from the wallet before increasing balances in\n // the bank.\n //\n // TODO Delete deposit from unswept mapping or mark it as swept\n // depending on the gas costs. Alternativly, do not allow to\n // use the same TX input vector twice. Sweep should be provable\n // only one time.\n }\n\n // TODO It is possible a malicious wallet can sweep deposits that can not\n // be later proved on Ethereum. For example, a deposit with\n // an incorrect amount revealed. We need to provide a function for honest\n // depositors, next to sweep, to prove their swept balances on Ethereum\n // selectively, based on deposits they have earlier received.\n}\n"
86
+ "content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity 0.8.4;\n\nimport {BTCUtils} from \"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\";\nimport {BytesLib} from \"@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol\";\n\n/// @title BTC Bridge\n/// @notice Bridge manages BTC deposit and redemption and is increasing and\n/// decreasing balances in the Bank as a result of BTC deposit and\n/// redemption operations.\n///\n/// Depositors send BTC funds to the most-recently-created-wallet of the\n/// bridge using pay-to-script-hash (P2SH) or\n/// pay-to-witness-script-hash (P2WSH) which contains hashed\n/// information about the depositor’s minting Ethereum address. Then,\n/// the depositor reveals their desired Ethereum minting address to the\n/// Ethereum chain. The Bridge listens for these sorts of messages and\n/// when it gets one, it checks the Bitcoin network to make sure the\n/// funds line up. If they do, the off-chain wallet may decide to pick\n/// this transaction for sweeping, and when the sweep operation is\n/// confirmed on the Bitcoin network, the wallet informs the Bridge\n/// about the sweep increasing appropriate balances in the Bank.\n/// @dev Bridge is an upgradeable component of the Bank.\ncontract Bridge {\n using BTCUtils for bytes;\n using BytesLib for bytes;\n\n /// @notice Represents Bitcoin transaction data as described in:\n /// https://developer.bitcoin.org/reference/transactions.html#raw-transaction-format\n struct TxInfo {\n // Transaction version number (4-byte LE).\n bytes4 version;\n // All transaction inputs prepended by the number of inputs encoded\n // as a compactSize uint. Single vector item looks as follows:\n // https://developer.bitcoin.org/reference/transactions.html#txin-a-transaction-input-non-coinbase\n // though SegWit inputs don't contain the signature script (scriptSig).\n // All encoded input transaction hashes are little-endian.\n bytes inputVector;\n // All transaction outputs prepended by the number of outputs encoded\n // as a compactSize uint. Single vector item looks as follows:\n // https://developer.bitcoin.org/reference/transactions.html#txout-a-transaction-output\n bytes outputVector;\n // Transaction locktime (4-byte LE).\n bytes4 locktime;\n }\n\n /// @notice Represents data which must be revealed by the depositor during\n /// deposit reveal.\n struct RevealInfo {\n // Index of the funding output belonging to the funding transaction.\n uint8 fundingOutputIndex;\n // Ethereum depositor address.\n address depositor;\n // The blinding factor as 8 bytes. Byte endianness doesn't matter\n // as this factor is not interpreted as uint.\n bytes8 blindingFactor;\n // The compressed Bitcoin public key (33 bytes and 02 or 03 prefix)\n // of the deposit's wallet hashed in the HASH160 Bitcoin opcode style.\n bytes20 walletPubKeyHash;\n // The compressed Bitcoin public key (33 bytes and 02 or 03 prefix)\n // that can be used to make the deposit refund after the refund\n // locktime passes. Hashed in the HASH160 Bitcoin opcode style.\n bytes20 refundPubKeyHash;\n // The refund locktime (4-byte LE). Interpreted according to locktime\n // parsing rules described in:\n // https://developer.bitcoin.org/devguide/transactions.html#locktime-and-sequence-number\n // and used with OP_CHECKLOCKTIMEVERIFY opcode as described in:\n // https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki\n bytes4 refundLocktime;\n // Address of the tBTC vault.\n address vault;\n }\n\n /// @notice Represents tBTC deposit data.\n struct DepositInfo {\n // Ethereum depositor address.\n address depositor;\n // Deposit amount in satoshi (8-byte LE). For example:\n // 0.0001 BTC = 10000 satoshi = 0x1027000000000000\n bytes8 amount;\n // UNIX timestamp the deposit was revealed at.\n uint32 revealedAt;\n // Address of the tBTC vault.\n address vault;\n }\n\n /// @notice Collection of all unswept deposits indexed by\n /// keccak256(fundingTxHash | fundingOutputIndex).\n /// The fundingTxHash is LE bytes32 and fundingOutputIndex an uint8.\n /// This mapping may contain valid and invalid deposits and the\n /// wallet is responsible for validating them before attempting to\n /// execute a sweep.\n ///\n /// TODO: Explore the possibility of storing just a hash of DepositInfo.\n mapping(uint256 => DepositInfo) public unswept;\n\n event DepositRevealed(\n bytes32 fundingTxHash,\n uint8 fundingOutputIndex,\n address depositor,\n bytes8 blindingFactor,\n bytes20 walletPubKeyHash,\n bytes20 refundPubKeyHash,\n bytes4 refundLocktime\n );\n\n /// @notice Used by the depositor to reveal information about their P2(W)SH\n /// Bitcoin deposit to the Bridge on Ethereum chain. The off-chain\n /// wallet listens for revealed deposit events and may decide to\n /// include the revealed deposit in the next executed sweep.\n /// Information about the Bitcoin deposit can be revealed before or\n /// after the Bitcoin transaction with P2(W)SH deposit is mined on\n /// the Bitcoin chain. Worth noting the gas cost of this function\n /// scales with the number of P2(W)SH transaction inputs and\n /// outputs.\n /// @param fundingTx Bitcoin funding transaction data.\n /// @param reveal Deposit reveal data.\n /// @dev Requirements:\n /// - `reveal.fundingOutputIndex` must point to the actual P2(W)SH\n /// output of the BTC deposit transaction\n /// - `reveal.depositor` must be the Ethereum address used in the\n /// P2(W)SH BTC deposit transaction,\n /// - `reveal.blindingFactor` must be the blinding factor used in the\n /// P2(W)SH BTC deposit transaction,\n /// - `reveal.walletPubKeyHash` must be the wallet pub key hash used in\n /// the P2(W)SH BTC deposit transaction,\n /// - `reveal.refundPubKeyHash` must be the refund pub key hash used in\n /// the P2(W)SH BTC deposit transaction,\n /// - `reveal.refundLocktime` must be the refund locktime used in the\n /// P2(W)SH BTC deposit transaction,\n /// - BTC deposit for the given `fundingTxHash`, `fundingOutputIndex`\n /// can be revealed only one time.\n ///\n /// If any of these requirements is not met, the wallet _must_ refuse\n /// to sweep the deposit and the depositor has to wait until the\n /// deposit script unlocks to receive their BTC back.\n function revealDeposit(\n TxInfo calldata fundingTx,\n RevealInfo calldata reveal\n ) external {\n bytes memory expectedScript =\n abi.encodePacked(\n hex\"14\", // Byte length of depositor Ethereum address.\n reveal.depositor,\n hex\"75\", // OP_DROP\n hex\"08\", // Byte length of blinding factor value.\n reveal.blindingFactor,\n hex\"75\", // OP_DROP\n hex\"76\", // OP_DUP\n hex\"a9\", // OP_HASH160\n hex\"14\", // Byte length of a compressed Bitcoin public key hash.\n reveal.walletPubKeyHash,\n hex\"87\", // OP_EQUAL\n hex\"63\", // OP_IF\n hex\"ac\", // OP_CHECKSIG\n hex\"67\", // OP_ELSE\n hex\"76\", // OP_DUP\n hex\"a9\", // OP_HASH160\n hex\"14\", // Byte length of a compressed Bitcoin public key hash.\n reveal.refundPubKeyHash,\n hex\"88\", // OP_EQUALVERIFY\n hex\"04\", // Byte length of refund locktime value.\n reveal.refundLocktime,\n hex\"b1\", // OP_CHECKLOCKTIMEVERIFY\n hex\"75\", // OP_DROP\n hex\"ac\", // OP_CHECKSIG\n hex\"68\" // OP_ENDIF\n );\n\n bytes memory fundingOutput =\n fundingTx.outputVector.extractOutputAtIndex(\n reveal.fundingOutputIndex\n );\n bytes memory fundingOutputHash = fundingOutput.extractHash();\n\n if (fundingOutputHash.length == 20) {\n // A 20-byte output hash is used by P2SH. That hash is constructed\n // by applying OP_HASH160 on the locking script. A 20-byte output\n // hash is used as well by P2PKH and P2WPKH (OP_HASH160 on the\n // public key). However, since we compare the actual output hash\n // with an expected locking script hash, this check will succeed only\n // for P2SH transaction type with expected script hash value. For\n // P2PKH and P2WPKH, it will fail on the output hash comparison with\n // the expected locking script hash.\n require(\n keccak256(fundingOutputHash) ==\n keccak256(expectedScript.hash160()),\n \"Wrong 20-byte script hash\"\n );\n } else if (fundingOutputHash.length == 32) {\n // A 32-byte output hash is used by P2WSH. That hash is constructed\n // by applying OP_HASH256 on the locking script.\n require(\n fundingOutputHash.toBytes32() == expectedScript.hash256(),\n \"Wrong 32-byte script hash\"\n );\n } else {\n revert(\"Wrong script hash length\");\n }\n\n // Resulting TX hash is in native Bitcoin little-endian format.\n bytes32 fundingTxHash =\n abi\n .encodePacked(\n fundingTx\n .version,\n fundingTx\n .inputVector,\n fundingTx\n .outputVector,\n fundingTx\n .locktime\n )\n .hash256();\n\n DepositInfo storage deposit =\n unswept[\n uint256(\n keccak256(\n abi.encodePacked(\n fundingTxHash,\n reveal.fundingOutputIndex\n )\n )\n )\n ];\n require(deposit.revealedAt == 0, \"Deposit already revealed\");\n\n bytes8 fundingOutputAmount;\n /* solhint-disable-next-line no-inline-assembly */\n assembly {\n // First 8 bytes (little-endian) of the funding output represents\n // its value. To take the value, we need to jump over the first\n // word determining the array length, load the array, and trim it\n // by putting it to a bytes8.\n fundingOutputAmount := mload(add(fundingOutput, 32))\n }\n\n deposit.amount = fundingOutputAmount;\n deposit.depositor = reveal.depositor;\n /* solhint-disable-next-line not-rely-on-time */\n deposit.revealedAt = uint32(block.timestamp);\n deposit.vault = reveal.vault;\n\n emit DepositRevealed(\n fundingTxHash,\n reveal.fundingOutputIndex,\n reveal.depositor,\n reveal.blindingFactor,\n reveal.walletPubKeyHash,\n reveal.refundPubKeyHash,\n reveal.refundLocktime\n );\n }\n\n /// @notice Used by the wallet to prove the BTC deposit sweep transaction\n /// and to update Bank balances accordingly. Sweep is only accepted\n /// if it satisfies SPV proof.\n ///\n /// The function is performing Bank balance updates by first\n /// computing the Bitcoin fee for the sweep transaction. The fee is\n /// divided evenly between all swept deposits. Each depositor\n /// receives a balance in the bank equal to the amount inferred\n /// during the reveal transaction, minus their fee share.\n ///\n /// It is possible to prove the given sweep only one time.\n /// @param sweepTx Bitcoin sweep transaction data.\n /// @param merkleProof The merkle proof of transaction inclusion in a block.\n /// @param txIndexInBlock Transaction index in the block (0-indexed).\n /// @param bitcoinHeaders Single bytestring of 80-byte bitcoin headers,\n /// lowest height first.\n function sweep(\n TxInfo calldata sweepTx,\n bytes memory merkleProof,\n uint256 txIndexInBlock,\n bytes memory bitcoinHeaders\n ) external {\n // TODO We need to read `fundingTxHash`, `fundingOutputIndex` from\n // `sweepTx.inputVector`. We then hash them to obtain deposit\n // identifier and read DepositInfo. From DepositInfo we know what\n // amount was inferred during deposit reveal transaction and we\n // use that amount to update their Bank balance, minus fee.\n //\n // TODO We need to validate if the sum in the output minus the\n // amount from the previous wallet balance input minus fees is\n // equal to the amount by which Bank balances were increased.\n //\n // TODO We need to validate `sweepTx.outputVector` to see if the balance\n // was not transferred away from the wallet before increasing\n // balances in the bank.\n //\n // TODO Delete deposit from unswept mapping or mark it as swept\n // depending on the gas costs. Alternatively, do not allow to\n // use the same TX input vector twice. Sweep should be provable\n // only one time.\n }\n\n // TODO It is possible a malicious wallet can sweep deposits that can not\n // be later proved on Ethereum. For example, a deposit with\n // an incorrect amount revealed. We need to provide a function for honest\n // depositors, next to sweep, to prove their swept balances on Ethereum\n // selectively, based on deposits they have earlier received.\n // (UPDATE PR #90: Is it still the case since amounts are inferred?)\n}\n"
87
+ },
88
+ "@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol": {
89
+ "content": "pragma solidity ^0.8.4;\n\n/** @title BitcoinSPV */\n/** @author Summa (https://summa.one) */\n\nimport {BytesLib} from \"./BytesLib.sol\";\nimport {SafeMath} from \"./SafeMath.sol\";\n\nlibrary BTCUtils {\n using BytesLib for bytes;\n using SafeMath for uint256;\n\n // The target at minimum Difficulty. Also the target of the genesis block\n uint256 public constant DIFF1_TARGET = 0xffff0000000000000000000000000000000000000000000000000000;\n\n uint256 public constant RETARGET_PERIOD = 2 * 7 * 24 * 60 * 60; // 2 weeks in seconds\n uint256 public constant RETARGET_PERIOD_BLOCKS = 2016; // 2 weeks in blocks\n\n uint256 public constant ERR_BAD_ARG = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n /* ***** */\n /* UTILS */\n /* ***** */\n\n /// @notice Determines the length of a VarInt in bytes\n /// @dev A VarInt of >1 byte is prefixed with a flag indicating its length\n /// @param _flag The first byte of a VarInt\n /// @return The number of non-flag bytes in the VarInt\n function determineVarIntDataLength(bytes memory _flag) internal pure returns (uint8) {\n if (uint8(_flag[0]) == 0xff) {\n return 8; // one-byte flag, 8 bytes data\n }\n if (uint8(_flag[0]) == 0xfe) {\n return 4; // one-byte flag, 4 bytes data\n }\n if (uint8(_flag[0]) == 0xfd) {\n return 2; // one-byte flag, 2 bytes data\n }\n\n return 0; // flag is data\n }\n\n /// @notice Parse a VarInt into its data length and the number it represents\n /// @dev Useful for Parsing Vins and Vouts. Returns ERR_BAD_ARG if insufficient bytes.\n /// Caller SHOULD explicitly handle this case (or bubble it up)\n /// @param _b A byte-string starting with a VarInt\n /// @return number of bytes in the encoding (not counting the tag), the encoded int\n function parseVarInt(bytes memory _b) internal pure returns (uint256, uint256) {\n uint8 _dataLen = determineVarIntDataLength(_b);\n\n if (_dataLen == 0) {\n return (0, uint8(_b[0]));\n }\n if (_b.length < 1 + _dataLen) {\n return (ERR_BAD_ARG, 0);\n }\n uint256 _number = bytesToUint(reverseEndianness(_b.slice(1, _dataLen)));\n return (_dataLen, _number);\n }\n\n /// @notice Changes the endianness of a byte array\n /// @dev Returns a new, backwards, bytes\n /// @param _b The bytes to reverse\n /// @return The reversed bytes\n function reverseEndianness(bytes memory _b) internal pure returns (bytes memory) {\n bytes memory _newValue = new bytes(_b.length);\n\n for (uint i = 0; i < _b.length; i++) {\n _newValue[_b.length - i - 1] = _b[i];\n }\n\n return _newValue;\n }\n\n /// @notice Changes the endianness of a uint256\n /// @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\n /// @param _b The unsigned integer to reverse\n /// @return v The reversed value\n function reverseUint256(uint256 _b) internal pure returns (uint256 v) {\n v = _b;\n\n // swap bytes\n v = ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n // swap 2-byte long pairs\n v = ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n // swap 4-byte long pairs\n v = ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\n // swap 8-byte long pairs\n v = ((v >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\n ((v & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\n // swap 16-byte long pairs\n v = (v >> 128) | (v << 128);\n }\n\n /// @notice Converts big-endian bytes to a uint\n /// @dev Traverses the byte array and sums the bytes\n /// @param _b The big-endian bytes-encoded integer\n /// @return The integer representation\n function bytesToUint(bytes memory _b) internal pure returns (uint256) {\n uint256 _number;\n\n for (uint i = 0; i < _b.length; i++) {\n _number = _number + uint8(_b[i]) * (2 ** (8 * (_b.length - (i + 1))));\n }\n\n return _number;\n }\n\n /// @notice Get the last _num bytes from a byte array\n /// @param _b The byte array to slice\n /// @param _num The number of bytes to extract from the end\n /// @return The last _num bytes of _b\n function lastBytes(bytes memory _b, uint256 _num) internal pure returns (bytes memory) {\n uint256 _start = _b.length.sub(_num);\n\n return _b.slice(_start, _num);\n }\n\n /// @notice Implements bitcoin's hash160 (rmd160(sha2()))\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\n /// @param _b The pre-image\n /// @return The digest\n function hash160(bytes memory _b) internal pure returns (bytes memory) {\n return abi.encodePacked(ripemd160(abi.encodePacked(sha256(_b))));\n }\n\n /// @notice Implements bitcoin's hash256 (double sha2)\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\n /// @param _b The pre-image\n /// @return The digest\n function hash256(bytes memory _b) internal pure returns (bytes32) {\n return sha256(abi.encodePacked(sha256(_b)));\n }\n\n /// @notice Implements bitcoin's hash256 (double sha2)\n /// @dev sha2 is precompiled smart contract located at address(2)\n /// @param _b The pre-image\n /// @return res The digest\n function hash256View(bytes memory _b) internal view returns (bytes32 res) {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let ptr := mload(0x40)\n pop(staticcall(gas(), 2, add(_b, 32), mload(_b), ptr, 32))\n pop(staticcall(gas(), 2, ptr, 32, ptr, 32))\n res := mload(ptr)\n }\n }\n\n /* ************ */\n /* Legacy Input */\n /* ************ */\n\n /// @notice Extracts the nth input from the vin (0-indexed)\n /// @dev Iterates over the vin. If you need to extract several, write a custom function\n /// @param _vin The vin as a tightly-packed byte array\n /// @param _index The 0-indexed location of the input to extract\n /// @return The input as a byte array\n function extractInputAtIndex(bytes memory _vin, uint256 _index) internal pure returns (bytes memory) {\n uint256 _varIntDataLen;\n uint256 _nIns;\n\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\n require(_varIntDataLen != ERR_BAD_ARG, \"Read overrun during VarInt parsing\");\n require(_index < _nIns, \"Vin read overrun\");\n\n bytes memory _remaining;\n\n uint256 _len = 0;\n uint256 _offset = 1 + _varIntDataLen;\n\n for (uint256 _i = 0; _i < _index; _i ++) {\n _remaining = _vin.slice(_offset, _vin.length - _offset);\n _len = determineInputLength(_remaining);\n require(_len != ERR_BAD_ARG, \"Bad VarInt in scriptSig\");\n _offset = _offset + _len;\n }\n\n _remaining = _vin.slice(_offset, _vin.length - _offset);\n _len = determineInputLength(_remaining);\n require(_len != ERR_BAD_ARG, \"Bad VarInt in scriptSig\");\n return _vin.slice(_offset, _len);\n }\n\n /// @notice Determines whether an input is legacy\n /// @dev False if no scriptSig, otherwise True\n /// @param _input The input\n /// @return True for legacy, False for witness\n function isLegacyInput(bytes memory _input) internal pure returns (bool) {\n return _input.keccak256Slice(36, 1) != keccak256(hex\"00\");\n }\n\n /// @notice Determines the length of a scriptSig in an input\n /// @dev Will return 0 if passed a witness input.\n /// @param _input The LEGACY input\n /// @return The length of the script sig\n function extractScriptSigLen(bytes memory _input) internal pure returns (uint256, uint256) {\n if (_input.length < 37) {\n return (ERR_BAD_ARG, 0);\n }\n bytes memory _afterOutpoint = _input.slice(36, _input.length - 36);\n\n uint256 _varIntDataLen;\n uint256 _scriptSigLen;\n (_varIntDataLen, _scriptSigLen) = parseVarInt(_afterOutpoint);\n\n return (_varIntDataLen, _scriptSigLen);\n }\n\n /// @notice Determines the length of an input from its scriptSig\n /// @dev 36 for outpoint, 1 for scriptSig length, 4 for sequence\n /// @param _input The input\n /// @return The length of the input in bytes\n function determineInputLength(bytes memory _input) internal pure returns (uint256) {\n uint256 _varIntDataLen;\n uint256 _scriptSigLen;\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\n if (_varIntDataLen == ERR_BAD_ARG) {\n return ERR_BAD_ARG;\n }\n\n return 36 + 1 + _varIntDataLen + _scriptSigLen + 4;\n }\n\n /// @notice Extracts the LE sequence bytes from an input\n /// @dev Sequence is used for relative time locks\n /// @param _input The LEGACY input\n /// @return The sequence bytes (LE uint)\n function extractSequenceLELegacy(bytes memory _input) internal pure returns (bytes memory) {\n uint256 _varIntDataLen;\n uint256 _scriptSigLen;\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\n require(_varIntDataLen != ERR_BAD_ARG, \"Bad VarInt in scriptSig\");\n return _input.slice(36 + 1 + _varIntDataLen + _scriptSigLen, 4);\n }\n\n /// @notice Extracts the sequence from the input\n /// @dev Sequence is a 4-byte little-endian number\n /// @param _input The LEGACY input\n /// @return The sequence number (big-endian uint)\n function extractSequenceLegacy(bytes memory _input) internal pure returns (uint32) {\n bytes memory _leSeqence = extractSequenceLELegacy(_input);\n bytes memory _beSequence = reverseEndianness(_leSeqence);\n return uint32(bytesToUint(_beSequence));\n }\n /// @notice Extracts the VarInt-prepended scriptSig from the input in a tx\n /// @dev Will return hex\"00\" if passed a witness input\n /// @param _input The LEGACY input\n /// @return The length-prepended scriptSig\n function extractScriptSig(bytes memory _input) internal pure returns (bytes memory) {\n uint256 _varIntDataLen;\n uint256 _scriptSigLen;\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\n require(_varIntDataLen != ERR_BAD_ARG, \"Bad VarInt in scriptSig\");\n return _input.slice(36, 1 + _varIntDataLen + _scriptSigLen);\n }\n\n\n /* ************* */\n /* Witness Input */\n /* ************* */\n\n /// @notice Extracts the LE sequence bytes from an input\n /// @dev Sequence is used for relative time locks\n /// @param _input The WITNESS input\n /// @return The sequence bytes (LE uint)\n function extractSequenceLEWitness(bytes memory _input) internal pure returns (bytes memory) {\n return _input.slice(37, 4);\n }\n\n /// @notice Extracts the sequence from the input in a tx\n /// @dev Sequence is a 4-byte little-endian number\n /// @param _input The WITNESS input\n /// @return The sequence number (big-endian uint)\n function extractSequenceWitness(bytes memory _input) internal pure returns (uint32) {\n bytes memory _leSeqence = extractSequenceLEWitness(_input);\n bytes memory _inputeSequence = reverseEndianness(_leSeqence);\n return uint32(bytesToUint(_inputeSequence));\n }\n\n /// @notice Extracts the outpoint from the input in a tx\n /// @dev 32-byte tx id with 4-byte index\n /// @param _input The input\n /// @return The outpoint (LE bytes of prev tx hash + LE bytes of prev tx index)\n function extractOutpoint(bytes memory _input) internal pure returns (bytes memory) {\n return _input.slice(0, 36);\n }\n\n /// @notice Extracts the outpoint tx id from an input\n /// @dev 32-byte tx id\n /// @param _input The input\n /// @return The tx id (little-endian bytes)\n function extractInputTxIdLE(bytes memory _input) internal pure returns (bytes32) {\n return _input.slice(0, 32).toBytes32();\n }\n\n /// @notice Extracts the LE tx input index from the input in a tx\n /// @dev 4-byte tx index\n /// @param _input The input\n /// @return The tx index (little-endian bytes)\n function extractTxIndexLE(bytes memory _input) internal pure returns (bytes memory) {\n return _input.slice(32, 4);\n }\n\n /* ****** */\n /* Output */\n /* ****** */\n\n /// @notice Determines the length of an output\n /// @dev Works with any properly formatted output\n /// @param _output The output\n /// @return The length indicated by the prefix, error if invalid length\n function determineOutputLength(bytes memory _output) internal pure returns (uint256) {\n if (_output.length < 9) {\n return ERR_BAD_ARG;\n }\n bytes memory _afterValue = _output.slice(8, _output.length - 8);\n\n uint256 _varIntDataLen;\n uint256 _scriptPubkeyLength;\n (_varIntDataLen, _scriptPubkeyLength) = parseVarInt(_afterValue);\n\n if (_varIntDataLen == ERR_BAD_ARG) {\n return ERR_BAD_ARG;\n }\n\n // 8-byte value, 1-byte for tag itself\n return 8 + 1 + _varIntDataLen + _scriptPubkeyLength;\n }\n\n /// @notice Extracts the output at a given index in the TxOuts vector\n /// @dev Iterates over the vout. If you need to extract multiple, write a custom function\n /// @param _vout The _vout to extract from\n /// @param _index The 0-indexed location of the output to extract\n /// @return The specified output\n function extractOutputAtIndex(bytes memory _vout, uint256 _index) internal pure returns (bytes memory) {\n uint256 _varIntDataLen;\n uint256 _nOuts;\n\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\n require(_varIntDataLen != ERR_BAD_ARG, \"Read overrun during VarInt parsing\");\n require(_index < _nOuts, \"Vout read overrun\");\n\n bytes memory _remaining;\n\n uint256 _len = 0;\n uint256 _offset = 1 + _varIntDataLen;\n\n for (uint256 _i = 0; _i < _index; _i ++) {\n _remaining = _vout.slice(_offset, _vout.length - _offset);\n _len = determineOutputLength(_remaining);\n require(_len != ERR_BAD_ARG, \"Bad VarInt in scriptPubkey\");\n _offset += _len;\n }\n\n _remaining = _vout.slice(_offset, _vout.length - _offset);\n _len = determineOutputLength(_remaining);\n require(_len != ERR_BAD_ARG, \"Bad VarInt in scriptPubkey\");\n return _vout.slice(_offset, _len);\n }\n\n /// @notice Extracts the value bytes from the output in a tx\n /// @dev Value is an 8-byte little-endian number\n /// @param _output The output\n /// @return The output value as LE bytes\n function extractValueLE(bytes memory _output) internal pure returns (bytes memory) {\n return _output.slice(0, 8);\n }\n\n /// @notice Extracts the value from the output in a tx\n /// @dev Value is an 8-byte little-endian number\n /// @param _output The output\n /// @return The output value\n function extractValue(bytes memory _output) internal pure returns (uint64) {\n bytes memory _leValue = extractValueLE(_output);\n bytes memory _beValue = reverseEndianness(_leValue);\n return uint64(bytesToUint(_beValue));\n }\n\n /// @notice Extracts the data from an op return output\n /// @dev Returns hex\"\" if no data or not an op return\n /// @param _output The output\n /// @return Any data contained in the opreturn output, null if not an op return\n function extractOpReturnData(bytes memory _output) internal pure returns (bytes memory) {\n if (_output.keccak256Slice(9, 1) != keccak256(hex\"6a\")) {\n return hex\"\";\n }\n bytes memory _dataLen = _output.slice(10, 1);\n return _output.slice(11, bytesToUint(_dataLen));\n }\n\n /// @notice Extracts the hash from the output script\n /// @dev Determines type by the length prefix and validates format\n /// @param _output The output\n /// @return The hash committed to by the pk_script, or null for errors\n function extractHash(bytes memory _output) internal pure returns (bytes memory) {\n uint8 _scriptLen = uint8(_output[8]);\n\n // don't have to worry about overflow here.\n // if _scriptLen + 9 overflows, then output.length would have to be < 9\n // for this check to pass. if it's < 9, then we errored when assigning\n // _scriptLen\n if (_scriptLen + 9 != _output.length) {\n return hex\"\";\n }\n\n if (uint8(_output[9]) == 0) {\n if (_scriptLen < 2) {\n return hex\"\";\n }\n uint256 _payloadLen = uint8(_output[10]);\n // Check for maliciously formatted witness outputs.\n // No need to worry about underflow as long b/c of the `< 2` check\n if (_payloadLen != _scriptLen - 2 || (_payloadLen != 0x20 && _payloadLen != 0x14)) {\n return hex\"\";\n }\n return _output.slice(11, _payloadLen);\n } else {\n bytes32 _tag = _output.keccak256Slice(8, 3);\n // p2pkh\n if (_tag == keccak256(hex\"1976a9\")) {\n // Check for maliciously formatted p2pkh\n // No need to worry about underflow, b/c of _scriptLen check\n if (uint8(_output[11]) != 0x14 ||\n _output.keccak256Slice(_output.length - 2, 2) != keccak256(hex\"88ac\")) {\n return hex\"\";\n }\n return _output.slice(12, 20);\n //p2sh\n } else if (_tag == keccak256(hex\"17a914\")) {\n // Check for maliciously formatted p2sh\n // No need to worry about underflow, b/c of _scriptLen check\n if (uint8(_output[_output.length - 1]) != 0x87) {\n return hex\"\";\n }\n return _output.slice(11, 20);\n }\n }\n return hex\"\"; /* NB: will trigger on OPRETURN and any non-standard that doesn't overrun */\n }\n\n /* ********** */\n /* Witness TX */\n /* ********** */\n\n\n /// @notice Checks that the vin passed up is properly formatted\n /// @dev Consider a vin with a valid vout in its scriptsig\n /// @param _vin Raw bytes length-prefixed input vector\n /// @return True if it represents a validly formatted vin\n function validateVin(bytes memory _vin) internal pure returns (bool) {\n uint256 _varIntDataLen;\n uint256 _nIns;\n\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\n\n // Not valid if it says there are too many or no inputs\n if (_nIns == 0 || _varIntDataLen == ERR_BAD_ARG) {\n return false;\n }\n\n uint256 _offset = 1 + _varIntDataLen;\n\n for (uint256 i = 0; i < _nIns; i++) {\n // If we're at the end, but still expect more\n if (_offset >= _vin.length) {\n return false;\n }\n\n // Grab the next input and determine its length.\n bytes memory _next = _vin.slice(_offset, _vin.length - _offset);\n uint256 _nextLen = determineInputLength(_next);\n if (_nextLen == ERR_BAD_ARG) {\n return false;\n }\n\n // Increase the offset by that much\n _offset += _nextLen;\n }\n\n // Returns false if we're not exactly at the end\n return _offset == _vin.length;\n }\n\n /// @notice Checks that the vout passed up is properly formatted\n /// @dev Consider a vout with a valid scriptpubkey\n /// @param _vout Raw bytes length-prefixed output vector\n /// @return True if it represents a validly formatted vout\n function validateVout(bytes memory _vout) internal pure returns (bool) {\n uint256 _varIntDataLen;\n uint256 _nOuts;\n\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\n\n // Not valid if it says there are too many or no outputs\n if (_nOuts == 0 || _varIntDataLen == ERR_BAD_ARG) {\n return false;\n }\n\n uint256 _offset = 1 + _varIntDataLen;\n\n for (uint256 i = 0; i < _nOuts; i++) {\n // If we're at the end, but still expect more\n if (_offset >= _vout.length) {\n return false;\n }\n\n // Grab the next output and determine its length.\n // Increase the offset by that much\n bytes memory _next = _vout.slice(_offset, _vout.length - _offset);\n uint256 _nextLen = determineOutputLength(_next);\n if (_nextLen == ERR_BAD_ARG) {\n return false;\n }\n\n _offset += _nextLen;\n }\n\n // Returns false if we're not exactly at the end\n return _offset == _vout.length;\n }\n\n\n\n /* ************ */\n /* Block Header */\n /* ************ */\n\n /// @notice Extracts the transaction merkle root from a block header\n /// @dev Use verifyHash256Merkle to verify proofs with this root\n /// @param _header The header\n /// @return The merkle root (little-endian)\n function extractMerkleRootLE(bytes memory _header) internal pure returns (bytes memory) {\n return _header.slice(36, 32);\n }\n\n /// @notice Extracts the target from a block header\n /// @dev Target is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\n /// @param _header The header\n /// @return The target threshold\n function extractTarget(bytes memory _header) internal pure returns (uint256) {\n bytes memory _m = _header.slice(72, 3);\n uint8 _e = uint8(_header[75]);\n uint256 _mantissa = bytesToUint(reverseEndianness(_m));\n uint _exponent = _e - 3;\n\n return _mantissa * (256 ** _exponent);\n }\n\n /// @notice Calculate difficulty from the difficulty 1 target and current target\n /// @dev Difficulty 1 is 0x1d00ffff on mainnet and testnet\n /// @dev Difficulty 1 is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\n /// @param _target The current target\n /// @return The block difficulty (bdiff)\n function calculateDifficulty(uint256 _target) internal pure returns (uint256) {\n // Difficulty 1 calculated from 0x1d00ffff\n return DIFF1_TARGET.div(_target);\n }\n\n /// @notice Extracts the previous block's hash from a block header\n /// @dev Block headers do NOT include block number :(\n /// @param _header The header\n /// @return The previous block's hash (little-endian)\n function extractPrevBlockLE(bytes memory _header) internal pure returns (bytes memory) {\n return _header.slice(4, 32);\n }\n\n /// @notice Extracts the timestamp from a block header\n /// @dev Time is not 100% reliable\n /// @param _header The header\n /// @return The timestamp (little-endian bytes)\n function extractTimestampLE(bytes memory _header) internal pure returns (bytes memory) {\n return _header.slice(68, 4);\n }\n\n /// @notice Extracts the timestamp from a block header\n /// @dev Time is not 100% reliable\n /// @param _header The header\n /// @return The timestamp (uint)\n function extractTimestamp(bytes memory _header) internal pure returns (uint32) {\n return uint32(bytesToUint(reverseEndianness(extractTimestampLE(_header))));\n }\n\n /// @notice Extracts the expected difficulty from a block header\n /// @dev Does NOT verify the work\n /// @param _header The header\n /// @return The difficulty as an integer\n function extractDifficulty(bytes memory _header) internal pure returns (uint256) {\n return calculateDifficulty(extractTarget(_header));\n }\n\n /// @notice Concatenates and hashes two inputs for merkle proving\n /// @param _a The first hash\n /// @param _b The second hash\n /// @return The double-sha256 of the concatenated hashes\n function _hash256MerkleStep(bytes memory _a, bytes memory _b) internal pure returns (bytes32) {\n return hash256(abi.encodePacked(_a, _b));\n }\n\n /// @notice Verifies a Bitcoin-style merkle tree\n /// @dev Leaves are 0-indexed.\n /// @param _proof The proof. Tightly packed LE sha256 hashes. The last hash is the root\n /// @param _index The index of the leaf\n /// @return true if the proof is valid, else false\n function verifyHash256Merkle(bytes memory _proof, uint _index) internal pure returns (bool) {\n // Not an even number of hashes\n if (_proof.length % 32 != 0) {\n return false;\n }\n\n // Special case for coinbase-only blocks\n if (_proof.length == 32) {\n return true;\n }\n\n // Should never occur\n if (_proof.length == 64) {\n return false;\n }\n\n uint _idx = _index;\n bytes32 _root = _proof.slice(_proof.length - 32, 32).toBytes32();\n bytes32 _current = _proof.slice(0, 32).toBytes32();\n\n for (uint i = 1; i < (_proof.length.div(32)) - 1; i++) {\n if (_idx % 2 == 1) {\n _current = _hash256MerkleStep(_proof.slice(i * 32, 32), abi.encodePacked(_current));\n } else {\n _current = _hash256MerkleStep(abi.encodePacked(_current), _proof.slice(i * 32, 32));\n }\n _idx = _idx >> 1;\n }\n return _current == _root;\n }\n\n /*\n NB: https://github.com/bitcoin/bitcoin/blob/78dae8caccd82cfbfd76557f1fb7d7557c7b5edb/src/pow.cpp#L49-L72\n NB: We get a full-bitlength target from this. For comparison with\n header-encoded targets we need to mask it with the header target\n e.g. (full & truncated) == truncated\n */\n /// @notice performs the bitcoin difficulty retarget\n /// @dev implements the Bitcoin algorithm precisely\n /// @param _previousTarget the target of the previous period\n /// @param _firstTimestamp the timestamp of the first block in the difficulty period\n /// @param _secondTimestamp the timestamp of the last block in the difficulty period\n /// @return the new period's target threshold\n function retargetAlgorithm(\n uint256 _previousTarget,\n uint256 _firstTimestamp,\n uint256 _secondTimestamp\n ) internal pure returns (uint256) {\n uint256 _elapsedTime = _secondTimestamp.sub(_firstTimestamp);\n\n // Normalize ratio to factor of 4 if very long or very short\n if (_elapsedTime < RETARGET_PERIOD.div(4)) {\n _elapsedTime = RETARGET_PERIOD.div(4);\n }\n if (_elapsedTime > RETARGET_PERIOD.mul(4)) {\n _elapsedTime = RETARGET_PERIOD.mul(4);\n }\n\n /*\n NB: high targets e.g. ffff0020 can cause overflows here\n so we divide it by 256**2, then multiply by 256**2 later\n we know the target is evenly divisible by 256**2, so this isn't an issue\n */\n\n uint256 _adjusted = _previousTarget.div(65536).mul(_elapsedTime);\n return _adjusted.div(RETARGET_PERIOD).mul(65536);\n }\n}\n"
90
+ },
91
+ "@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol": {
92
+ "content": "pragma solidity ^0.8.4;\n\n/*\n\nhttps://github.com/GNSPS/solidity-bytes-utils/\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <https://unlicense.org>\n*/\n\n\n/** @title BytesLib **/\n/** @author https://github.com/GNSPS **/\n\nlibrary BytesLib {\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\n bytes memory tempBytes;\n\n assembly {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // Store the length of the first bytes array at the beginning of\n // the memory for tempBytes.\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n\n // Maintain a memory counter for the current write location in the\n // temp bytes array by adding the 32 bytes for the array length to\n // the starting location.\n let mc := add(tempBytes, 0x20)\n // Stop copying when the memory counter reaches the length of the\n // first bytes array.\n let end := add(mc, length)\n\n for {\n // Initialize a copy counter to the start of the _preBytes data,\n // 32 bytes into its memory.\n let cc := add(_preBytes, 0x20)\n } lt(mc, end) {\n // Increase both counters by 32 bytes each iteration.\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // Write the _preBytes data into the tempBytes memory 32 bytes\n // at a time.\n mstore(mc, mload(cc))\n }\n\n // Add the length of _postBytes to the current length of tempBytes\n // and store it as the new length in the first 32 bytes of the\n // tempBytes memory.\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n\n // Move the memory counter back from a multiple of 0x20 to the\n // actual end of the _preBytes data.\n mc := end\n // Stop copying when the memory counter reaches the new combined\n // length of the arrays.\n end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n // Update the free-memory pointer by padding our last write location\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n // next 32 byte block, then round down to the nearest multiple of\n // 32. If the sum of the length of the two arrays is zero then add\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\n mstore(0x40, and(\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n not(31) // Round down to the nearest 32 bytes.\n ))\n }\n\n return tempBytes;\n }\n\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n assembly {\n // Read the first 32 bytes of _preBytes storage, which is the length\n // of the array. (We don't need to use the offset into the slot\n // because arrays use the entire slot.)\n let fslot := sload(_preBytes.slot)\n // Arrays of 31 bytes or less have an even value in their slot,\n // while longer arrays have an odd value. The actual length is\n // the slot divided by two for odd values, and the lowest order\n // byte divided by two for even values.\n // If the slot is even, bitwise and the slot with 255 and divide by\n // two to get the length. If the slot is odd, bitwise and the slot\n // with -1 and divide by two.\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n // Since the new array still fits in the slot, we just need to\n // update the contents of the slot.\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n sstore(\n _preBytes.slot,\n // all the modifications to the slot are inside this\n // next block\n add(\n // we can just add to the slot contents because the\n // bytes we want to change are the LSBs\n fslot,\n add(\n mul(\n div(\n // load the bytes from memory\n mload(add(_postBytes, 0x20)),\n // zero all bytes to the right\n exp(0x100, sub(32, mlength))\n ),\n // and now shift left the number of bytes to\n // leave space for the length in the slot\n exp(0x100, sub(32, newlength))\n ),\n // increase length by the double of the memory\n // bytes length\n mul(mlength, 2)\n )\n )\n )\n }\n case 1 {\n // The stored value fits in the slot, but the combined value\n // will exceed it.\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // The contents of the _postBytes array start 32 bytes into\n // the structure. Our first read should obtain the `submod`\n // bytes that can fit into the unused space in the last word\n // of the stored array. To get this, we read 32 bytes starting\n // from `submod`, so the data we read overlaps with the array\n // contents by `submod` bytes. Masking the lowest-order\n // `submod` bytes allows us to add that value directly to the\n // stored value.\n\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(\n sc,\n add(\n and(\n fslot,\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\n ),\n and(mload(mc), mask)\n )\n )\n\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n // Start copying to the last used word of the stored array.\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // Copy over the first `submod` bytes of the new data as in\n // case 1 above.\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n }\n }\n\n function slice(bytes memory _bytes, uint _start, uint _length) internal pure returns (bytes memory res) {\n if (_length == 0) {\n return hex\"\";\n }\n uint _end = _start + _length;\n require(_end > _start && _bytes.length >= _end, \"Slice out of bounds\");\n\n assembly {\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\n res := mload(0x40)\n mstore(0x40, add(add(res, 64), _length))\n mstore(res, _length)\n\n // Compute distance between source and destination pointers\n let diff := sub(res, add(_bytes, _start))\n\n for {\n let src := add(add(_bytes, 32), _start)\n let end := add(src, _length)\n } lt(src, end) {\n src := add(src, 32)\n } {\n mstore(add(src, diff), mload(src))\n }\n }\n }\n\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\n uint _totalLen = _start + 20;\n require(_totalLen > _start && _bytes.length >= _totalLen, \"Address conversion out of bounds.\");\n address tempAddress;\n\n assembly {\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n }\n\n return tempAddress;\n }\n\n function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) {\n uint _totalLen = _start + 32;\n require(_totalLen > _start && _bytes.length >= _totalLen, \"Uint conversion out of bounds.\");\n uint256 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempUint;\n }\n\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n bool success = true;\n\n assembly {\n let length := mload(_preBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(length, mload(_postBytes))\n case 1 {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n // the next line is the loop condition:\n // while(uint(mc < end) + cb == 2)\n } eq(add(lt(mc, end), cb), 2) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // if any of these checks fails then arrays are not equal\n if iszero(eq(mload(mc), mload(cc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\n bool success = true;\n\n assembly {\n // we know _preBytes_offset is 0\n let fslot := sload(_preBytes.slot)\n // Decode the length of the stored array like in concatStorage().\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(slength, mlength)\n case 1 {\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n if iszero(iszero(slength)) {\n switch lt(slength, 32)\n case 1 {\n // blank the last byte which is the length\n fslot := mul(div(fslot, 0x100), 0x100)\n\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n // unsuccess:\n success := 0\n }\n }\n default {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := keccak256(0x0, 0x20)\n\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n\n // the next line is the loop condition:\n // while(uint(mc < end) + cb == 2)\n for {} eq(add(lt(mc, end), cb), 2) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n if iszero(eq(sload(sc), mload(mc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function toBytes32(bytes memory _source) pure internal returns (bytes32 result) {\n if (_source.length == 0) {\n return 0x0;\n }\n\n assembly {\n result := mload(add(_source, 32))\n }\n }\n\n function keccak256Slice(bytes memory _bytes, uint _start, uint _length) pure internal returns (bytes32 result) {\n uint _end = _start + _length;\n require(_end > _start && _bytes.length >= _end, \"Slice out of bounds\");\n\n assembly {\n result := keccak256(add(add(_bytes, 32), _start), _length)\n }\n }\n}\n"
93
+ },
94
+ "@keep-network/bitcoin-spv-sol/contracts/SafeMath.sol": {
95
+ "content": "pragma solidity ^0.8.4;\n\n/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 Smart Contract Solutions, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (_a == 0) {\n return 0;\n }\n\n c = _a * _b;\n require(c / _a == _b, \"Overflow during multiplication.\");\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\n // assert(_b > 0); // Solidity automatically throws when dividing by 0\n // uint256 c = _a / _b;\n // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\n return _a / _b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\n require(_b <= _a, \"Underflow during subtraction.\");\n return _a - _b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n c = _a + _b;\n require(c >= _a, \"Overflow during addition.\");\n return c;\n }\n}\n"
87
96
  }
88
97
  },
89
98
  "settings": {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -6,12 +6,6 @@
6
6
  {
7
7
  "anonymous": false,
8
8
  "inputs": [
9
- {
10
- "indexed": false,
11
- "internalType": "uint256",
12
- "name": "depositId",
13
- "type": "uint256"
14
- },
15
9
  {
16
10
  "indexed": false,
17
11
  "internalType": "bytes32",
@@ -32,27 +26,27 @@
32
26
  },
33
27
  {
34
28
  "indexed": false,
35
- "internalType": "uint64",
29
+ "internalType": "bytes8",
36
30
  "name": "blindingFactor",
37
- "type": "uint64"
31
+ "type": "bytes8"
38
32
  },
39
33
  {
40
34
  "indexed": false,
41
- "internalType": "bytes",
42
- "name": "refundPubKey",
43
- "type": "bytes"
35
+ "internalType": "bytes20",
36
+ "name": "walletPubKeyHash",
37
+ "type": "bytes20"
44
38
  },
45
39
  {
46
40
  "indexed": false,
47
- "internalType": "uint64",
48
- "name": "amount",
49
- "type": "uint64"
41
+ "internalType": "bytes20",
42
+ "name": "refundPubKeyHash",
43
+ "type": "bytes20"
50
44
  },
51
45
  {
52
46
  "indexed": false,
53
- "internalType": "address",
54
- "name": "vault",
55
- "type": "address"
47
+ "internalType": "bytes4",
48
+ "name": "refundLocktime",
49
+ "type": "bytes4"
56
50
  }
57
51
  ],
58
52
  "name": "DepositRevealed",
@@ -61,34 +55,73 @@
61
55
  {
62
56
  "inputs": [
63
57
  {
64
- "internalType": "bytes32",
65
- "name": "fundingTxHash",
66
- "type": "bytes32"
67
- },
68
- {
69
- "internalType": "uint8",
70
- "name": "fundingOutputIndex",
71
- "type": "uint8"
72
- },
73
- {
74
- "internalType": "uint64",
75
- "name": "blindingFactor",
76
- "type": "uint64"
77
- },
78
- {
79
- "internalType": "bytes",
80
- "name": "refundPubKey",
81
- "type": "bytes"
82
- },
83
- {
84
- "internalType": "uint64",
85
- "name": "amount",
86
- "type": "uint64"
87
- },
88
- {
89
- "internalType": "address",
90
- "name": "vault",
91
- "type": "address"
58
+ "components": [
59
+ {
60
+ "internalType": "bytes4",
61
+ "name": "version",
62
+ "type": "bytes4"
63
+ },
64
+ {
65
+ "internalType": "bytes",
66
+ "name": "inputVector",
67
+ "type": "bytes"
68
+ },
69
+ {
70
+ "internalType": "bytes",
71
+ "name": "outputVector",
72
+ "type": "bytes"
73
+ },
74
+ {
75
+ "internalType": "bytes4",
76
+ "name": "locktime",
77
+ "type": "bytes4"
78
+ }
79
+ ],
80
+ "internalType": "struct Bridge.TxInfo",
81
+ "name": "fundingTx",
82
+ "type": "tuple"
83
+ },
84
+ {
85
+ "components": [
86
+ {
87
+ "internalType": "uint8",
88
+ "name": "fundingOutputIndex",
89
+ "type": "uint8"
90
+ },
91
+ {
92
+ "internalType": "address",
93
+ "name": "depositor",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "internalType": "bytes8",
98
+ "name": "blindingFactor",
99
+ "type": "bytes8"
100
+ },
101
+ {
102
+ "internalType": "bytes20",
103
+ "name": "walletPubKeyHash",
104
+ "type": "bytes20"
105
+ },
106
+ {
107
+ "internalType": "bytes20",
108
+ "name": "refundPubKeyHash",
109
+ "type": "bytes20"
110
+ },
111
+ {
112
+ "internalType": "bytes4",
113
+ "name": "refundLocktime",
114
+ "type": "bytes4"
115
+ },
116
+ {
117
+ "internalType": "address",
118
+ "name": "vault",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "internalType": "struct Bridge.RevealInfo",
123
+ "name": "reveal",
124
+ "type": "tuple"
92
125
  }
93
126
  ],
94
127
  "name": "revealDeposit",
@@ -99,24 +132,31 @@
99
132
  {
100
133
  "inputs": [
101
134
  {
102
- "internalType": "bytes4",
103
- "name": "txVersion",
104
- "type": "bytes4"
105
- },
106
- {
107
- "internalType": "bytes",
108
- "name": "txInputVector",
109
- "type": "bytes"
110
- },
111
- {
112
- "internalType": "bytes",
113
- "name": "txOutput",
114
- "type": "bytes"
115
- },
116
- {
117
- "internalType": "bytes4",
118
- "name": "txLocktime",
119
- "type": "bytes4"
135
+ "components": [
136
+ {
137
+ "internalType": "bytes4",
138
+ "name": "version",
139
+ "type": "bytes4"
140
+ },
141
+ {
142
+ "internalType": "bytes",
143
+ "name": "inputVector",
144
+ "type": "bytes"
145
+ },
146
+ {
147
+ "internalType": "bytes",
148
+ "name": "outputVector",
149
+ "type": "bytes"
150
+ },
151
+ {
152
+ "internalType": "bytes4",
153
+ "name": "locktime",
154
+ "type": "bytes4"
155
+ }
156
+ ],
157
+ "internalType": "struct Bridge.TxInfo",
158
+ "name": "sweepTx",
159
+ "type": "tuple"
120
160
  },
121
161
  {
122
162
  "internalType": "bytes",
@@ -149,28 +189,33 @@
149
189
  ],
150
190
  "name": "unswept",
151
191
  "outputs": [
152
- {
153
- "internalType": "uint64",
154
- "name": "amount",
155
- "type": "uint64"
156
- },
157
192
  {
158
193
  "internalType": "address",
159
- "name": "vault",
194
+ "name": "depositor",
160
195
  "type": "address"
161
196
  },
197
+ {
198
+ "internalType": "bytes8",
199
+ "name": "amount",
200
+ "type": "bytes8"
201
+ },
162
202
  {
163
203
  "internalType": "uint32",
164
204
  "name": "revealedAt",
165
205
  "type": "uint32"
206
+ },
207
+ {
208
+ "internalType": "address",
209
+ "name": "vault",
210
+ "type": "address"
166
211
  }
167
212
  ],
168
213
  "stateMutability": "view",
169
214
  "type": "function"
170
215
  }
171
216
  ],
172
- "bytecode": "0x608060405234801561001057600080fd5b506109f0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632c3e1d121461004657806342b1f1a41461006257806343c6de291461007e575b600080fd5b610060600480360381019061005b91906103df565b6100b0565b005b61007c60048036038101906100779190610486565b610238565b005b61009860048036038101906100939190610584565b610241565b6040516100a793929190610735565b60405180910390f35b60008787336040516020016100c793929190610657565b6040516020818303038152906040528051906020012060001c905060008060008381526020019081526020016000209050600081600001601c9054906101000a900463ffffffff1663ffffffff1614610155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014c9061068e565b60405180910390fd5b838160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550828160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504281600001601c6101000a81548163ffffffff021916908363ffffffff1602179055507fed7e2a3180a53ccf8540bf67f1679359557837b4c2350f3c7f1d1409eaac3739828a8a338b8b8b8b8b604051610225999897969594939291906106ae565b60405180910390a1505050505050505050565b50505050505050565b60006020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16905083565b60006102c26102bd84610791565b61076c565b9050828152602081018484840111156102da57600080fd5b6102e5848285610887565b509392505050565b6000813590506102fc81610930565b92915050565b60008135905061031181610947565b92915050565b6000813590506103268161095e565b92915050565b60008083601f84011261033e57600080fd5b8235905067ffffffffffffffff81111561035757600080fd5b60208301915083600182028301111561036f57600080fd5b9250929050565b600082601f83011261038757600080fd5b81356103978482602086016102af565b91505092915050565b6000813590506103af81610975565b92915050565b6000813590506103c48161098c565b92915050565b6000813590506103d9816109a3565b92915050565b600080600080600080600060c0888a0312156103fa57600080fd5b60006104088a828b01610302565b97505060206104198a828b016103ca565b965050604061042a8a828b016103b5565b955050606088013567ffffffffffffffff81111561044757600080fd5b6104538a828b0161032c565b945094505060806104668a828b016103b5565b92505060a06104778a828b016102ed565b91505092959891949750929550565b600080600080600080600060e0888a0312156104a157600080fd5b60006104af8a828b01610317565b975050602088013567ffffffffffffffff8111156104cc57600080fd5b6104d88a828b01610376565b965050604088013567ffffffffffffffff8111156104f557600080fd5b6105018a828b01610376565b95505060606105128a828b01610317565b945050608088013567ffffffffffffffff81111561052f57600080fd5b61053b8a828b01610376565b93505060a061054c8a828b016103a0565b92505060c088013567ffffffffffffffff81111561056957600080fd5b6105758a828b01610376565b91505092959891949750929550565b60006020828403121561059657600080fd5b60006105a4848285016103a0565b91505092915050565b6105b6816107e4565b82525050565b6105c5816107f6565b82525050565b60006105d783856107c2565b93506105e4838584610887565b6105ed836108f6565b840190509392505050565b60006106056018836107d3565b915061061082610907565b602082019050919050565b6106248161084c565b82525050565b61063381610856565b82525050565b61064281610866565b82525050565b6106518161087a565b82525050565b600060608201905061066c60008301866105bc565b6106796020830185610648565b61068660408301846105ad565b949350505050565b600060208201905081810360008301526106a7816105f8565b9050919050565b6000610100820190506106c4600083018c61061b565b6106d1602083018b6105bc565b6106de604083018a610648565b6106eb60608301896105ad565b6106f86080830188610639565b81810360a083015261070b8186886105cb565b905061071a60c0830185610639565b61072760e08301846105ad565b9a9950505050505050505050565b600060608201905061074a6000830186610639565b61075760208301856105ad565b610764604083018461062a565b949350505050565b6000610776610787565b90506107828282610896565b919050565b6000604051905090565b600067ffffffffffffffff8211156107ac576107ab6108c7565b5b6107b5826108f6565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006107ef8261082c565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b61089f826108f6565b810181811067ffffffffffffffff821117156108be576108bd6108c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4465706f73697420616c72656164792072657665616c65640000000000000000600082015250565b610939816107e4565b811461094457600080fd5b50565b610950816107f6565b811461095b57600080fd5b50565b61096781610800565b811461097257600080fd5b50565b61097e8161084c565b811461098957600080fd5b50565b61099581610866565b81146109a057600080fd5b50565b6109ac8161087a565b81146109b757600080fd5b5056fea26469706673582212207d1e61f37f8d0f4d2e819ea92984d0f23b9d069fd850451fb407141395ccff2864736f6c63430008040033",
173
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80632c3e1d121461004657806342b1f1a41461006257806343c6de291461007e575b600080fd5b610060600480360381019061005b91906103df565b6100b0565b005b61007c60048036038101906100779190610486565b610238565b005b61009860048036038101906100939190610584565b610241565b6040516100a793929190610735565b60405180910390f35b60008787336040516020016100c793929190610657565b6040516020818303038152906040528051906020012060001c905060008060008381526020019081526020016000209050600081600001601c9054906101000a900463ffffffff1663ffffffff1614610155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014c9061068e565b60405180910390fd5b838160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550828160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504281600001601c6101000a81548163ffffffff021916908363ffffffff1602179055507fed7e2a3180a53ccf8540bf67f1679359557837b4c2350f3c7f1d1409eaac3739828a8a338b8b8b8b8b604051610225999897969594939291906106ae565b60405180910390a1505050505050505050565b50505050505050565b60006020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16905083565b60006102c26102bd84610791565b61076c565b9050828152602081018484840111156102da57600080fd5b6102e5848285610887565b509392505050565b6000813590506102fc81610930565b92915050565b60008135905061031181610947565b92915050565b6000813590506103268161095e565b92915050565b60008083601f84011261033e57600080fd5b8235905067ffffffffffffffff81111561035757600080fd5b60208301915083600182028301111561036f57600080fd5b9250929050565b600082601f83011261038757600080fd5b81356103978482602086016102af565b91505092915050565b6000813590506103af81610975565b92915050565b6000813590506103c48161098c565b92915050565b6000813590506103d9816109a3565b92915050565b600080600080600080600060c0888a0312156103fa57600080fd5b60006104088a828b01610302565b97505060206104198a828b016103ca565b965050604061042a8a828b016103b5565b955050606088013567ffffffffffffffff81111561044757600080fd5b6104538a828b0161032c565b945094505060806104668a828b016103b5565b92505060a06104778a828b016102ed565b91505092959891949750929550565b600080600080600080600060e0888a0312156104a157600080fd5b60006104af8a828b01610317565b975050602088013567ffffffffffffffff8111156104cc57600080fd5b6104d88a828b01610376565b965050604088013567ffffffffffffffff8111156104f557600080fd5b6105018a828b01610376565b95505060606105128a828b01610317565b945050608088013567ffffffffffffffff81111561052f57600080fd5b61053b8a828b01610376565b93505060a061054c8a828b016103a0565b92505060c088013567ffffffffffffffff81111561056957600080fd5b6105758a828b01610376565b91505092959891949750929550565b60006020828403121561059657600080fd5b60006105a4848285016103a0565b91505092915050565b6105b6816107e4565b82525050565b6105c5816107f6565b82525050565b60006105d783856107c2565b93506105e4838584610887565b6105ed836108f6565b840190509392505050565b60006106056018836107d3565b915061061082610907565b602082019050919050565b6106248161084c565b82525050565b61063381610856565b82525050565b61064281610866565b82525050565b6106518161087a565b82525050565b600060608201905061066c60008301866105bc565b6106796020830185610648565b61068660408301846105ad565b949350505050565b600060208201905081810360008301526106a7816105f8565b9050919050565b6000610100820190506106c4600083018c61061b565b6106d1602083018b6105bc565b6106de604083018a610648565b6106eb60608301896105ad565b6106f86080830188610639565b81810360a083015261070b8186886105cb565b905061071a60c0830185610639565b61072760e08301846105ad565b9a9950505050505050505050565b600060608201905061074a6000830186610639565b61075760208301856105ad565b610764604083018461062a565b949350505050565b6000610776610787565b90506107828282610896565b919050565b6000604051905090565b600067ffffffffffffffff8211156107ac576107ab6108c7565b5b6107b5826108f6565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006107ef8261082c565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b61089f826108f6565b810181811067ffffffffffffffff821117156108be576108bd6108c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4465706f73697420616c72656164792072657665616c65640000000000000000600082015250565b610939816107e4565b811461094457600080fd5b50565b610950816107f6565b811461095b57600080fd5b50565b61096781610800565b811461097257600080fd5b50565b61097e8161084c565b811461098957600080fd5b50565b61099581610866565b81146109a057600080fd5b50565b6109ac8161087a565b81146109b757600080fd5b5056fea26469706673582212207d1e61f37f8d0f4d2e819ea92984d0f23b9d069fd850451fb407141395ccff2864736f6c63430008040033",
217
+ "bytecode": "0x608060405234801561001057600080fd5b506129e1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806325750db71461004657806343c6de29146100625780638d658d4e14610095575b600080fd5b610060600480360381019061005b91906116d0565b6100b1565b005b61007c60048036038101906100779190611725565b61059f565b60405161008c9493929190611d9d565b60405180910390f35b6100af60048036038101906100aa9190611625565b61062c565b005b60008160200160208101906100c69190611558565b8260400160208101906100d991906115fc565b8360600160208101906100ec9190611581565b8460800160208101906100ff9190611581565b8560a001602081019061011291906115d3565b604051602001610126959493929190611c62565b604051602081830303815290604052905060006101b383600001602081019061014f919061174e565b60ff168580604001906101629190611f51565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061063290919063ffffffff16565b905060006101c082610872565b9050601481511415610229576101d583610c14565b80519060200120818051906020012014610224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021b90611ef1565b60405180910390fd5b6102c6565b60208151141561028a5761023c83610ce1565b61024582610da7565b14610285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027c90611e91565b60405180910390fd5b6102c5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bc90611eb1565b60405180910390fd5b5b600061033a8660000160208101906102de91906115d3565b8780602001906102ee9190611f51565b8980604001906102fe9190611f51565b8b606001602081019061031191906115d3565b60405160200161032696959493929190611c01565b604051602081830303815290604052610ce1565b9050600080600083886000016020810190610355919061174e565b604051602001610366929190611bd5565b6040516020818303038152906040528051906020012060001c81526020019081526020016000209050600081600001601c9054906101000a900463ffffffff1663ffffffff16146103ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e390611ed1565b60405180910390fd5b600060208501519050808260000160146101000a81548167ffffffffffffffff021916908360c01c021790555086602001602081019061042c9190611558565b8260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504282600001601c6101000a81548163ffffffff021916908363ffffffff1602179055508660c00160208101906104a49190611558565b8260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa62fd60993aa217b6f00fbb6f377e73a7bbf09f76e730ca9c99f9d54edddc7e88388600001602081019061051b919061174e565b89602001602081019061052e9190611558565b8a604001602081019061054191906115fc565b8b60600160208101906105549190611581565b8c60800160208101906105679190611581565b8d60a001602081019061057a91906115d3565b60405161058d9796959493929190611de2565b60405180910390a15050505050505050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460c01b9080600001601c9054906101000a900463ffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b50505050565b606060008061064085610dca565b80925081935050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156106ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a290611e51565b60405180910390fd5b8084106106ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e490611f11565b60405180910390fd5b60606000808460016106ff9190612030565b905060005b878110156107be5761072d82838b5161071d9190612288565b8b610ec69092919063ffffffff16565b935061073884610f8c565b92507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561079d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079490611e71565b60405180910390fd5b82826107a99190612030565b915080806107b69061244a565b915050610704565b506107e081828a516107d09190612288565b8a610ec69092919063ffffffff16565b92506107eb83610f8c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610850576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084790611e71565b60405180910390fd5b61086581838a610ec69092919063ffffffff16565b9550505050505092915050565b60606000826008815181106108b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c905082516009826108cf9190612086565b60ff16146108ef5760405180602001604052806000815250915050610c0f565b60008360098151811061092b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff161415610a1e5760028160ff1610156109665760405180602001604052806000815250915050610c0f565b600083600a815181106109a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1690506002826109c291906122bc565b60ff16811415806109e15750602081141580156109e0575060148114155b5b156109ff576040518060200160405280600081525092505050610c0f565b610a15600b8286610ec69092919063ffffffff16565b92505050610c0f565b6000610a3760086003866110709092919063ffffffff16565b90507fe1683aec1a10d43657f3f2c82e683d8e19e8a3f320ce9d3bf22c6ca6ab4cbce6811415610b3b57601484600b81518110610a9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141580610afd57507f3b50b2715f5a28d2a7eeb517f17ec797e8536bd425bf31fc4f6bf7ce1e34b77d610afa60028651610ae89190612288565b6002876110709092919063ffffffff16565b14155b15610b1b576040518060200160405280600081525092505050610c0f565b610b32600c601486610ec69092919063ffffffff16565b92505050610c0f565b7fa0916ee0b243ee20fb4ce56170744d86b54d7ae03a418a7a12156f40dedcf7d7811415610bfa5760878460018651610b749190612288565b81518110610bab577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1614610bda576040518060200160405280600081525092505050610c0f565b610bf1600b601486610ec69092919063ffffffff16565b92505050610c0f565b50604051806020016040528060008152509150505b919050565b60606003600283604051610c289190611c4b565b602060405180830381855afa158015610c45573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610c6891906115aa565b604051602001610c789190611bba565b604051602081830303815290604052604051610c949190611c4b565b602060405180830381855afa158015610cb1573d6000803e3d6000fd5b5050506040515160601b604051602001610ccb9190611b9f565b6040516020818303038152906040529050919050565b600060028083604051610cf49190611c4b565b602060405180830381855afa158015610d11573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610d3491906115aa565b604051602001610d449190611bba565b604051602081830303815290604052604051610d609190611c4b565b602060405180830381855afa158015610d7d573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610da091906115aa565b9050919050565b60008082511415610dbd576000801b9050610dc5565b602082015190505b919050565b6000806000610dd8846110e2565b905060008160ff161415610e4057600084600081518110610e22577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c8060ff1690509250925050610ec1565b806001610e4d9190612086565b60ff1684511015610e85577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60009250925050610ec1565b6000610eb0610eab610ea660018560ff1689610ec69092919063ffffffff16565b611202565b611369565b905081818160ff1691509350935050505b915091565b60606000821415610ee857604051806020016040528060008152509050610f85565b60008284610ef69190612030565b90508381118015610f08575080855110155b610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90611f31565b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050505b9392505050565b6000600982511015610fc0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905061106b565b6000610fe46008808551610fd49190612288565b85610ec69092919063ffffffff16565b9050600080610ff283610dca565b80925081935050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561104d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff935050505061106b565b8082600961105b9190612030565b6110659190612030565b93505050505b919050565b600080828461107f9190612030565b90508381118015611091575080855110155b6110d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c790611f31565b60405180910390fd5b82846020870101209150509392505050565b600060ff82600081518110611120577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141561114057600890506111fd565b60fe8260008151811061117c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141561119c57600490506111fd565b60fd826000815181106111d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1614156111f857600290506111fd565b600090505b919050565b60606000825167ffffffffffffffff811115611247577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156112795781602001600182028036833780820191505090505b50905060005b835181101561135f578381815181106112c1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b8260018387516112dc9190612288565b6112e69190612288565b8151811061131d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806113579061244a565b91505061127f565b5080915050919050565b60008060005b835181101561141d576001816113859190612030565b84516113919190612288565b600861139d919061222e565b60026113a99190612110565b8482815181106113e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff166113fd919061222e565b826114089190612030565b915080806114159061244a565b91505061136f565b5080915050919050565b600061143a61143584611fcd565b611fa8565b90508281526020810184848401111561145257600080fd5b61145d8482856123d7565b509392505050565b6000813590506114748161290a565b92915050565b60008135905061148981612921565b92915050565b60008151905061149e81612938565b92915050565b6000813590506114b38161294f565b92915050565b6000813590506114c881612966565b92915050565b600082601f8301126114df57600080fd5b81356114ef848260208601611427565b91505092915050565b600060e0828403121561150a57600080fd5b81905092915050565b60006080828403121561152557600080fd5b81905092915050565b60008135905061153d8161297d565b92915050565b60008135905061155281612994565b92915050565b60006020828403121561156a57600080fd5b600061157884828501611465565b91505092915050565b60006020828403121561159357600080fd5b60006115a18482850161147a565b91505092915050565b6000602082840312156115bc57600080fd5b60006115ca8482850161148f565b91505092915050565b6000602082840312156115e557600080fd5b60006115f3848285016114a4565b91505092915050565b60006020828403121561160e57600080fd5b600061161c848285016114b9565b91505092915050565b6000806000806080858703121561163b57600080fd5b600085013567ffffffffffffffff81111561165557600080fd5b61166187828801611513565b945050602085013567ffffffffffffffff81111561167e57600080fd5b61168a878288016114ce565b935050604061169b8782880161152e565b925050606085013567ffffffffffffffff8111156116b857600080fd5b6116c4878288016114ce565b91505092959194509250565b60008061010083850312156116e457600080fd5b600083013567ffffffffffffffff8111156116fe57600080fd5b61170a85828601611513565b925050602061171b858286016114f8565b9150509250929050565b60006020828403121561173757600080fd5b60006117458482850161152e565b91505092915050565b60006020828403121561176057600080fd5b600061176e84828501611543565b91505092915050565b611780816122f0565b82525050565b611797611792826122f0565b612493565b82525050565b6117a681612302565b82525050565b6117bd6117b882612302565b6124a5565b82525050565b6117cc8161232e565b82525050565b6117e36117de8261232e565b6124af565b82525050565b6117f281612338565b82525050565b61180961180482612338565b6124b9565b82525050565b61181881612364565b82525050565b61182f61182a82612364565b6124c3565b82525050565b60006118418385612009565b935061184e8385846123d7565b82840190509392505050565b600061186582611ffe565b61186f8185612009565b935061187f8185602086016123e6565b80840191505092915050565b6000611898600183612025565b91506118a382612587565b600182019050919050565b60006118bb600183612025565b91506118c6826125b0565b600182019050919050565b60006118de600183612025565b91506118e9826125d9565b600182019050919050565b6000611901600183612025565b915061190c82612602565b600182019050919050565b6000611924602283612014565b915061192f8261262b565b604082019050919050565b6000611947601a83612014565b91506119528261267a565b602082019050919050565b600061196a600183612025565b9150611975826126a3565b600182019050919050565b600061198d600183612025565b9150611998826126cc565b600182019050919050565b60006119b0600183612025565b91506119bb826126f5565b600182019050919050565b60006119d3601983612014565b91506119de8261271e565b602082019050919050565b60006119f6601883612014565b9150611a0182612747565b602082019050919050565b6000611a19600183612025565b9150611a2482612770565b600182019050919050565b6000611a3c600183612025565b9150611a4782612799565b600182019050919050565b6000611a5f600183612025565b9150611a6a826127c2565b600182019050919050565b6000611a82601883612014565b9150611a8d826127eb565b602082019050919050565b6000611aa5601983612014565b9150611ab082612814565b602082019050919050565b6000611ac8600183612025565b9150611ad38261283d565b600182019050919050565b6000611aeb601183612014565b9150611af682612866565b602082019050919050565b6000611b0e601383612014565b9150611b198261288f565b602082019050919050565b6000611b31600183612025565b9150611b3c826128b8565b600182019050919050565b6000611b54600183612025565b9150611b5f826128e1565b600182019050919050565b611b73816123ba565b82525050565b611b82816123ca565b82525050565b611b99611b94826123ca565b6124df565b82525050565b6000611bab82846117ac565b60148201915081905092915050565b6000611bc682846117d2565b60208201915081905092915050565b6000611be182856117d2565b602082019150611bf18284611b88565b6001820191508190509392505050565b6000611c0d82896117f8565b600482019150611c1e828789611835565b9150611c2b828587611835565b9150611c3782846117f8565b600482019150819050979650505050505050565b6000611c57828461185a565b915081905092915050565b6000611c6d8261195d565b9150611c798288611786565b601482019150611c88826118f4565b9150611c9382611abb565b9150611c9f828761181e565b600882019150611cae826118f4565b9150611cb982611a2f565b9150611cc482611980565b9150611ccf8261195d565b9150611cdb82866117ac565b601482019150611cea82611a0c565b9150611cf58261188b565b9150611d0082611b47565b9150611d0b826118ae565b9150611d1682611a2f565b9150611d2182611980565b9150611d2c8261195d565b9150611d3882856117ac565b601482019150611d47826118d1565b9150611d5282611b24565b9150611d5e82846117f8565b600482019150611d6d826119a3565b9150611d78826118f4565b9150611d8382611b47565b9150611d8e82611a52565b91508190509695505050505050565b6000608082019050611db26000830187611777565b611dbf602083018661180f565b611dcc6040830185611b6a565b611dd96060830184611777565b95945050505050565b600060e082019050611df7600083018a6117c3565b611e046020830189611b79565b611e116040830188611777565b611e1e606083018761180f565b611e2b608083018661179d565b611e3860a083018561179d565b611e4560c08301846117e9565b98975050505050505050565b60006020820190508181036000830152611e6a81611917565b9050919050565b60006020820190508181036000830152611e8a8161193a565b9050919050565b60006020820190508181036000830152611eaa816119c6565b9050919050565b60006020820190508181036000830152611eca816119e9565b9050919050565b60006020820190508181036000830152611eea81611a75565b9050919050565b60006020820190508181036000830152611f0a81611a98565b9050919050565b60006020820190508181036000830152611f2a81611ade565b9050919050565b60006020820190508181036000830152611f4a81611b01565b9050919050565b60008083356001602003843603038112611f6a57600080fd5b80840192508235915067ffffffffffffffff821115611f8857600080fd5b602083019250600182023603831315611fa057600080fd5b509250929050565b6000611fb2611fc3565b9050611fbe8282612419565b919050565b6000604051905090565b600067ffffffffffffffff821115611fe857611fe7612520565b5b611ff18261254f565b9050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061203b826123b0565b9150612046836123b0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561207b5761207a6124f1565b5b828201905092915050565b6000612091826123ca565b915061209c836123ca565b92508260ff038211156120b2576120b16124f1565b5b828201905092915050565b6000808291508390505b6001851115612107578086048111156120e3576120e26124f1565b5b60018516156120f25780820291505b80810290506121008561257a565b94506120c7565b94509492505050565b600061211b826123b0565b9150612126836123b0565b92506121537fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461215b565b905092915050565b60008261216b5760019050612227565b816121795760009050612227565b816001811461218f5760028114612199576121c8565b6001915050612227565b60ff8411156121ab576121aa6124f1565b5b8360020a9150848211156121c2576121c16124f1565b5b50612227565b5060208310610133831016604e8410600b84101617156121fd5782820a9050838111156121f8576121f76124f1565b5b612227565b61220a84848460016120bd565b92509050818404811115612221576122206124f1565b5b81810290505b9392505050565b6000612239826123b0565b9150612244836123b0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561227d5761227c6124f1565b5b828202905092915050565b6000612293826123b0565b915061229e836123b0565b9250828210156122b1576122b06124f1565b5b828203905092915050565b60006122c7826123ca565b91506122d2836123ca565b9250828210156122e5576122e46124f1565b5b828203905092915050565b60006122fb82612390565b9050919050565b60007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000082169050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156124045780820151818401526020810190506123e9565b83811115612413576000848401525b50505050565b6124228261254f565b810181811067ffffffffffffffff8211171561244157612440612520565b5b80604052505050565b6000612455826123b0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612488576124876124f1565b5b600182019050919050565b600061249e826124cd565b9050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b60006124d88261256d565b9050919050565b60006124ea82612560565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160f81b9050919050565b60008160601b9050919050565b60008160011c9050919050565b7f6300000000000000000000000000000000000000000000000000000000000000600082015250565b7f6700000000000000000000000000000000000000000000000000000000000000600082015250565b7f8800000000000000000000000000000000000000000000000000000000000000600082015250565b7f7500000000000000000000000000000000000000000000000000000000000000600082015250565b7f52656164206f76657272756e20647572696e6720566172496e7420706172736960008201527f6e67000000000000000000000000000000000000000000000000000000000000602082015250565b7f42616420566172496e7420696e207363726970745075626b6579000000000000600082015250565b7f1400000000000000000000000000000000000000000000000000000000000000600082015250565b7fa900000000000000000000000000000000000000000000000000000000000000600082015250565b7fb100000000000000000000000000000000000000000000000000000000000000600082015250565b7f57726f6e672033322d6279746520736372697074206861736800000000000000600082015250565b7f57726f6e67207363726970742068617368206c656e6774680000000000000000600082015250565b7f8700000000000000000000000000000000000000000000000000000000000000600082015250565b7f7600000000000000000000000000000000000000000000000000000000000000600082015250565b7f6800000000000000000000000000000000000000000000000000000000000000600082015250565b7f4465706f73697420616c72656164792072657665616c65640000000000000000600082015250565b7f57726f6e672032302d6279746520736372697074206861736800000000000000600082015250565b7f0800000000000000000000000000000000000000000000000000000000000000600082015250565b7f566f75742072656164206f76657272756e000000000000000000000000000000600082015250565b7f536c696365206f7574206f6620626f756e647300000000000000000000000000600082015250565b7f0400000000000000000000000000000000000000000000000000000000000000600082015250565b7fac00000000000000000000000000000000000000000000000000000000000000600082015250565b612913816122f0565b811461291e57600080fd5b50565b61292a81612302565b811461293557600080fd5b50565b6129418161232e565b811461294c57600080fd5b50565b61295881612338565b811461296357600080fd5b50565b61296f81612364565b811461297a57600080fd5b50565b612986816123b0565b811461299157600080fd5b50565b61299d816123ca565b81146129a857600080fd5b5056fea2646970667358221220e903e196da4db5ea41ef76b13a3de9d0e1e34fbe5988fd342c978dde89f9175164736f6c63430008040033",
218
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806325750db71461004657806343c6de29146100625780638d658d4e14610095575b600080fd5b610060600480360381019061005b91906116d0565b6100b1565b005b61007c60048036038101906100779190611725565b61059f565b60405161008c9493929190611d9d565b60405180910390f35b6100af60048036038101906100aa9190611625565b61062c565b005b60008160200160208101906100c69190611558565b8260400160208101906100d991906115fc565b8360600160208101906100ec9190611581565b8460800160208101906100ff9190611581565b8560a001602081019061011291906115d3565b604051602001610126959493929190611c62565b604051602081830303815290604052905060006101b383600001602081019061014f919061174e565b60ff168580604001906101629190611f51565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061063290919063ffffffff16565b905060006101c082610872565b9050601481511415610229576101d583610c14565b80519060200120818051906020012014610224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021b90611ef1565b60405180910390fd5b6102c6565b60208151141561028a5761023c83610ce1565b61024582610da7565b14610285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027c90611e91565b60405180910390fd5b6102c5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bc90611eb1565b60405180910390fd5b5b600061033a8660000160208101906102de91906115d3565b8780602001906102ee9190611f51565b8980604001906102fe9190611f51565b8b606001602081019061031191906115d3565b60405160200161032696959493929190611c01565b604051602081830303815290604052610ce1565b9050600080600083886000016020810190610355919061174e565b604051602001610366929190611bd5565b6040516020818303038152906040528051906020012060001c81526020019081526020016000209050600081600001601c9054906101000a900463ffffffff1663ffffffff16146103ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e390611ed1565b60405180910390fd5b600060208501519050808260000160146101000a81548167ffffffffffffffff021916908360c01c021790555086602001602081019061042c9190611558565b8260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504282600001601c6101000a81548163ffffffff021916908363ffffffff1602179055508660c00160208101906104a49190611558565b8260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa62fd60993aa217b6f00fbb6f377e73a7bbf09f76e730ca9c99f9d54edddc7e88388600001602081019061051b919061174e565b89602001602081019061052e9190611558565b8a604001602081019061054191906115fc565b8b60600160208101906105549190611581565b8c60800160208101906105679190611581565b8d60a001602081019061057a91906115d3565b60405161058d9796959493929190611de2565b60405180910390a15050505050505050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460c01b9080600001601c9054906101000a900463ffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b50505050565b606060008061064085610dca565b80925081935050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156106ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a290611e51565b60405180910390fd5b8084106106ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e490611f11565b60405180910390fd5b60606000808460016106ff9190612030565b905060005b878110156107be5761072d82838b5161071d9190612288565b8b610ec69092919063ffffffff16565b935061073884610f8c565b92507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561079d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079490611e71565b60405180910390fd5b82826107a99190612030565b915080806107b69061244a565b915050610704565b506107e081828a516107d09190612288565b8a610ec69092919063ffffffff16565b92506107eb83610f8c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610850576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084790611e71565b60405180910390fd5b61086581838a610ec69092919063ffffffff16565b9550505050505092915050565b60606000826008815181106108b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c905082516009826108cf9190612086565b60ff16146108ef5760405180602001604052806000815250915050610c0f565b60008360098151811061092b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff161415610a1e5760028160ff1610156109665760405180602001604052806000815250915050610c0f565b600083600a815181106109a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1690506002826109c291906122bc565b60ff16811415806109e15750602081141580156109e0575060148114155b5b156109ff576040518060200160405280600081525092505050610c0f565b610a15600b8286610ec69092919063ffffffff16565b92505050610c0f565b6000610a3760086003866110709092919063ffffffff16565b90507fe1683aec1a10d43657f3f2c82e683d8e19e8a3f320ce9d3bf22c6ca6ab4cbce6811415610b3b57601484600b81518110610a9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141580610afd57507f3b50b2715f5a28d2a7eeb517f17ec797e8536bd425bf31fc4f6bf7ce1e34b77d610afa60028651610ae89190612288565b6002876110709092919063ffffffff16565b14155b15610b1b576040518060200160405280600081525092505050610c0f565b610b32600c601486610ec69092919063ffffffff16565b92505050610c0f565b7fa0916ee0b243ee20fb4ce56170744d86b54d7ae03a418a7a12156f40dedcf7d7811415610bfa5760878460018651610b749190612288565b81518110610bab577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1614610bda576040518060200160405280600081525092505050610c0f565b610bf1600b601486610ec69092919063ffffffff16565b92505050610c0f565b50604051806020016040528060008152509150505b919050565b60606003600283604051610c289190611c4b565b602060405180830381855afa158015610c45573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610c6891906115aa565b604051602001610c789190611bba565b604051602081830303815290604052604051610c949190611c4b565b602060405180830381855afa158015610cb1573d6000803e3d6000fd5b5050506040515160601b604051602001610ccb9190611b9f565b6040516020818303038152906040529050919050565b600060028083604051610cf49190611c4b565b602060405180830381855afa158015610d11573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610d3491906115aa565b604051602001610d449190611bba565b604051602081830303815290604052604051610d609190611c4b565b602060405180830381855afa158015610d7d573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610da091906115aa565b9050919050565b60008082511415610dbd576000801b9050610dc5565b602082015190505b919050565b6000806000610dd8846110e2565b905060008160ff161415610e4057600084600081518110610e22577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c8060ff1690509250925050610ec1565b806001610e4d9190612086565b60ff1684511015610e85577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60009250925050610ec1565b6000610eb0610eab610ea660018560ff1689610ec69092919063ffffffff16565b611202565b611369565b905081818160ff1691509350935050505b915091565b60606000821415610ee857604051806020016040528060008152509050610f85565b60008284610ef69190612030565b90508381118015610f08575080855110155b610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90611f31565b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050505b9392505050565b6000600982511015610fc0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905061106b565b6000610fe46008808551610fd49190612288565b85610ec69092919063ffffffff16565b9050600080610ff283610dca565b80925081935050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561104d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff935050505061106b565b8082600961105b9190612030565b6110659190612030565b93505050505b919050565b600080828461107f9190612030565b90508381118015611091575080855110155b6110d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c790611f31565b60405180910390fd5b82846020870101209150509392505050565b600060ff82600081518110611120577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141561114057600890506111fd565b60fe8260008151811061117c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16141561119c57600490506111fd565b60fd826000815181106111d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff1614156111f857600290506111fd565b600090505b919050565b60606000825167ffffffffffffffff811115611247577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156112795781602001600182028036833780820191505090505b50905060005b835181101561135f578381815181106112c1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b8260018387516112dc9190612288565b6112e69190612288565b8151811061131d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806113579061244a565b91505061127f565b5080915050919050565b60008060005b835181101561141d576001816113859190612030565b84516113919190612288565b600861139d919061222e565b60026113a99190612110565b8482815181106113e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff166113fd919061222e565b826114089190612030565b915080806114159061244a565b91505061136f565b5080915050919050565b600061143a61143584611fcd565b611fa8565b90508281526020810184848401111561145257600080fd5b61145d8482856123d7565b509392505050565b6000813590506114748161290a565b92915050565b60008135905061148981612921565b92915050565b60008151905061149e81612938565b92915050565b6000813590506114b38161294f565b92915050565b6000813590506114c881612966565b92915050565b600082601f8301126114df57600080fd5b81356114ef848260208601611427565b91505092915050565b600060e0828403121561150a57600080fd5b81905092915050565b60006080828403121561152557600080fd5b81905092915050565b60008135905061153d8161297d565b92915050565b60008135905061155281612994565b92915050565b60006020828403121561156a57600080fd5b600061157884828501611465565b91505092915050565b60006020828403121561159357600080fd5b60006115a18482850161147a565b91505092915050565b6000602082840312156115bc57600080fd5b60006115ca8482850161148f565b91505092915050565b6000602082840312156115e557600080fd5b60006115f3848285016114a4565b91505092915050565b60006020828403121561160e57600080fd5b600061161c848285016114b9565b91505092915050565b6000806000806080858703121561163b57600080fd5b600085013567ffffffffffffffff81111561165557600080fd5b61166187828801611513565b945050602085013567ffffffffffffffff81111561167e57600080fd5b61168a878288016114ce565b935050604061169b8782880161152e565b925050606085013567ffffffffffffffff8111156116b857600080fd5b6116c4878288016114ce565b91505092959194509250565b60008061010083850312156116e457600080fd5b600083013567ffffffffffffffff8111156116fe57600080fd5b61170a85828601611513565b925050602061171b858286016114f8565b9150509250929050565b60006020828403121561173757600080fd5b60006117458482850161152e565b91505092915050565b60006020828403121561176057600080fd5b600061176e84828501611543565b91505092915050565b611780816122f0565b82525050565b611797611792826122f0565b612493565b82525050565b6117a681612302565b82525050565b6117bd6117b882612302565b6124a5565b82525050565b6117cc8161232e565b82525050565b6117e36117de8261232e565b6124af565b82525050565b6117f281612338565b82525050565b61180961180482612338565b6124b9565b82525050565b61181881612364565b82525050565b61182f61182a82612364565b6124c3565b82525050565b60006118418385612009565b935061184e8385846123d7565b82840190509392505050565b600061186582611ffe565b61186f8185612009565b935061187f8185602086016123e6565b80840191505092915050565b6000611898600183612025565b91506118a382612587565b600182019050919050565b60006118bb600183612025565b91506118c6826125b0565b600182019050919050565b60006118de600183612025565b91506118e9826125d9565b600182019050919050565b6000611901600183612025565b915061190c82612602565b600182019050919050565b6000611924602283612014565b915061192f8261262b565b604082019050919050565b6000611947601a83612014565b91506119528261267a565b602082019050919050565b600061196a600183612025565b9150611975826126a3565b600182019050919050565b600061198d600183612025565b9150611998826126cc565b600182019050919050565b60006119b0600183612025565b91506119bb826126f5565b600182019050919050565b60006119d3601983612014565b91506119de8261271e565b602082019050919050565b60006119f6601883612014565b9150611a0182612747565b602082019050919050565b6000611a19600183612025565b9150611a2482612770565b600182019050919050565b6000611a3c600183612025565b9150611a4782612799565b600182019050919050565b6000611a5f600183612025565b9150611a6a826127c2565b600182019050919050565b6000611a82601883612014565b9150611a8d826127eb565b602082019050919050565b6000611aa5601983612014565b9150611ab082612814565b602082019050919050565b6000611ac8600183612025565b9150611ad38261283d565b600182019050919050565b6000611aeb601183612014565b9150611af682612866565b602082019050919050565b6000611b0e601383612014565b9150611b198261288f565b602082019050919050565b6000611b31600183612025565b9150611b3c826128b8565b600182019050919050565b6000611b54600183612025565b9150611b5f826128e1565b600182019050919050565b611b73816123ba565b82525050565b611b82816123ca565b82525050565b611b99611b94826123ca565b6124df565b82525050565b6000611bab82846117ac565b60148201915081905092915050565b6000611bc682846117d2565b60208201915081905092915050565b6000611be182856117d2565b602082019150611bf18284611b88565b6001820191508190509392505050565b6000611c0d82896117f8565b600482019150611c1e828789611835565b9150611c2b828587611835565b9150611c3782846117f8565b600482019150819050979650505050505050565b6000611c57828461185a565b915081905092915050565b6000611c6d8261195d565b9150611c798288611786565b601482019150611c88826118f4565b9150611c9382611abb565b9150611c9f828761181e565b600882019150611cae826118f4565b9150611cb982611a2f565b9150611cc482611980565b9150611ccf8261195d565b9150611cdb82866117ac565b601482019150611cea82611a0c565b9150611cf58261188b565b9150611d0082611b47565b9150611d0b826118ae565b9150611d1682611a2f565b9150611d2182611980565b9150611d2c8261195d565b9150611d3882856117ac565b601482019150611d47826118d1565b9150611d5282611b24565b9150611d5e82846117f8565b600482019150611d6d826119a3565b9150611d78826118f4565b9150611d8382611b47565b9150611d8e82611a52565b91508190509695505050505050565b6000608082019050611db26000830187611777565b611dbf602083018661180f565b611dcc6040830185611b6a565b611dd96060830184611777565b95945050505050565b600060e082019050611df7600083018a6117c3565b611e046020830189611b79565b611e116040830188611777565b611e1e606083018761180f565b611e2b608083018661179d565b611e3860a083018561179d565b611e4560c08301846117e9565b98975050505050505050565b60006020820190508181036000830152611e6a81611917565b9050919050565b60006020820190508181036000830152611e8a8161193a565b9050919050565b60006020820190508181036000830152611eaa816119c6565b9050919050565b60006020820190508181036000830152611eca816119e9565b9050919050565b60006020820190508181036000830152611eea81611a75565b9050919050565b60006020820190508181036000830152611f0a81611a98565b9050919050565b60006020820190508181036000830152611f2a81611ade565b9050919050565b60006020820190508181036000830152611f4a81611b01565b9050919050565b60008083356001602003843603038112611f6a57600080fd5b80840192508235915067ffffffffffffffff821115611f8857600080fd5b602083019250600182023603831315611fa057600080fd5b509250929050565b6000611fb2611fc3565b9050611fbe8282612419565b919050565b6000604051905090565b600067ffffffffffffffff821115611fe857611fe7612520565b5b611ff18261254f565b9050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061203b826123b0565b9150612046836123b0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561207b5761207a6124f1565b5b828201905092915050565b6000612091826123ca565b915061209c836123ca565b92508260ff038211156120b2576120b16124f1565b5b828201905092915050565b6000808291508390505b6001851115612107578086048111156120e3576120e26124f1565b5b60018516156120f25780820291505b80810290506121008561257a565b94506120c7565b94509492505050565b600061211b826123b0565b9150612126836123b0565b92506121537fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461215b565b905092915050565b60008261216b5760019050612227565b816121795760009050612227565b816001811461218f5760028114612199576121c8565b6001915050612227565b60ff8411156121ab576121aa6124f1565b5b8360020a9150848211156121c2576121c16124f1565b5b50612227565b5060208310610133831016604e8410600b84101617156121fd5782820a9050838111156121f8576121f76124f1565b5b612227565b61220a84848460016120bd565b92509050818404811115612221576122206124f1565b5b81810290505b9392505050565b6000612239826123b0565b9150612244836123b0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561227d5761227c6124f1565b5b828202905092915050565b6000612293826123b0565b915061229e836123b0565b9250828210156122b1576122b06124f1565b5b828203905092915050565b60006122c7826123ca565b91506122d2836123ca565b9250828210156122e5576122e46124f1565b5b828203905092915050565b60006122fb82612390565b9050919050565b60007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000082169050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156124045780820151818401526020810190506123e9565b83811115612413576000848401525b50505050565b6124228261254f565b810181811067ffffffffffffffff8211171561244157612440612520565b5b80604052505050565b6000612455826123b0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612488576124876124f1565b5b600182019050919050565b600061249e826124cd565b9050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b60006124d88261256d565b9050919050565b60006124ea82612560565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160f81b9050919050565b60008160601b9050919050565b60008160011c9050919050565b7f6300000000000000000000000000000000000000000000000000000000000000600082015250565b7f6700000000000000000000000000000000000000000000000000000000000000600082015250565b7f8800000000000000000000000000000000000000000000000000000000000000600082015250565b7f7500000000000000000000000000000000000000000000000000000000000000600082015250565b7f52656164206f76657272756e20647572696e6720566172496e7420706172736960008201527f6e67000000000000000000000000000000000000000000000000000000000000602082015250565b7f42616420566172496e7420696e207363726970745075626b6579000000000000600082015250565b7f1400000000000000000000000000000000000000000000000000000000000000600082015250565b7fa900000000000000000000000000000000000000000000000000000000000000600082015250565b7fb100000000000000000000000000000000000000000000000000000000000000600082015250565b7f57726f6e672033322d6279746520736372697074206861736800000000000000600082015250565b7f57726f6e67207363726970742068617368206c656e6774680000000000000000600082015250565b7f8700000000000000000000000000000000000000000000000000000000000000600082015250565b7f7600000000000000000000000000000000000000000000000000000000000000600082015250565b7f6800000000000000000000000000000000000000000000000000000000000000600082015250565b7f4465706f73697420616c72656164792072657665616c65640000000000000000600082015250565b7f57726f6e672032302d6279746520736372697074206861736800000000000000600082015250565b7f0800000000000000000000000000000000000000000000000000000000000000600082015250565b7f566f75742072656164206f76657272756e000000000000000000000000000000600082015250565b7f536c696365206f7574206f6620626f756e647300000000000000000000000000600082015250565b7f0400000000000000000000000000000000000000000000000000000000000000600082015250565b7fac00000000000000000000000000000000000000000000000000000000000000600082015250565b612913816122f0565b811461291e57600080fd5b50565b61292a81612302565b811461293557600080fd5b50565b6129418161232e565b811461294c57600080fd5b50565b61295881612338565b811461296357600080fd5b50565b61296f81612364565b811461297a57600080fd5b50565b612986816123b0565b811461299157600080fd5b50565b61299d816123ca565b81146129a857600080fd5b5056fea2646970667358221220e903e196da4db5ea41ef76b13a3de9d0e1e34fbe5988fd342c978dde89f9175164736f6c63430008040033",
174
219
  "linkReferences": {},
175
220
  "deployedLinkReferences": {}
176
221
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d7c0f74571a35135607fe09dad43e5dd.json"
3
+ "buildInfo": "../../../build-info/2ef2dc9c11f3851fd3437c51b34c4b13.json"
4
4
  }