@layerzerolabs/lz-evm-sdk-v1 2.1.21 → 2.1.23

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/deployments/arbitrum-sandbox-local/DefaultProxyAdmin.json +14 -14
  3. package/deployments/arbitrum-sandbox-local/Endpoint.json +19 -19
  4. package/deployments/arbitrum-sandbox-local/FPValidator.json +12 -12
  5. package/deployments/arbitrum-sandbox-local/MPTValidator01.json +12 -12
  6. package/deployments/arbitrum-sandbox-local/NonceContract.json +8 -8
  7. package/deployments/arbitrum-sandbox-local/RelayerV2.json +83 -18
  8. package/deployments/arbitrum-sandbox-local/RelayerV2_Implementation.json +160 -48
  9. package/deployments/arbitrum-sandbox-local/RelayerV2_Proxy.json +18 -18
  10. package/deployments/arbitrum-sandbox-local/TreasuryV2.json +20 -20
  11. package/deployments/arbitrum-sandbox-local/UltraLightNode.json +53 -53
  12. package/deployments/arbitrum-sandbox-local/UltraLightNodeV2.json +41 -41
  13. package/deployments/avalanche-sandbox-local/DefaultProxyAdmin.json +273 -0
  14. package/deployments/avalanche-sandbox-local/Endpoint.json +1282 -0
  15. package/deployments/avalanche-sandbox-local/FPValidator.json +382 -0
  16. package/deployments/avalanche-sandbox-local/MPTValidator01.json +395 -0
  17. package/deployments/avalanche-sandbox-local/NonceContract.json +159 -0
  18. package/deployments/avalanche-sandbox-local/RelayerV2.json +1314 -0
  19. package/deployments/avalanche-sandbox-local/RelayerV2_Implementation.json +1488 -0
  20. package/deployments/avalanche-sandbox-local/RelayerV2_Proxy.json +245 -0
  21. package/deployments/avalanche-sandbox-local/TreasuryV2.json +458 -0
  22. package/deployments/avalanche-sandbox-local/UltraLightNodeV2.json +1816 -0
  23. package/deployments/bsc-sandbox-local/DefaultProxyAdmin.json +14 -14
  24. package/deployments/bsc-sandbox-local/Endpoint.json +19 -19
  25. package/deployments/bsc-sandbox-local/FPValidator.json +12 -12
  26. package/deployments/bsc-sandbox-local/MPTValidator01.json +12 -12
  27. package/deployments/bsc-sandbox-local/NonceContract.json +8 -8
  28. package/deployments/bsc-sandbox-local/RelayerV2.json +83 -18
  29. package/deployments/bsc-sandbox-local/RelayerV2_Implementation.json +160 -48
  30. package/deployments/bsc-sandbox-local/RelayerV2_Proxy.json +18 -18
  31. package/deployments/bsc-sandbox-local/TreasuryV2.json +20 -20
  32. package/deployments/bsc-sandbox-local/UltraLightNode.json +53 -53
  33. package/deployments/bsc-sandbox-local/UltraLightNodeV2.json +41 -41
  34. package/deployments/ethereum-sandbox-local/DefaultProxyAdmin.json +11 -11
  35. package/deployments/ethereum-sandbox-local/Endpoint.json +17 -17
  36. package/deployments/ethereum-sandbox-local/FPValidator.json +11 -11
  37. package/deployments/ethereum-sandbox-local/MPTValidator01.json +11 -11
  38. package/deployments/ethereum-sandbox-local/NonceContract.json +7 -7
  39. package/deployments/ethereum-sandbox-local/RelayerV2.json +78 -13
  40. package/deployments/ethereum-sandbox-local/RelayerV2_Implementation.json +159 -47
  41. package/deployments/ethereum-sandbox-local/RelayerV2_Proxy.json +13 -13
  42. package/deployments/ethereum-sandbox-local/TreasuryV2.json +18 -18
  43. package/deployments/ethereum-sandbox-local/UltraLightNode.json +51 -51
  44. package/deployments/ethereum-sandbox-local/UltraLightNodeV2.json +39 -39
  45. package/deployments/merlin-testnet/DefaultProxyAdmin.json +273 -0
  46. package/deployments/merlin-testnet/Endpoint.json +1282 -0
  47. package/deployments/merlin-testnet/FPValidator.json +382 -0
  48. package/deployments/merlin-testnet/MPTValidator01.json +395 -0
  49. package/deployments/merlin-testnet/NonceContract.json +159 -0
  50. package/deployments/merlin-testnet/RelayerV2.json +1314 -0
  51. package/deployments/merlin-testnet/RelayerV2_Implementation.json +1488 -0
  52. package/deployments/merlin-testnet/RelayerV2_Proxy.json +245 -0
  53. package/deployments/merlin-testnet/TreasuryV2.json +458 -0
  54. package/deployments/merlin-testnet/UltraLightNodeV2.json +1816 -0
  55. package/deployments/metis-sandbox-local/DefaultProxyAdmin.json +273 -0
  56. package/deployments/metis-sandbox-local/Endpoint.json +1282 -0
  57. package/deployments/metis-sandbox-local/FPValidator.json +382 -0
  58. package/deployments/metis-sandbox-local/MPTValidator01.json +395 -0
  59. package/deployments/metis-sandbox-local/NonceContract.json +159 -0
  60. package/deployments/metis-sandbox-local/RelayerV2.json +1314 -0
  61. package/deployments/metis-sandbox-local/RelayerV2_Implementation.json +1488 -0
  62. package/deployments/metis-sandbox-local/RelayerV2_Proxy.json +245 -0
  63. package/deployments/metis-sandbox-local/TreasuryV2.json +458 -0
  64. package/deployments/metis-sandbox-local/UltraLightNodeV2.json +1816 -0
  65. package/deployments/optimism-sandbox-local/DefaultProxyAdmin.json +273 -0
  66. package/deployments/optimism-sandbox-local/Endpoint.json +1282 -0
  67. package/deployments/optimism-sandbox-local/FPValidator.json +382 -0
  68. package/deployments/optimism-sandbox-local/MPTValidator01.json +395 -0
  69. package/deployments/optimism-sandbox-local/NonceContract.json +159 -0
  70. package/deployments/optimism-sandbox-local/RelayerV2.json +1314 -0
  71. package/deployments/optimism-sandbox-local/RelayerV2_Implementation.json +1488 -0
  72. package/deployments/optimism-sandbox-local/RelayerV2_Proxy.json +245 -0
  73. package/deployments/optimism-sandbox-local/TreasuryV2.json +458 -0
  74. package/deployments/optimism-sandbox-local/UltraLightNodeV2.json +1816 -0
  75. package/deployments/polygon-sandbox-local/DefaultProxyAdmin.json +14 -14
  76. package/deployments/polygon-sandbox-local/Endpoint.json +19 -19
  77. package/deployments/polygon-sandbox-local/FPValidator.json +12 -12
  78. package/deployments/polygon-sandbox-local/MPTValidator01.json +12 -12
  79. package/deployments/polygon-sandbox-local/NonceContract.json +8 -8
  80. package/deployments/polygon-sandbox-local/RelayerV2.json +83 -18
  81. package/deployments/polygon-sandbox-local/RelayerV2_Implementation.json +160 -48
  82. package/deployments/polygon-sandbox-local/RelayerV2_Proxy.json +18 -18
  83. package/deployments/polygon-sandbox-local/TreasuryV2.json +20 -20
  84. package/deployments/polygon-sandbox-local/UltraLightNode.json +53 -53
  85. package/deployments/polygon-sandbox-local/UltraLightNodeV2.json +41 -41
  86. package/deployments/tron-sandbox-local/DefaultProxyAdmin.json +15 -15
  87. package/deployments/tron-sandbox-local/Endpoint.json +17 -17
  88. package/deployments/tron-sandbox-local/FPValidator.json +9 -9
  89. package/deployments/tron-sandbox-local/MPTValidator01.json +9 -9
  90. package/deployments/tron-sandbox-local/NonceContract.json +8 -8
  91. package/deployments/tron-sandbox-local/RelayerV2.json +96 -31
  92. package/deployments/tron-sandbox-local/RelayerV2_Implementation.json +162 -50
  93. package/deployments/tron-sandbox-local/RelayerV2_Proxy.json +28 -28
  94. package/deployments/tron-sandbox-local/TreasuryV2.json +19 -19
  95. package/deployments/tron-sandbox-local/UltraLightNode.json +52 -52
  96. package/deployments/tron-sandbox-local/UltraLightNodeV2.json +41 -41
  97. package/deployments/trondev-sandbox-local/DefaultProxyAdmin.json +273 -0
  98. package/deployments/trondev-sandbox-local/Endpoint.json +1282 -0
  99. package/deployments/trondev-sandbox-local/FPValidator.json +382 -0
  100. package/deployments/trondev-sandbox-local/MPTValidator01.json +395 -0
  101. package/deployments/trondev-sandbox-local/NonceContract.json +159 -0
  102. package/deployments/trondev-sandbox-local/RelayerV2.json +1314 -0
  103. package/deployments/trondev-sandbox-local/RelayerV2_Implementation.json +1488 -0
  104. package/deployments/trondev-sandbox-local/RelayerV2_Proxy.json +245 -0
  105. package/deployments/trondev-sandbox-local/TreasuryV2.json +458 -0
  106. package/deployments/trondev-sandbox-local/UltraLightNodeV2.json +1816 -0
  107. package/package.json +7 -7
@@ -330,19 +330,19 @@
330
330
  "type": "function"
331
331
  }
332
332
  ],
333
- "transactionHash": "0x4e92e2005626cac874bb87f58f620a02eb65c175538085c752073ef4176705c2",
333
+ "transactionHash": "0xdfa1dcca10679959fb8642fea15ea92741ab057079df41096ce42ec0fdec7ce4",
334
334
  "receipt": {
335
335
  "to": null,
336
336
  "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
337
337
  "contractAddress": "0x948B3c65b89DF0B4894ABE91E6D02FE579834F8F",
338
338
  "transactionIndex": 0,
339
- "gasUsed": "1701560",
339
+ "gasUsed": "1843344",
340
340
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
341
- "blockHash": "0x2d57b00edd8a4a13be45e29059069fe40d2e87eb1f31ce194e027c953553151d",
342
- "transactionHash": "0x4e92e2005626cac874bb87f58f620a02eb65c175538085c752073ef4176705c2",
341
+ "blockHash": "0xbcdd1dafad88350e0c89beda7510bbe31cc2de33f4afa47349b3c7a5d51da4f0",
342
+ "transactionHash": "0xdfa1dcca10679959fb8642fea15ea92741ab057079df41096ce42ec0fdec7ce4",
343
343
  "logs": [],
344
- "blockNumber": 8,
345
- "cumulativeGasUsed": "1701560",
344
+ "blockNumber": 9,
345
+ "cumulativeGasUsed": "1843344",
346
346
  "status": 1,
347
347
  "byzantium": true
348
348
  },
@@ -351,10 +351,10 @@
351
351
  "0x0000000000000000000000000000000000000000"
352
352
  ],
353
353
  "numDeployments": 1,
354
- "solcInputHash": "26073710b59023fa12a4a7fdb81fff44",
355
- "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stargateBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stargateTokenAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"PACKET_SIGNATURE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sizeOfSrcAddress\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"}],\"name\":\"getPacket\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"dstAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"struct LayerZeroPacket.Packet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProofType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUtilsVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"receiptSlotIndex\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"logIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"getVerifyLog\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topicZeroSig\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IValidationLibraryHelperV2.ULNLog\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"secureStgPayload\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"secureStgTokenPayload\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stargateBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stargateTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"utilsVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiptsRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_transactionProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_remoteAddressSize\",\"type\":\"uint256\"}],\"name\":\"validateProof\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"dstAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"struct LayerZeroPacket.Packet\",\"name\":\"packet\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/proof/MPTValidator01.sol\":\"MPTValidator01\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroValidationLibrary.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"../proof/utility/LayerZeroPacket.sol\\\";\\n\\ninterface ILayerZeroValidationLibrary {\\n function validateProof(\\n bytes32 blockData,\\n bytes calldata _data,\\n uint _remoteAddressSize\\n ) external returns (LayerZeroPacket.Packet memory packet);\\n}\\n\",\"keccak256\":\"0x0621a318689774296b47c95d8738d0c4e1bc63efe62e524cb3ea36ef1a9da487\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IValidationLibraryHelperV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"../proof/utility/LayerZeroPacket.sol\\\";\\n\\ninterface IValidationLibraryHelperV2 {\\n struct ULNLog {\\n bytes32 contractAddress;\\n bytes32 topicZeroSig;\\n bytes data;\\n }\\n\\n function getVerifyLog(\\n bytes32 hashRoot,\\n uint[] calldata receiptSlotIndex,\\n uint logIndex,\\n bytes[] calldata proof\\n ) external pure returns (ULNLog memory);\\n\\n function getPacket(\\n bytes calldata data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) external pure returns (LayerZeroPacket.Packet memory);\\n\\n function getUtilsVersion() external view returns (uint8);\\n\\n function getProofType() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa65bfd98c01ae8eb3df2edc925720a85b8dd8f223ab8f8b641176a1c4c3cd41f\",\"license\":\"BUSL-1.1\"},\"contracts/proof/MPTValidator01.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"./utility/LayerZeroPacket.sol\\\";\\nimport \\\"./utility/UltraLightNodeEVMDecoder.sol\\\";\\nimport \\\"../interfaces/IValidationLibraryHelperV2.sol\\\";\\nimport \\\"../interfaces/ILayerZeroValidationLibrary.sol\\\";\\n\\ninterface IStargate {\\n // Stargate objects for abi encoding / decoding\\n struct SwapObj {\\n uint amount;\\n uint eqFee;\\n uint eqReward;\\n uint lpFee;\\n uint protocolFee;\\n uint lkbRemove;\\n }\\n\\n struct CreditObj {\\n uint credits;\\n uint idealBalance;\\n }\\n}\\n\\ncontract MPTValidator01 is ILayerZeroValidationLibrary, IValidationLibraryHelperV2 {\\n using RLPDecode for RLPDecode.RLPItem;\\n using RLPDecode for RLPDecode.Iterator;\\n\\n uint8 public proofType = 1;\\n uint8 public utilsVersion = 4;\\n bytes32 public constant PACKET_SIGNATURE = 0xe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82;\\n\\n address public immutable stargateBridgeAddress;\\n address public immutable stargateTokenAddress;\\n\\n constructor(address _stargateBridgeAddress, address _stargateTokenAddress) {\\n stargateBridgeAddress = _stargateBridgeAddress;\\n stargateTokenAddress = _stargateTokenAddress;\\n }\\n\\n function validateProof(\\n bytes32 _receiptsRoot,\\n bytes calldata _transactionProof,\\n uint _remoteAddressSize\\n ) external view override returns (LayerZeroPacket.Packet memory packet) {\\n require(_remoteAddressSize > 0, \\\"ProofLib: invalid address size\\\");\\n (bytes[] memory proof, uint[] memory receiptSlotIndex, uint logIndex) = abi.decode(\\n _transactionProof,\\n (bytes[], uint[], uint)\\n );\\n\\n ULNLog memory log = _getVerifiedLog(_receiptsRoot, receiptSlotIndex, logIndex, proof);\\n require(log.topicZeroSig == PACKET_SIGNATURE, \\\"ProofLib: packet not recognized\\\"); //data\\n\\n packet = LayerZeroPacket.getPacketV2(log.data, _remoteAddressSize, log.contractAddress);\\n\\n if (packet.dstAddress == stargateBridgeAddress) packet.payload = _secureStgPayload(packet.payload);\\n\\n if (packet.dstAddress == stargateTokenAddress) packet.payload = _secureStgTokenPayload(packet.payload);\\n\\n return packet;\\n }\\n\\n function _secureStgTokenPayload(bytes memory _payload) internal pure returns (bytes memory) {\\n (bytes memory toAddressBytes, uint qty) = abi.decode(_payload, (bytes, uint));\\n\\n address toAddress = address(0);\\n if (toAddressBytes.length > 0) {\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n }\\n\\n if (toAddress == address(0)) {\\n address deadAddress = address(0x000000000000000000000000000000000000dEaD);\\n bytes memory newToAddressBytes = abi.encodePacked(deadAddress);\\n return abi.encode(newToAddressBytes, qty);\\n }\\n\\n // default to return the original payload\\n return _payload;\\n }\\n\\n function _secureStgPayload(bytes memory _payload) internal view returns (bytes memory) {\\n // functionType is uint8 even though the encoding will take up the side of uint256\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(_payload, 32))\\n }\\n\\n // TYPE_SWAP_REMOTE == 1 && only if the payload has a payload\\n // only swapRemote inside of stargate can call sgReceive on an user supplied to address\\n // thus we do not care about the other type functions even if the toAddress is overly long.\\n if (functionType == 1) {\\n // decode the _payload with its types\\n (\\n ,\\n uint srcPoolId,\\n uint dstPoolId,\\n uint dstGasForCall,\\n IStargate.CreditObj memory c,\\n IStargate.SwapObj memory s,\\n bytes memory toAddressBytes,\\n bytes memory contractCallPayload\\n ) = abi.decode(_payload, (uint8, uint, uint, uint, IStargate.CreditObj, IStargate.SwapObj, bytes, bytes));\\n\\n // if contractCallPayload.length > 0 need to check if the to address is a contract or not\\n if (contractCallPayload.length > 0) {\\n // otherwise, need to check if the payload can be delivered to the toAddress\\n address toAddress = address(0);\\n if (toAddressBytes.length > 0) {\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n }\\n\\n // check if the toAddress is a contract. We are not concerned about addresses that pretend to be wallets. because worst case we just delete their payload if being malicious\\n // we can guarantee that if a size > 0, then the contract is definitely a contract address in this context\\n uint size;\\n assembly {\\n size := extcodesize(toAddress)\\n }\\n\\n if (size == 0) {\\n // size == 0 indicates its not a contract, payload wont be delivered\\n // secure the _payload to make sure funds can be delivered to the toAddress\\n bytes memory newToAddressBytes = abi.encodePacked(toAddress);\\n bytes memory securePayload = abi.encode(\\n functionType,\\n srcPoolId,\\n dstPoolId,\\n dstGasForCall,\\n c,\\n s,\\n newToAddressBytes,\\n bytes(\\\"\\\")\\n );\\n return securePayload;\\n }\\n }\\n }\\n\\n // default to return the original payload\\n return _payload;\\n }\\n\\n function secureStgTokenPayload(bytes memory _payload) external pure returns (bytes memory) {\\n return _secureStgTokenPayload(_payload);\\n }\\n\\n function secureStgPayload(bytes memory _payload) external view returns (bytes memory) {\\n return _secureStgPayload(_payload);\\n }\\n\\n function _getVerifiedLog(\\n bytes32 hashRoot,\\n uint[] memory paths,\\n uint logIndex,\\n bytes[] memory proof\\n ) internal pure returns (ULNLog memory) {\\n require(paths.length == proof.length, \\\"ProofLib: invalid proof size\\\");\\n require(proof.length > 0, \\\"ProofLib: proof size must > 0\\\");\\n RLPDecode.RLPItem memory item;\\n bytes memory proofBytes;\\n\\n for (uint i = 0; i < proof.length; i++) {\\n proofBytes = proof[i];\\n require(hashRoot == keccak256(proofBytes), \\\"ProofLib: invalid hashlink\\\");\\n item = RLPDecode.toRlpItem(proofBytes).safeGetItemByIndex(paths[i]);\\n if (i < proof.length - 1) hashRoot = bytes32(item.toUint());\\n }\\n\\n // burning status + gasUsed + logBloom\\n RLPDecode.RLPItem memory logItem = item.typeOffset().safeGetItemByIndex(3);\\n RLPDecode.Iterator memory it = logItem.safeGetItemByIndex(logIndex).iterator();\\n ULNLog memory log;\\n log.contractAddress = bytes32(it.next().toUint());\\n log.topicZeroSig = bytes32(it.next().safeGetItemByIndex(0).toUint());\\n log.data = it.next().toBytes();\\n\\n return log;\\n }\\n\\n function getUtilsVersion() external view override returns (uint8) {\\n return utilsVersion;\\n }\\n\\n function getProofType() external view override returns (uint8) {\\n return proofType;\\n }\\n\\n function getVerifyLog(\\n bytes32 hashRoot,\\n uint[] memory receiptSlotIndex,\\n uint logIndex,\\n bytes[] memory proof\\n ) external pure override returns (ULNLog memory) {\\n return _getVerifiedLog(hashRoot, receiptSlotIndex, logIndex, proof);\\n }\\n\\n function getPacket(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) external pure override returns (LayerZeroPacket.Packet memory) {\\n return LayerZeroPacket.getPacketV2(data, sizeOfSrcAddress, ulnAddress);\\n }\\n}\\n\",\"keccak256\":\"0xd8c78b4a9a9373cd1c8b647b52c7984367ef007c5fd3049b4cb1cd2abca8d8f1\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/Buffer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\n// https://github.com/ensdomains/buffer\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev A library for working with mutable byte buffers in Solidity.\\n *\\n * Byte buffers are mutable and expandable, and provide a variety of primitives\\n * for writing to them. At any time you can fetch a bytes object containing the\\n * current contents of the buffer. The bytes object should not be stored between\\n * operations, as it may change due to resizing of the buffer.\\n */\\nlibrary Buffer {\\n /**\\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\\n * a capacity. The capacity may be longer than the current value, in\\n * which case it can be extended without the need to allocate more memory.\\n */\\n struct buffer {\\n bytes buf;\\n uint capacity;\\n }\\n\\n /**\\n * @dev Initializes a buffer with an initial capacity.a co\\n * @param buf The buffer to initialize.\\n * @param capacity The number of bytes of space to allocate the buffer.\\n * @return The buffer, for chaining.\\n */\\n function init(buffer memory buf, uint capacity) internal pure returns (buffer memory) {\\n if (capacity % 32 != 0) {\\n capacity += 32 - (capacity % 32);\\n }\\n // Allocate space for the buffer data\\n buf.capacity = capacity;\\n assembly {\\n let ptr := mload(0x40)\\n mstore(buf, ptr)\\n mstore(ptr, 0)\\n mstore(0x40, add(32, add(ptr, capacity)))\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param off The start offset to write to.\\n * @param rawData The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function writeRawBytes(\\n buffer memory buf,\\n uint off,\\n bytes memory rawData,\\n uint offData,\\n uint len\\n ) internal pure returns (buffer memory) {\\n if (off + len > buf.capacity) {\\n resize(buf, max(buf.capacity, len + off) * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(add(len, off), buflen) {\\n mstore(bufptr, add(len, off))\\n }\\n src := add(rawData, offData)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param off The start offset to write to.\\n * @param data The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns (buffer memory) {\\n require(len <= data.length);\\n\\n if (off + len > buf.capacity) {\\n resize(buf, max(buf.capacity, len + off) * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(add(len, off), buflen) {\\n mstore(bufptr, add(len, off))\\n }\\n src := add(data, 32)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n\\n return buf;\\n }\\n\\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\\n return write(buf, buf.buf.length, data, data.length);\\n }\\n\\n function resize(buffer memory buf, uint capacity) private pure {\\n bytes memory oldbuf = buf.buf;\\n init(buf, capacity);\\n append(buf, oldbuf);\\n }\\n\\n function max(uint a, uint b) private pure returns (uint) {\\n if (a > b) {\\n return a;\\n }\\n return b;\\n }\\n}\\n\",\"keccak256\":\"0x6fb6ba1e85708e05e0f2181136650463faca122318dd16aa6cbaa4f88e48d908\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/LayerZeroPacket.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./Buffer.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nlibrary LayerZeroPacket {\\n using Buffer for Buffer.buffer;\\n using SafeMath for uint;\\n\\n struct Packet {\\n uint16 srcChainId;\\n uint16 dstChainId;\\n uint64 nonce;\\n address dstAddress;\\n bytes srcAddress;\\n bytes32 ulnAddress;\\n bytes payload;\\n }\\n\\n function getPacket(\\n bytes memory data,\\n uint16 srcChain,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n uint16 dstChainId;\\n address dstAddress;\\n uint size;\\n uint64 nonce;\\n\\n // The log consists of the destination chain id and then a bytes payload\\n // 0--------------------------------------------31\\n // 0 | total bytes size\\n // 32 | destination chain id\\n // 64 | bytes offset\\n // 96 | bytes array size\\n // 128 | payload\\n assembly {\\n dstChainId := mload(add(data, 32))\\n size := mload(add(data, 96)) /// size of the byte array\\n nonce := mload(add(data, 104)) // offset to convert to uint64 128 is index -24\\n dstAddress := mload(add(data, sub(add(128, sizeOfSrcAddress), 4))) // offset to convert to address 12 -8\\n }\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 136, sizeOfSrcAddress); // 128 + 8\\n\\n uint payloadSize = size.sub(28).sub(sizeOfSrcAddress);\\n Buffer.buffer memory payloadBuffer;\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, sizeOfSrcAddress.add(156), payloadSize); // 148 + 8\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChainId,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n\\n function getPacketV2(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n // packet def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);\\n // data def: abi.encode(packet) = offset(32) + length(32) + packet\\n // if from EVM\\n // 0 - 31 0 - 31 | total bytes size\\n // 32 - 63 32 - 63 | location\\n // 64 - 95 64 - 95 | size of the packet\\n // 96 - 103 96 - 103 | nonce\\n // 104 - 105 104 - 105 | srcChainId\\n // 106 - P 106 - 125 | srcAddress, where P = 106 + sizeOfSrcAddress - 1,\\n // P+1 - P+2 126 - 127 | dstChainId\\n // P+3 - P+22 128 - 147 | dstAddress\\n // P+23 - END 148 - END | payload\\n\\n // decode the packet\\n uint256 realSize;\\n uint64 nonce;\\n uint16 srcChain;\\n uint16 dstChain;\\n address dstAddress;\\n assembly {\\n realSize := mload(add(data, 64))\\n nonce := mload(add(data, 72)) // 104 - 32\\n srcChain := mload(add(data, 74)) // 106 - 32\\n dstChain := mload(add(data, add(76, sizeOfSrcAddress))) // P + 3 - 32 = 105 + size + 3 - 32 = 76 + size\\n dstAddress := mload(add(data, add(96, sizeOfSrcAddress))) // P + 23 - 32 = 105 + size + 23 - 32 = 96 + size\\n }\\n\\n require(srcChain != 0, \\\"LayerZeroPacket: invalid packet\\\");\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 106, sizeOfSrcAddress);\\n\\n uint nonPayloadSize = sizeOfSrcAddress.add(32); // 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20\\n uint payloadSize = realSize.sub(nonPayloadSize);\\n Buffer.buffer memory payloadBuffer;\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(96), payloadSize);\\n\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChain,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n\\n function getPacketV3(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n // data def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);\\n // if from EVM\\n // 0 - 31 0 - 31 | total bytes size\\n // 32 - 39 32 - 39 | nonce\\n // 40 - 41 40 - 41 | srcChainId\\n // 42 - P 42 - 61 | srcAddress, where P = 41 + sizeOfSrcAddress,\\n // P+1 - P+2 62 - 63 | dstChainId\\n // P+3 - P+22 64 - 83 | dstAddress\\n // P+23 - END 84 - END | payload\\n\\n // decode the packet\\n uint256 realSize = data.length;\\n uint nonPayloadSize = sizeOfSrcAddress.add(32); // 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20\\n require(realSize >= nonPayloadSize, \\\"LayerZeroPacket: invalid packet\\\");\\n uint payloadSize = realSize - nonPayloadSize;\\n\\n uint64 nonce;\\n uint16 srcChain;\\n uint16 dstChain;\\n address dstAddress;\\n assembly {\\n nonce := mload(add(data, 8)) // 40 - 32\\n srcChain := mload(add(data, 10)) // 42 - 32\\n dstChain := mload(add(data, add(12, sizeOfSrcAddress))) // P + 3 - 32 = 41 + size + 3 - 32 = 12 + size\\n dstAddress := mload(add(data, add(32, sizeOfSrcAddress))) // P + 23 - 32 = 41 + size + 23 - 32 = 32 + size\\n }\\n\\n require(srcChain != 0, \\\"LayerZeroPacket: invalid packet\\\");\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 42, sizeOfSrcAddress);\\n\\n Buffer.buffer memory payloadBuffer;\\n if (payloadSize > 0) {\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(32), payloadSize);\\n }\\n\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChain,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf96248293a8bb6e9a3908ac7eb78dfb794bb197a5743d377905fe771911d2192\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/RLPDecode.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\n// https://github.com/hamdiallam/solidity-rlp\\n\\npragma solidity ^0.7.0;\\n\\nlibrary RLPDecode {\\n uint8 constant STRING_SHORT_START = 0x80;\\n uint8 constant STRING_LONG_START = 0xb8;\\n uint8 constant LIST_SHORT_START = 0xc0;\\n uint8 constant LIST_LONG_START = 0xf8;\\n uint8 constant WORD_SIZE = 32;\\n\\n struct RLPItem {\\n uint len;\\n uint memPtr;\\n }\\n\\n struct Iterator {\\n RLPItem item; // Item that's being iterated over.\\n uint nextPtr; // Position of the next item in the list.\\n }\\n\\n /*\\n * @dev Returns the next element in the iteration. Reverts if it has not next element.\\n * @param self The iterator.\\n * @return The next element in the iteration.\\n */\\n function next(Iterator memory self) internal pure returns (RLPItem memory) {\\n require(hasNext(self), \\\"RLPDecoder iterator has no next\\\");\\n\\n uint ptr = self.nextPtr;\\n uint itemLength = _itemLength(ptr);\\n self.nextPtr = ptr + itemLength;\\n\\n return RLPItem(itemLength, ptr);\\n }\\n\\n /*\\n * @dev Returns true if the iteration has more elements.\\n * @param self The iterator.\\n * @return true if the iteration has more elements.\\n */\\n function hasNext(Iterator memory self) internal pure returns (bool) {\\n RLPItem memory item = self.item;\\n return self.nextPtr < item.memPtr + item.len;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n\\n function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {\\n uint memPtr;\\n assembly {\\n memPtr := add(item, 0x20)\\n }\\n // offset the pointer if the first byte\\n\\n uint8 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n uint len = item.length;\\n if (len > 0 && byte0 < LIST_SHORT_START) {\\n assembly {\\n memPtr := add(memPtr, 0x01)\\n }\\n len -= 1;\\n }\\n return RLPItem(len, memPtr);\\n }\\n\\n /*\\n * @dev Create an iterator. Reverts if item is not a list.\\n * @param self The RLP item.\\n * @return An 'Iterator' over the item.\\n */\\n function iterator(RLPItem memory self) internal pure returns (Iterator memory) {\\n require(isList(self), \\\"RLPDecoder iterator is not list\\\");\\n\\n uint ptr = self.memPtr + _payloadOffset(self.memPtr);\\n return Iterator(self, ptr);\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function rlpLen(RLPItem memory item) internal pure returns (uint) {\\n return item.len;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function payloadLen(RLPItem memory item) internal pure returns (uint) {\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid uint RLP item offset size\\\");\\n return item.len - offset;\\n }\\n\\n /*\\n * @param item RLP encoded list in bytes\\n */\\n function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n\\n uint items = numItems(item);\\n RLPItem[] memory result = new RLPItem[](items);\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < items; i++) {\\n dataLen = _itemLength(memPtr);\\n result[i] = RLPItem(dataLen, memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n\\n return result;\\n }\\n\\n /*\\n * @param get the RLP item by index. save gas.\\n */\\n function getItemByIndex(RLPItem memory item, uint idx) internal pure returns (RLPItem memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < idx; i++) {\\n dataLen = _itemLength(memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n dataLen = _itemLength(memPtr);\\n return RLPItem(dataLen, memPtr);\\n }\\n\\n /*\\n * @param get the RLP item by index. save gas.\\n */\\n function safeGetItemByIndex(RLPItem memory item, uint idx) internal pure returns (RLPItem memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n require(idx < numItems(item), \\\"RLP item out of bounds\\\");\\n uint endPtr = item.memPtr + item.len;\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < idx; i++) {\\n dataLen = _itemLength(memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n dataLen = _itemLength(memPtr);\\n\\n require(memPtr + dataLen <= endPtr, \\\"RLP item overflow\\\");\\n return RLPItem(dataLen, memPtr);\\n }\\n\\n /*\\n * @param offset the receipt bytes item\\n */\\n function typeOffset(RLPItem memory item) internal pure returns (RLPItem memory) {\\n uint offset = _payloadOffset(item.memPtr);\\n uint8 byte0;\\n uint memPtr = item.memPtr;\\n uint len = item.len;\\n assembly {\\n memPtr := add(memPtr, offset)\\n byte0 := byte(0, mload(memPtr))\\n }\\n if (len > 0 && byte0 < LIST_SHORT_START) {\\n assembly {\\n memPtr := add(memPtr, 0x01)\\n }\\n len -= 1;\\n }\\n return RLPItem(len, memPtr);\\n }\\n\\n // @return indicator whether encoded payload is a list. negate this function call for isData.\\n function isList(RLPItem memory item) internal pure returns (bool) {\\n if (item.len == 0) return false;\\n\\n uint8 byte0;\\n uint memPtr = item.memPtr;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < LIST_SHORT_START) return false;\\n return true;\\n }\\n\\n /** RLPItem conversions into data types **/\\n\\n // @returns raw rlp encoding in bytes\\n function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n bytes memory result = new bytes(item.len);\\n if (result.length == 0) return result;\\n\\n uint ptr;\\n assembly {\\n ptr := add(0x20, result)\\n }\\n\\n copy(item.memPtr, ptr, item.len);\\n return result;\\n }\\n\\n // any non-zero byte except \\\"0x80\\\" is considered true\\n function toBoolean(RLPItem memory item) internal pure returns (bool) {\\n require(item.len == 1, \\\"RLPDecoder toBoolean invalid length\\\");\\n uint result;\\n uint memPtr = item.memPtr;\\n assembly {\\n result := byte(0, mload(memPtr))\\n }\\n\\n // SEE Github Issue #5.\\n // Summary: Most commonly used RLP libraries (i.e Geth) will encode\\n // \\\"0\\\" as \\\"0x80\\\" instead of as \\\"0\\\". We handle this edge case explicitly\\n // here.\\n if (result == 0 || result == STRING_SHORT_START) {\\n return false;\\n } else {\\n return true;\\n }\\n }\\n\\n function toAddress(RLPItem memory item) internal pure returns (address) {\\n // 1 byte for the length prefix\\n require(item.len == 21, \\\"RLPDecoder toAddress invalid length\\\");\\n\\n return address(toUint(item));\\n }\\n\\n function toUint(RLPItem memory item) internal pure returns (uint) {\\n require(item.len > 0 && item.len <= 33, \\\"RLPDecoder toUint invalid length\\\");\\n\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid RLP item offset size\\\");\\n uint len = item.len - offset;\\n\\n uint result;\\n uint memPtr = item.memPtr + offset;\\n assembly {\\n result := mload(memPtr)\\n\\n // shift to the correct location if necessary\\n if lt(len, 32) {\\n result := div(result, exp(256, sub(32, len)))\\n }\\n }\\n\\n return result;\\n }\\n\\n // enforces 32 byte length\\n function toUintStrict(RLPItem memory item) internal pure returns (uint) {\\n // one byte prefix\\n require(item.len == 33, \\\"RLPDecoder toUintStrict invalid length\\\");\\n\\n uint result;\\n uint memPtr = item.memPtr + 1;\\n assembly {\\n result := mload(memPtr)\\n }\\n\\n return result;\\n }\\n\\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n require(item.len > 0, \\\"RLPDecoder toBytes invalid length\\\");\\n\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid RLP item offset size\\\");\\n uint len = item.len - offset; // data length\\n bytes memory result = new bytes(len);\\n\\n uint destPtr;\\n assembly {\\n destPtr := add(0x20, result)\\n }\\n\\n copy(item.memPtr + offset, destPtr, len);\\n return result;\\n }\\n\\n /*\\n * Private Helpers\\n */\\n\\n // @return number of payload items inside an encoded list.\\n function numItems(RLPItem memory item) internal pure returns (uint) {\\n if (item.len == 0) return 0;\\n\\n uint count = 0;\\n uint currPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint endPtr = item.memPtr + item.len;\\n while (currPtr < endPtr) {\\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\\n count++;\\n }\\n\\n return count;\\n }\\n\\n // @return entire rlp item byte length\\n function _itemLength(uint memPtr) private pure returns (uint) {\\n uint itemLen;\\n uint byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) itemLen = 1;\\n else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;\\n else if (byte0 < LIST_SHORT_START) {\\n assembly {\\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\\n memPtr := add(memPtr, 1) // skip over the first byte\\n\\n /* 32 byte word size */\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n } else if (byte0 < LIST_LONG_START) {\\n itemLen = byte0 - LIST_SHORT_START + 1;\\n } else {\\n assembly {\\n let byteLen := sub(byte0, 0xf7)\\n memPtr := add(memPtr, 1)\\n\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n }\\n\\n return itemLen;\\n }\\n\\n // @return number of bytes until the data\\n function _payloadOffset(uint memPtr) private pure returns (uint) {\\n uint byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) return 0;\\n else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;\\n else if (byte0 < LIST_SHORT_START)\\n // being explicit\\n return byte0 - (STRING_LONG_START - 1) + 1;\\n else return byte0 - (LIST_LONG_START - 1) + 1;\\n }\\n\\n /*\\n * @param src Pointer to source\\n * @param dest Pointer to destination\\n * @param len Amount of memory to copy from the source\\n */\\n function copy(uint src, uint dest, uint len) private pure {\\n if (len == 0) return;\\n\\n // copy as many word sizes as possible\\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += WORD_SIZE;\\n dest += WORD_SIZE;\\n }\\n\\n // left over bytes. Mask is used to remove unwanted bytes from the word\\n uint mask = 256 ** (WORD_SIZE - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask)) // zero out src\\n let destpart := and(mload(dest), mask) // retrieve the bytes\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf75683c1b2c5029a6cf47eab2dcc23d9fe70a08f3b76c9eb9e7efbfe660958c6\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/UltraLightNodeEVMDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"./RLPDecode.sol\\\";\\n\\nlibrary UltraLightNodeEVMDecoder {\\n using RLPDecode for RLPDecode.RLPItem;\\n using RLPDecode for RLPDecode.Iterator;\\n\\n struct Log {\\n address contractAddress;\\n bytes32 topicZero;\\n bytes data;\\n }\\n\\n function getReceiptLog(bytes memory data, uint logIndex) internal pure returns (Log memory) {\\n RLPDecode.Iterator memory it = RLPDecode.toRlpItem(data).iterator();\\n uint idx;\\n while (it.hasNext()) {\\n if (idx == 3) {\\n return toReceiptLog(it.next().getItemByIndex(logIndex).toRlpBytes());\\n } else it.next();\\n idx++;\\n }\\n revert(\\\"no log index in receipt\\\");\\n }\\n\\n function toReceiptLog(bytes memory data) internal pure returns (Log memory) {\\n RLPDecode.Iterator memory it = RLPDecode.toRlpItem(data).iterator();\\n Log memory log;\\n\\n uint idx;\\n while (it.hasNext()) {\\n if (idx == 0) {\\n log.contractAddress = it.next().toAddress();\\n } else if (idx == 1) {\\n RLPDecode.RLPItem memory item = it.next().getItemByIndex(0);\\n log.topicZero = bytes32(item.toUint());\\n } else if (idx == 2) log.data = it.next().toBytes();\\n else it.next();\\n idx++;\\n }\\n return log;\\n }\\n}\\n\",\"keccak256\":\"0xa5a921e346276438893241fb9719b074bed6e215d37e372f91b2712cb9f46567\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
356
- "bytecode": "0x60c060405260008054600160ff199091161761ff0019166104001790553480156200002957600080fd5b5060405162001e5238038062001e528339810160408190526200004c9162000088565b6001600160601b0319606092831b8116608052911b1660a052620000bf565b80516001600160a01b03811681146200008357600080fd5b919050565b600080604083850312156200009b578182fd5b620000a6836200006b565b9150620000b6602084016200006b565b90509250929050565b60805160601c60a05160601c611d5f620000f360003980610373528061041c52508061022b52806103085250611d5f6000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639bcd850f11610081578063d633ad611161005b578063d633ad61146101a4578063e965c192146101ac578063ea455df9146101b4576100d4565b80639bcd850f14610174578063b71e0f711461017c578063be9d395e1461018f576100d4565b806347713b39116100b257806347713b39146101375780635711c2a81461013f5780636348d2691461015f576100d4565b806305af5d35146100d95780630f222e65146100f75780632ff2044914610117575b600080fd5b6100e16101c7565b6040516100ee9190611b7f565b60405180910390f35b61010a61010536600461166f565b6101d0565b6040516100ee9190611b50565b61012a6101253660046117d8565b6101ed565b6040516100ee9190611ac9565b6100e1610208565b61015261014d366004611760565b610216565b6040516100ee9190611981565b610167610229565b6040516100ee9190611957565b6100e161024d565b61012a61018a3660046116e3565b610256565b6101976103e8565b6040516100ee9190611978565b6100e161040c565b61016761041a565b6101526101c2366004611760565b61043e565b60005460ff1681565b6101d8611349565b6101e485858585610449565b95945050505050565b6101f5611368565b6102008484846105aa565b949350505050565b600054610100900460ff1681565b6060610221826106ff565b90505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460ff1690565b61025e611368565b600082116102875760405162461bcd60e51b815260040161027e90611a92565b60405180910390fd5b6000808061029786880188611605565b92509250925060006102ab89848487610449565b60208101519091507fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82146102f15760405162461bcd60e51b815260040161027e90611a24565b61030481604001518783600001516105aa565b94507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103715761036b8560c001516106ff565b60c08601525b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103dc576103d68560c001516107e4565b60c08601525b50505050949350505050565b7fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8281565b600054610100900460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610221826107e4565b610451611349565b81518451146104725760405162461bcd60e51b815260040161027e906119b6565b60008251116104935760405162461bcd60e51b815260040161027e90611a5b565b61049b6113a6565b606060005b845181101561052d578481815181106104b557fe5b60200260200101519150818051906020012088146104e55760405162461bcd60e51b815260040161027e906119ed565b61050b8782815181106104f457fe5b60200260200101516105058461088e565b90610902565b925060018551038110156105255761052283610a70565b97505b6001016104a0565b50600061053e600361050585610b59565b9050600061055461054f8389610902565b610be5565b905061055e611349565b61056f61056a83610c77565b610a70565b815261058261056a600061050585610c77565b602082015261059861059383610c77565b610d0d565b60408201529998505050505050505050565b6105b2611368565b60408401516048850151604a860151858701604c81015160609091015161ffff8316610625576040805162461bcd60e51b815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b61062d6113c0565b610637818a610e06565b506106478160008c606a8d610e40565b5060006106558a6020610efc565b905060006106638883610f5d565b905061066d6113c0565b6106778183610e06565b5061069360008e610689866060610efc565b8492919086610e40565b506040805160e08101825261ffff988916815296909716602087015267ffffffffffffffff909716958501959095525073ffffffffffffffffffffffffffffffffffffffff909116606083015251608082015260a08101869052915160c0830152509150509392505050565b6020810151606090600160ff821614156107dd576000806000806000806000898060200190518101906107329190611824565b9750975097509750975097509750506000815111156107d55781516000901561075c575060148201515b803b806107d2576000826040516020016107769190611927565b60408051601f19818403018152602083810183526000808552925191945091926107ae928f928f928f928f928f928f928b9201611b8d565b60408051601f198184030181529190529c506102249b505050505050505050505050565b50505b505050505050505b5090919050565b6060600080838060200190518101906107fd9190611793565b9150915060008083511115610813575060148201515b73ffffffffffffffffffffffffffffffffffffffff81166108855760405161dead90600090610846908390602001611927565b6040516020818303038152906040529050808460405160200161086a929190611994565b60405160208183030381529060405295505050505050610224565b50929392505050565b6108966113a6565b602082018051835160009190911a9080158015906108b7575060c060ff8316105b156108e657600192909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b6040805180820190915290815260208101929092525092915050565b61090a6113a6565b61091383610fba565b61094e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611ce86021913960400191505060405180910390fd5b61095783610ff4565b82106109aa576040805162461bcd60e51b815260206004820152601660248201527f524c50206974656d206f7574206f6620626f756e647300000000000000000000604482015290519081900360640190fd5b82516020840151908101906000906109c19061104c565b60208601510190506000805b858110156109ec576109de836110eb565b9283019291506001016109cd565b506109f6826110eb565b9050828183011115610a4f576040805162461bcd60e51b815260206004820152601160248201527f524c50206974656d206f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b60405180604001604052808281526020018381525093505050505b92915050565b805160009015801590610a8557508151602110155b610ad6576040805162461bcd60e51b815260206004820181905260248201527f524c504465636f64657220746f55696e7420696e76616c6964206c656e677468604482015290519081900360640190fd5b6000610ae5836020015161104c565b90508083600001511015610b2a5760405162461bcd60e51b8152600401808060200182810382526028815260200180611cc06028913960400191505060405180910390fd5b825160208085015183018051928490039291831015610b5057826020036101000a820491505b50949350505050565b610b616113a6565b6000610b70836020015161104c565b60208401518451908201805192935060009290921a91908015801590610b99575060c060ff8416105b15610bc857600191909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604080518082019091529081526020810191909152949350505050565b610bed6113da565b610bf682610fba565b610c47576040805162461bcd60e51b815260206004820152601f60248201527f524c504465636f646572206974657261746f72206973206e6f74206c69737400604482015290519081900360640190fd5b6000610c56836020015161104c565b60208085015160408051808201909152868152920190820152915050919050565b610c7f6113a6565b610c88826111c0565b610cd9576040805162461bcd60e51b815260206004820152601f60248201527f524c504465636f646572206974657261746f7220686173206e6f206e65787400604482015290519081900360640190fd5b60208201516000610ce9826110eb565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610d4d5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d096021913960400191505060405180910390fd5b6000610d5c836020015161104c565b90508083600001511015610da15760405162461bcd60e51b8152600401808060200182810382526028815260200180611cc06028913960400191505060405180910390fd5b825181900360008167ffffffffffffffff81118015610dbf57600080fd5b506040519080825280601f01601f191660200182016040528015610dea576020820181803683370190505b5090506000816020019050610b508487602001510182856111d5565b610e0e6113c0565b6020820615610e235760208206602003820191505b506020828101829052604080518085526000815290920101905290565b610e486113c0565b85602001518286011115610e7257610e7286610e6a886020015188860161123e565b600202611255565b600080875180518860208301019350808987011115610e915788860182525b5050508484015b60208410610eb75780518252601f199093019260209182019101610e98565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a01908116901991909116179052508495945050505050565b600082820183811015610f56576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082821115610fb4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8051600090610fcb57506000610224565b6020820151805160001a9060c0821015610fea57600092505050610224565b5060019392505050565b805160009061100557506000610224565b600080611015846020015161104c565b602085015185519181019250015b8082101561104357611034826110eb565b60019093019290910190611023565b50909392505050565b8051600090811a6080811015611066576000915050610224565b60b8811080611081575060c08110801590611081575060f881105b15611090576001915050610224565b60c08110156110c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a019050610224565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a019050610224565b80516000908190811a608081101561110657600191506111b9565b60b8811015611139577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81810191506111b9565b60c08110156111665760b78103600185019450806020036101000a855104600182018101935050506111b9565b60f8811015611199577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41810191506111b9565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80518051602091820151919092015191011190565b806111df57611239565b5b602081106111ff578251825260209283019290910190601f19016111e0565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b60008183111561124f575081610a6a565b50919050565b81516112618383610e06565b5061126c8382611272565b50505050565b61127a6113c0565b610f568384600001515184855161128f6113c0565b825182111561129d57600080fd5b846020015182850111156112bf576112bf85610e6a876020015187860161123e565b6000808651805187602083010193508088870111156112de5787860182525b505050602084015b602084106113055780518252601f1990930192602091820191016112e6565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a019081169019919091161790525083949350505050565b6040805160608082018352600080835260208301529181019190915290565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b604051806040016040528060008152602001600081525090565b604051806040016040528060608152602001600081525090565b60405180604001604052806113ed6113a6565b8152602001600081525090565b600082601f83011261140a578081fd5b8135602061141f61141a83611c53565b611c2f565b82815281810190858301855b8581101561145457611442898684358b01016114bb565b8452928401929084019060010161142b565b5090979650505050505050565b600082601f830112611471578081fd5b8135602061148161141a83611c53565b828152818101908583018385028701840188101561149d578586fd5b855b858110156114545781358452928401929084019060010161149f565b600082601f8301126114cb578081fd5b81356114d961141a82611c71565b8181528460208386010111156114ed578283fd5b816020850160208301379081016020019190915292915050565b600082601f830112611517578081fd5b815161152561141a82611c71565b818152846020838601011115611539578283fd5b610200826020830160208701611c93565b60006040828403121561155b578081fd5b6040516040810181811067ffffffffffffffff8211171561157857fe5b604052825181526020928301519281019290925250919050565b600060c082840312156115a3578081fd5b60405160c0810181811067ffffffffffffffff821117156115c057fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600080600060608486031215611619578283fd5b833567ffffffffffffffff80821115611630578485fd5b61163c878388016113fa565b94506020860135915080821115611651578384fd5b5061165e86828701611461565b925050604084013590509250925092565b60008060008060808587031215611684578081fd5b84359350602085013567ffffffffffffffff808211156116a2578283fd5b6116ae88838901611461565b94506040870135935060608701359150808211156116ca578283fd5b506116d7878288016113fa565b91505092959194509250565b600080600080606085870312156116f8578384fd5b84359350602085013567ffffffffffffffff80821115611716578485fd5b818701915087601f830112611729578485fd5b813581811115611737578586fd5b886020828501011115611748578586fd5b95986020929092019750949560400135945092505050565b600060208284031215611771578081fd5b813567ffffffffffffffff811115611787578182fd5b610200848285016114bb565b600080604083850312156117a5578182fd5b825167ffffffffffffffff8111156117bb578283fd5b6117c785828601611507565b925050602083015190509250929050565b6000806000606084860312156117ec578283fd5b833567ffffffffffffffff811115611802578384fd5b61180e868287016114bb565b9660208601359650604090950135949350505050565b6000806000806000806000806101c0898b031215611840578586fd5b885160ff81168114611850578687fd5b809850506020890151965060408901519550606089015194506118768a60808b0161154a565b93506118858a60c08b01611592565b925061018089015167ffffffffffffffff808211156118a2578384fd5b6118ae8c838d01611507565b93506101a08b01519150808211156118c4578283fd5b506118d18b828c01611507565b9150509295985092959890939650565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611913816020860160208601611c93565b601f01601f19169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b600060208252610f5660208301846118fb565b6000604082526119a760408301856118fb565b90508260208301529392505050565b6020808252601c908201527f50726f6f664c69623a20696e76616c69642070726f6f662073697a6500000000604082015260600190565b6020808252601a908201527f50726f6f664c69623a20696e76616c696420686173686c696e6b000000000000604082015260600190565b6020808252601f908201527f50726f6f664c69623a207061636b6574206e6f74207265636f676e697a656400604082015260600190565b6020808252601d908201527f50726f6f664c69623a2070726f6f662073697a65206d757374203e2030000000604082015260600190565b6020808252601e908201527f50726f6f664c69623a20696e76616c696420616464726573732073697a650000604082015260600190565b60006020825261ffff8084511660208401528060208501511660408401525067ffffffffffffffff60408401511660608301526060830151611b0e60808401826118e1565b50608083015160e060a0840152611b296101008401826118fb565b905060a084015160c084015260c0840151601f198483030160e08501526101e482826118fb565b6000602082528251602083015260208301516040830152604083015160608084015261020060808401826118fb565b60ff91909116815260200190565b60006101c060ff8b16835289602084015288604084015287606084015286516080840152602087015160a0840152855160c0840152602086015160e084015260408601516101008401526060860151610120840152608086015161014084015260a086015161016084015280610180840152611c0b818401866118fb565b90508281036101a0840152611c2081856118fb565b9b9a5050505050505050505050565b60405181810167ffffffffffffffff81118282101715611c4b57fe5b604052919050565b600067ffffffffffffffff821115611c6757fe5b5060209081020190565b600067ffffffffffffffff821115611c8557fe5b50601f01601f191660200190565b60005b83811015611cae578181015183820152602001611c96565b8381111561126c575050600091015256fe524c504465636f6465723a20696e76616c696420524c50206974656d206f66667365742073697a65524c504465636f646572206974657261746f72206973206e6f742061206c697374524c504465636f64657220746f427974657320696e76616c6964206c656e677468a2646970667358221220106f7d50599a8a4577b48aeaf7160923ff702f6336e36ff3611dc5f5806ccf2664736f6c63430007060033",
357
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639bcd850f11610081578063d633ad611161005b578063d633ad61146101a4578063e965c192146101ac578063ea455df9146101b4576100d4565b80639bcd850f14610174578063b71e0f711461017c578063be9d395e1461018f576100d4565b806347713b39116100b257806347713b39146101375780635711c2a81461013f5780636348d2691461015f576100d4565b806305af5d35146100d95780630f222e65146100f75780632ff2044914610117575b600080fd5b6100e16101c7565b6040516100ee9190611b7f565b60405180910390f35b61010a61010536600461166f565b6101d0565b6040516100ee9190611b50565b61012a6101253660046117d8565b6101ed565b6040516100ee9190611ac9565b6100e1610208565b61015261014d366004611760565b610216565b6040516100ee9190611981565b610167610229565b6040516100ee9190611957565b6100e161024d565b61012a61018a3660046116e3565b610256565b6101976103e8565b6040516100ee9190611978565b6100e161040c565b61016761041a565b6101526101c2366004611760565b61043e565b60005460ff1681565b6101d8611349565b6101e485858585610449565b95945050505050565b6101f5611368565b6102008484846105aa565b949350505050565b600054610100900460ff1681565b6060610221826106ff565b90505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460ff1690565b61025e611368565b600082116102875760405162461bcd60e51b815260040161027e90611a92565b60405180910390fd5b6000808061029786880188611605565b92509250925060006102ab89848487610449565b60208101519091507fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82146102f15760405162461bcd60e51b815260040161027e90611a24565b61030481604001518783600001516105aa565b94507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103715761036b8560c001516106ff565b60c08601525b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103dc576103d68560c001516107e4565b60c08601525b50505050949350505050565b7fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8281565b600054610100900460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610221826107e4565b610451611349565b81518451146104725760405162461bcd60e51b815260040161027e906119b6565b60008251116104935760405162461bcd60e51b815260040161027e90611a5b565b61049b6113a6565b606060005b845181101561052d578481815181106104b557fe5b60200260200101519150818051906020012088146104e55760405162461bcd60e51b815260040161027e906119ed565b61050b8782815181106104f457fe5b60200260200101516105058461088e565b90610902565b925060018551038110156105255761052283610a70565b97505b6001016104a0565b50600061053e600361050585610b59565b9050600061055461054f8389610902565b610be5565b905061055e611349565b61056f61056a83610c77565b610a70565b815261058261056a600061050585610c77565b602082015261059861059383610c77565b610d0d565b60408201529998505050505050505050565b6105b2611368565b60408401516048850151604a860151858701604c81015160609091015161ffff8316610625576040805162461bcd60e51b815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b61062d6113c0565b610637818a610e06565b506106478160008c606a8d610e40565b5060006106558a6020610efc565b905060006106638883610f5d565b905061066d6113c0565b6106778183610e06565b5061069360008e610689866060610efc565b8492919086610e40565b506040805160e08101825261ffff988916815296909716602087015267ffffffffffffffff909716958501959095525073ffffffffffffffffffffffffffffffffffffffff909116606083015251608082015260a08101869052915160c0830152509150509392505050565b6020810151606090600160ff821614156107dd576000806000806000806000898060200190518101906107329190611824565b9750975097509750975097509750506000815111156107d55781516000901561075c575060148201515b803b806107d2576000826040516020016107769190611927565b60408051601f19818403018152602083810183526000808552925191945091926107ae928f928f928f928f928f928f928b9201611b8d565b60408051601f198184030181529190529c506102249b505050505050505050505050565b50505b505050505050505b5090919050565b6060600080838060200190518101906107fd9190611793565b9150915060008083511115610813575060148201515b73ffffffffffffffffffffffffffffffffffffffff81166108855760405161dead90600090610846908390602001611927565b6040516020818303038152906040529050808460405160200161086a929190611994565b60405160208183030381529060405295505050505050610224565b50929392505050565b6108966113a6565b602082018051835160009190911a9080158015906108b7575060c060ff8316105b156108e657600192909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b6040805180820190915290815260208101929092525092915050565b61090a6113a6565b61091383610fba565b61094e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611ce86021913960400191505060405180910390fd5b61095783610ff4565b82106109aa576040805162461bcd60e51b815260206004820152601660248201527f524c50206974656d206f7574206f6620626f756e647300000000000000000000604482015290519081900360640190fd5b82516020840151908101906000906109c19061104c565b60208601510190506000805b858110156109ec576109de836110eb565b9283019291506001016109cd565b506109f6826110eb565b9050828183011115610a4f576040805162461bcd60e51b815260206004820152601160248201527f524c50206974656d206f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b60405180604001604052808281526020018381525093505050505b92915050565b805160009015801590610a8557508151602110155b610ad6576040805162461bcd60e51b815260206004820181905260248201527f524c504465636f64657220746f55696e7420696e76616c6964206c656e677468604482015290519081900360640190fd5b6000610ae5836020015161104c565b90508083600001511015610b2a5760405162461bcd60e51b8152600401808060200182810382526028815260200180611cc06028913960400191505060405180910390fd5b825160208085015183018051928490039291831015610b5057826020036101000a820491505b50949350505050565b610b616113a6565b6000610b70836020015161104c565b60208401518451908201805192935060009290921a91908015801590610b99575060c060ff8416105b15610bc857600191909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604080518082019091529081526020810191909152949350505050565b610bed6113da565b610bf682610fba565b610c47576040805162461bcd60e51b815260206004820152601f60248201527f524c504465636f646572206974657261746f72206973206e6f74206c69737400604482015290519081900360640190fd5b6000610c56836020015161104c565b60208085015160408051808201909152868152920190820152915050919050565b610c7f6113a6565b610c88826111c0565b610cd9576040805162461bcd60e51b815260206004820152601f60248201527f524c504465636f646572206974657261746f7220686173206e6f206e65787400604482015290519081900360640190fd5b60208201516000610ce9826110eb565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610d4d5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d096021913960400191505060405180910390fd5b6000610d5c836020015161104c565b90508083600001511015610da15760405162461bcd60e51b8152600401808060200182810382526028815260200180611cc06028913960400191505060405180910390fd5b825181900360008167ffffffffffffffff81118015610dbf57600080fd5b506040519080825280601f01601f191660200182016040528015610dea576020820181803683370190505b5090506000816020019050610b508487602001510182856111d5565b610e0e6113c0565b6020820615610e235760208206602003820191505b506020828101829052604080518085526000815290920101905290565b610e486113c0565b85602001518286011115610e7257610e7286610e6a886020015188860161123e565b600202611255565b600080875180518860208301019350808987011115610e915788860182525b5050508484015b60208410610eb75780518252601f199093019260209182019101610e98565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a01908116901991909116179052508495945050505050565b600082820183811015610f56576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082821115610fb4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8051600090610fcb57506000610224565b6020820151805160001a9060c0821015610fea57600092505050610224565b5060019392505050565b805160009061100557506000610224565b600080611015846020015161104c565b602085015185519181019250015b8082101561104357611034826110eb565b60019093019290910190611023565b50909392505050565b8051600090811a6080811015611066576000915050610224565b60b8811080611081575060c08110801590611081575060f881105b15611090576001915050610224565b60c08110156110c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a019050610224565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a019050610224565b80516000908190811a608081101561110657600191506111b9565b60b8811015611139577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81810191506111b9565b60c08110156111665760b78103600185019450806020036101000a855104600182018101935050506111b9565b60f8811015611199577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41810191506111b9565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80518051602091820151919092015191011190565b806111df57611239565b5b602081106111ff578251825260209283019290910190601f19016111e0565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b60008183111561124f575081610a6a565b50919050565b81516112618383610e06565b5061126c8382611272565b50505050565b61127a6113c0565b610f568384600001515184855161128f6113c0565b825182111561129d57600080fd5b846020015182850111156112bf576112bf85610e6a876020015187860161123e565b6000808651805187602083010193508088870111156112de5787860182525b505050602084015b602084106113055780518252601f1990930192602091820191016112e6565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a019081169019919091161790525083949350505050565b6040805160608082018352600080835260208301529181019190915290565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b604051806040016040528060008152602001600081525090565b604051806040016040528060608152602001600081525090565b60405180604001604052806113ed6113a6565b8152602001600081525090565b600082601f83011261140a578081fd5b8135602061141f61141a83611c53565b611c2f565b82815281810190858301855b8581101561145457611442898684358b01016114bb565b8452928401929084019060010161142b565b5090979650505050505050565b600082601f830112611471578081fd5b8135602061148161141a83611c53565b828152818101908583018385028701840188101561149d578586fd5b855b858110156114545781358452928401929084019060010161149f565b600082601f8301126114cb578081fd5b81356114d961141a82611c71565b8181528460208386010111156114ed578283fd5b816020850160208301379081016020019190915292915050565b600082601f830112611517578081fd5b815161152561141a82611c71565b818152846020838601011115611539578283fd5b610200826020830160208701611c93565b60006040828403121561155b578081fd5b6040516040810181811067ffffffffffffffff8211171561157857fe5b604052825181526020928301519281019290925250919050565b600060c082840312156115a3578081fd5b60405160c0810181811067ffffffffffffffff821117156115c057fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600080600060608486031215611619578283fd5b833567ffffffffffffffff80821115611630578485fd5b61163c878388016113fa565b94506020860135915080821115611651578384fd5b5061165e86828701611461565b925050604084013590509250925092565b60008060008060808587031215611684578081fd5b84359350602085013567ffffffffffffffff808211156116a2578283fd5b6116ae88838901611461565b94506040870135935060608701359150808211156116ca578283fd5b506116d7878288016113fa565b91505092959194509250565b600080600080606085870312156116f8578384fd5b84359350602085013567ffffffffffffffff80821115611716578485fd5b818701915087601f830112611729578485fd5b813581811115611737578586fd5b886020828501011115611748578586fd5b95986020929092019750949560400135945092505050565b600060208284031215611771578081fd5b813567ffffffffffffffff811115611787578182fd5b610200848285016114bb565b600080604083850312156117a5578182fd5b825167ffffffffffffffff8111156117bb578283fd5b6117c785828601611507565b925050602083015190509250929050565b6000806000606084860312156117ec578283fd5b833567ffffffffffffffff811115611802578384fd5b61180e868287016114bb565b9660208601359650604090950135949350505050565b6000806000806000806000806101c0898b031215611840578586fd5b885160ff81168114611850578687fd5b809850506020890151965060408901519550606089015194506118768a60808b0161154a565b93506118858a60c08b01611592565b925061018089015167ffffffffffffffff808211156118a2578384fd5b6118ae8c838d01611507565b93506101a08b01519150808211156118c4578283fd5b506118d18b828c01611507565b9150509295985092959890939650565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611913816020860160208601611c93565b601f01601f19169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b600060208252610f5660208301846118fb565b6000604082526119a760408301856118fb565b90508260208301529392505050565b6020808252601c908201527f50726f6f664c69623a20696e76616c69642070726f6f662073697a6500000000604082015260600190565b6020808252601a908201527f50726f6f664c69623a20696e76616c696420686173686c696e6b000000000000604082015260600190565b6020808252601f908201527f50726f6f664c69623a207061636b6574206e6f74207265636f676e697a656400604082015260600190565b6020808252601d908201527f50726f6f664c69623a2070726f6f662073697a65206d757374203e2030000000604082015260600190565b6020808252601e908201527f50726f6f664c69623a20696e76616c696420616464726573732073697a650000604082015260600190565b60006020825261ffff8084511660208401528060208501511660408401525067ffffffffffffffff60408401511660608301526060830151611b0e60808401826118e1565b50608083015160e060a0840152611b296101008401826118fb565b905060a084015160c084015260c0840151601f198483030160e08501526101e482826118fb565b6000602082528251602083015260208301516040830152604083015160608084015261020060808401826118fb565b60ff91909116815260200190565b60006101c060ff8b16835289602084015288604084015287606084015286516080840152602087015160a0840152855160c0840152602086015160e084015260408601516101008401526060860151610120840152608086015161014084015260a086015161016084015280610180840152611c0b818401866118fb565b90508281036101a0840152611c2081856118fb565b9b9a5050505050505050505050565b60405181810167ffffffffffffffff81118282101715611c4b57fe5b604052919050565b600067ffffffffffffffff821115611c6757fe5b5060209081020190565b600067ffffffffffffffff821115611c8557fe5b50601f01601f191660200190565b60005b83811015611cae578181015183820152602001611c96565b8381111561126c575050600091015256fe524c504465636f6465723a20696e76616c696420524c50206974656d206f66667365742073697a65524c504465636f646572206974657261746f72206973206e6f742061206c697374524c504465636f64657220746f427974657320696e76616c6964206c656e677468a2646970667358221220106f7d50599a8a4577b48aeaf7160923ff702f6336e36ff3611dc5f5806ccf2664736f6c63430007060033",
354
+ "solcInputHash": "12c423ed555aea5404eb3b1e98eff6eb",
355
+ "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stargateBridgeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stargateTokenAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"PACKET_SIGNATURE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"sizeOfSrcAddress\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"}],\"name\":\"getPacket\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"dstAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"struct LayerZeroPacket.Packet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProofType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUtilsVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"receiptSlotIndex\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"logIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"proof\",\"type\":\"bytes[]\"}],\"name\":\"getVerifyLog\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topicZeroSig\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IValidationLibraryHelperV2.ULNLog\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"secureStgPayload\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"secureStgTokenPayload\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stargateBridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stargateTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"utilsVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiptsRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_transactionProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_remoteAddressSize\",\"type\":\"uint256\"}],\"name\":\"validateProof\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"dstAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"ulnAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"struct LayerZeroPacket.Packet\",\"name\":\"packet\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/proof/MPTValidator01.sol\":\"MPTValidator01\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":30000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroValidationLibrary.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"../proof/utility/LayerZeroPacket.sol\\\";\\n\\ninterface ILayerZeroValidationLibrary {\\n function validateProof(\\n bytes32 blockData,\\n bytes calldata _data,\\n uint _remoteAddressSize\\n ) external returns (LayerZeroPacket.Packet memory packet);\\n}\\n\",\"keccak256\":\"0x0621a318689774296b47c95d8738d0c4e1bc63efe62e524cb3ea36ef1a9da487\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IValidationLibraryHelperV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"../proof/utility/LayerZeroPacket.sol\\\";\\n\\ninterface IValidationLibraryHelperV2 {\\n struct ULNLog {\\n bytes32 contractAddress;\\n bytes32 topicZeroSig;\\n bytes data;\\n }\\n\\n function getVerifyLog(\\n bytes32 hashRoot,\\n uint[] calldata receiptSlotIndex,\\n uint logIndex,\\n bytes[] calldata proof\\n ) external pure returns (ULNLog memory);\\n\\n function getPacket(\\n bytes calldata data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) external pure returns (LayerZeroPacket.Packet memory);\\n\\n function getUtilsVersion() external view returns (uint8);\\n\\n function getProofType() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa65bfd98c01ae8eb3df2edc925720a85b8dd8f223ab8f8b641176a1c4c3cd41f\",\"license\":\"BUSL-1.1\"},\"contracts/proof/MPTValidator01.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"./utility/LayerZeroPacket.sol\\\";\\nimport \\\"./utility/UltraLightNodeEVMDecoder.sol\\\";\\nimport \\\"../interfaces/IValidationLibraryHelperV2.sol\\\";\\nimport \\\"../interfaces/ILayerZeroValidationLibrary.sol\\\";\\n\\ninterface IStargate {\\n // Stargate objects for abi encoding / decoding\\n struct SwapObj {\\n uint amount;\\n uint eqFee;\\n uint eqReward;\\n uint lpFee;\\n uint protocolFee;\\n uint lkbRemove;\\n }\\n\\n struct CreditObj {\\n uint credits;\\n uint idealBalance;\\n }\\n}\\n\\ncontract MPTValidator01 is ILayerZeroValidationLibrary, IValidationLibraryHelperV2 {\\n using RLPDecode for RLPDecode.RLPItem;\\n using RLPDecode for RLPDecode.Iterator;\\n\\n uint8 public proofType = 1;\\n uint8 public utilsVersion = 4;\\n bytes32 public constant PACKET_SIGNATURE = 0xe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82;\\n\\n address public immutable stargateBridgeAddress;\\n address public immutable stargateTokenAddress;\\n\\n constructor(address _stargateBridgeAddress, address _stargateTokenAddress) {\\n stargateBridgeAddress = _stargateBridgeAddress;\\n stargateTokenAddress = _stargateTokenAddress;\\n }\\n\\n function validateProof(\\n bytes32 _receiptsRoot,\\n bytes calldata _transactionProof,\\n uint _remoteAddressSize\\n ) external view override returns (LayerZeroPacket.Packet memory packet) {\\n require(_remoteAddressSize > 0, \\\"ProofLib: invalid address size\\\");\\n (bytes[] memory proof, uint[] memory receiptSlotIndex, uint logIndex) = abi.decode(\\n _transactionProof,\\n (bytes[], uint[], uint)\\n );\\n\\n ULNLog memory log = _getVerifiedLog(_receiptsRoot, receiptSlotIndex, logIndex, proof);\\n require(log.topicZeroSig == PACKET_SIGNATURE, \\\"ProofLib: packet not recognized\\\"); //data\\n\\n packet = LayerZeroPacket.getPacketV2(log.data, _remoteAddressSize, log.contractAddress);\\n\\n if (packet.dstAddress == stargateBridgeAddress) packet.payload = _secureStgPayload(packet.payload);\\n\\n if (packet.dstAddress == stargateTokenAddress) packet.payload = _secureStgTokenPayload(packet.payload);\\n\\n return packet;\\n }\\n\\n function _secureStgTokenPayload(bytes memory _payload) internal pure returns (bytes memory) {\\n (bytes memory toAddressBytes, uint qty) = abi.decode(_payload, (bytes, uint));\\n\\n address toAddress = address(0);\\n if (toAddressBytes.length > 0) {\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n }\\n\\n if (toAddress == address(0)) {\\n address deadAddress = address(0x000000000000000000000000000000000000dEaD);\\n bytes memory newToAddressBytes = abi.encodePacked(deadAddress);\\n return abi.encode(newToAddressBytes, qty);\\n }\\n\\n // default to return the original payload\\n return _payload;\\n }\\n\\n function _secureStgPayload(bytes memory _payload) internal view returns (bytes memory) {\\n // functionType is uint8 even though the encoding will take up the side of uint256\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(_payload, 32))\\n }\\n\\n // TYPE_SWAP_REMOTE == 1 && only if the payload has a payload\\n // only swapRemote inside of stargate can call sgReceive on an user supplied to address\\n // thus we do not care about the other type functions even if the toAddress is overly long.\\n if (functionType == 1) {\\n // decode the _payload with its types\\n (\\n ,\\n uint srcPoolId,\\n uint dstPoolId,\\n uint dstGasForCall,\\n IStargate.CreditObj memory c,\\n IStargate.SwapObj memory s,\\n bytes memory toAddressBytes,\\n bytes memory contractCallPayload\\n ) = abi.decode(_payload, (uint8, uint, uint, uint, IStargate.CreditObj, IStargate.SwapObj, bytes, bytes));\\n\\n // if contractCallPayload.length > 0 need to check if the to address is a contract or not\\n if (contractCallPayload.length > 0) {\\n // otherwise, need to check if the payload can be delivered to the toAddress\\n address toAddress = address(0);\\n if (toAddressBytes.length > 0) {\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n }\\n\\n // check if the toAddress is a contract. We are not concerned about addresses that pretend to be wallets. because worst case we just delete their payload if being malicious\\n // we can guarantee that if a size > 0, then the contract is definitely a contract address in this context\\n uint size;\\n assembly {\\n size := extcodesize(toAddress)\\n }\\n\\n if (size == 0) {\\n // size == 0 indicates its not a contract, payload wont be delivered\\n // secure the _payload to make sure funds can be delivered to the toAddress\\n bytes memory newToAddressBytes = abi.encodePacked(toAddress);\\n bytes memory securePayload = abi.encode(\\n functionType,\\n srcPoolId,\\n dstPoolId,\\n dstGasForCall,\\n c,\\n s,\\n newToAddressBytes,\\n bytes(\\\"\\\")\\n );\\n return securePayload;\\n }\\n }\\n }\\n\\n // default to return the original payload\\n return _payload;\\n }\\n\\n function secureStgTokenPayload(bytes memory _payload) external pure returns (bytes memory) {\\n return _secureStgTokenPayload(_payload);\\n }\\n\\n function secureStgPayload(bytes memory _payload) external view returns (bytes memory) {\\n return _secureStgPayload(_payload);\\n }\\n\\n function _getVerifiedLog(\\n bytes32 hashRoot,\\n uint[] memory paths,\\n uint logIndex,\\n bytes[] memory proof\\n ) internal pure returns (ULNLog memory) {\\n require(paths.length == proof.length, \\\"ProofLib: invalid proof size\\\");\\n require(proof.length > 0, \\\"ProofLib: proof size must > 0\\\");\\n RLPDecode.RLPItem memory item;\\n bytes memory proofBytes;\\n\\n for (uint i = 0; i < proof.length; i++) {\\n proofBytes = proof[i];\\n require(hashRoot == keccak256(proofBytes), \\\"ProofLib: invalid hashlink\\\");\\n item = RLPDecode.toRlpItem(proofBytes).safeGetItemByIndex(paths[i]);\\n if (i < proof.length - 1) hashRoot = bytes32(item.toUint());\\n }\\n\\n // burning status + gasUsed + logBloom\\n RLPDecode.RLPItem memory logItem = item.typeOffset().safeGetItemByIndex(3);\\n RLPDecode.Iterator memory it = logItem.safeGetItemByIndex(logIndex).iterator();\\n ULNLog memory log;\\n log.contractAddress = bytes32(it.next().toUint());\\n log.topicZeroSig = bytes32(it.next().safeGetItemByIndex(0).toUint());\\n log.data = it.next().toBytes();\\n\\n return log;\\n }\\n\\n function getUtilsVersion() external view override returns (uint8) {\\n return utilsVersion;\\n }\\n\\n function getProofType() external view override returns (uint8) {\\n return proofType;\\n }\\n\\n function getVerifyLog(\\n bytes32 hashRoot,\\n uint[] memory receiptSlotIndex,\\n uint logIndex,\\n bytes[] memory proof\\n ) external pure override returns (ULNLog memory) {\\n return _getVerifiedLog(hashRoot, receiptSlotIndex, logIndex, proof);\\n }\\n\\n function getPacket(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) external pure override returns (LayerZeroPacket.Packet memory) {\\n return LayerZeroPacket.getPacketV2(data, sizeOfSrcAddress, ulnAddress);\\n }\\n}\\n\",\"keccak256\":\"0xd8c78b4a9a9373cd1c8b647b52c7984367ef007c5fd3049b4cb1cd2abca8d8f1\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/Buffer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\n// https://github.com/ensdomains/buffer\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev A library for working with mutable byte buffers in Solidity.\\n *\\n * Byte buffers are mutable and expandable, and provide a variety of primitives\\n * for writing to them. At any time you can fetch a bytes object containing the\\n * current contents of the buffer. The bytes object should not be stored between\\n * operations, as it may change due to resizing of the buffer.\\n */\\nlibrary Buffer {\\n /**\\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\\n * a capacity. The capacity may be longer than the current value, in\\n * which case it can be extended without the need to allocate more memory.\\n */\\n struct buffer {\\n bytes buf;\\n uint capacity;\\n }\\n\\n /**\\n * @dev Initializes a buffer with an initial capacity.a co\\n * @param buf The buffer to initialize.\\n * @param capacity The number of bytes of space to allocate the buffer.\\n * @return The buffer, for chaining.\\n */\\n function init(buffer memory buf, uint capacity) internal pure returns (buffer memory) {\\n if (capacity % 32 != 0) {\\n capacity += 32 - (capacity % 32);\\n }\\n // Allocate space for the buffer data\\n buf.capacity = capacity;\\n assembly {\\n let ptr := mload(0x40)\\n mstore(buf, ptr)\\n mstore(ptr, 0)\\n mstore(0x40, add(32, add(ptr, capacity)))\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param off The start offset to write to.\\n * @param rawData The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function writeRawBytes(\\n buffer memory buf,\\n uint off,\\n bytes memory rawData,\\n uint offData,\\n uint len\\n ) internal pure returns (buffer memory) {\\n if (off + len > buf.capacity) {\\n resize(buf, max(buf.capacity, len + off) * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(add(len, off), buflen) {\\n mstore(bufptr, add(len, off))\\n }\\n src := add(rawData, offData)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param off The start offset to write to.\\n * @param data The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns (buffer memory) {\\n require(len <= data.length);\\n\\n if (off + len > buf.capacity) {\\n resize(buf, max(buf.capacity, len + off) * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(add(len, off), buflen) {\\n mstore(bufptr, add(len, off))\\n }\\n src := add(data, 32)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n\\n return buf;\\n }\\n\\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\\n return write(buf, buf.buf.length, data, data.length);\\n }\\n\\n function resize(buffer memory buf, uint capacity) private pure {\\n bytes memory oldbuf = buf.buf;\\n init(buf, capacity);\\n append(buf, oldbuf);\\n }\\n\\n function max(uint a, uint b) private pure returns (uint) {\\n if (a > b) {\\n return a;\\n }\\n return b;\\n }\\n}\\n\",\"keccak256\":\"0x6fb6ba1e85708e05e0f2181136650463faca122318dd16aa6cbaa4f88e48d908\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/LayerZeroPacket.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./Buffer.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nlibrary LayerZeroPacket {\\n using Buffer for Buffer.buffer;\\n using SafeMath for uint;\\n\\n struct Packet {\\n uint16 srcChainId;\\n uint16 dstChainId;\\n uint64 nonce;\\n address dstAddress;\\n bytes srcAddress;\\n bytes32 ulnAddress;\\n bytes payload;\\n }\\n\\n function getPacket(\\n bytes memory data,\\n uint16 srcChain,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n uint16 dstChainId;\\n address dstAddress;\\n uint size;\\n uint64 nonce;\\n\\n // The log consists of the destination chain id and then a bytes payload\\n // 0--------------------------------------------31\\n // 0 | total bytes size\\n // 32 | destination chain id\\n // 64 | bytes offset\\n // 96 | bytes array size\\n // 128 | payload\\n assembly {\\n dstChainId := mload(add(data, 32))\\n size := mload(add(data, 96)) /// size of the byte array\\n nonce := mload(add(data, 104)) // offset to convert to uint64 128 is index -24\\n dstAddress := mload(add(data, sub(add(128, sizeOfSrcAddress), 4))) // offset to convert to address 12 -8\\n }\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 136, sizeOfSrcAddress); // 128 + 8\\n\\n uint payloadSize = size.sub(28).sub(sizeOfSrcAddress);\\n Buffer.buffer memory payloadBuffer;\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, sizeOfSrcAddress.add(156), payloadSize); // 148 + 8\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChainId,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n\\n function getPacketV2(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n // packet def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);\\n // data def: abi.encode(packet) = offset(32) + length(32) + packet\\n // if from EVM\\n // 0 - 31 0 - 31 | total bytes size\\n // 32 - 63 32 - 63 | location\\n // 64 - 95 64 - 95 | size of the packet\\n // 96 - 103 96 - 103 | nonce\\n // 104 - 105 104 - 105 | srcChainId\\n // 106 - P 106 - 125 | srcAddress, where P = 106 + sizeOfSrcAddress - 1,\\n // P+1 - P+2 126 - 127 | dstChainId\\n // P+3 - P+22 128 - 147 | dstAddress\\n // P+23 - END 148 - END | payload\\n\\n // decode the packet\\n uint256 realSize;\\n uint64 nonce;\\n uint16 srcChain;\\n uint16 dstChain;\\n address dstAddress;\\n assembly {\\n realSize := mload(add(data, 64))\\n nonce := mload(add(data, 72)) // 104 - 32\\n srcChain := mload(add(data, 74)) // 106 - 32\\n dstChain := mload(add(data, add(76, sizeOfSrcAddress))) // P + 3 - 32 = 105 + size + 3 - 32 = 76 + size\\n dstAddress := mload(add(data, add(96, sizeOfSrcAddress))) // P + 23 - 32 = 105 + size + 23 - 32 = 96 + size\\n }\\n\\n require(srcChain != 0, \\\"LayerZeroPacket: invalid packet\\\");\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 106, sizeOfSrcAddress);\\n\\n uint nonPayloadSize = sizeOfSrcAddress.add(32); // 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20\\n uint payloadSize = realSize.sub(nonPayloadSize);\\n Buffer.buffer memory payloadBuffer;\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(96), payloadSize);\\n\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChain,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n\\n function getPacketV3(\\n bytes memory data,\\n uint sizeOfSrcAddress,\\n bytes32 ulnAddress\\n ) internal pure returns (LayerZeroPacket.Packet memory) {\\n // data def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);\\n // if from EVM\\n // 0 - 31 0 - 31 | total bytes size\\n // 32 - 39 32 - 39 | nonce\\n // 40 - 41 40 - 41 | srcChainId\\n // 42 - P 42 - 61 | srcAddress, where P = 41 + sizeOfSrcAddress,\\n // P+1 - P+2 62 - 63 | dstChainId\\n // P+3 - P+22 64 - 83 | dstAddress\\n // P+23 - END 84 - END | payload\\n\\n // decode the packet\\n uint256 realSize = data.length;\\n uint nonPayloadSize = sizeOfSrcAddress.add(32); // 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20\\n require(realSize >= nonPayloadSize, \\\"LayerZeroPacket: invalid packet\\\");\\n uint payloadSize = realSize - nonPayloadSize;\\n\\n uint64 nonce;\\n uint16 srcChain;\\n uint16 dstChain;\\n address dstAddress;\\n assembly {\\n nonce := mload(add(data, 8)) // 40 - 32\\n srcChain := mload(add(data, 10)) // 42 - 32\\n dstChain := mload(add(data, add(12, sizeOfSrcAddress))) // P + 3 - 32 = 41 + size + 3 - 32 = 12 + size\\n dstAddress := mload(add(data, add(32, sizeOfSrcAddress))) // P + 23 - 32 = 41 + size + 23 - 32 = 32 + size\\n }\\n\\n require(srcChain != 0, \\\"LayerZeroPacket: invalid packet\\\");\\n\\n Buffer.buffer memory srcAddressBuffer;\\n srcAddressBuffer.init(sizeOfSrcAddress);\\n srcAddressBuffer.writeRawBytes(0, data, 42, sizeOfSrcAddress);\\n\\n Buffer.buffer memory payloadBuffer;\\n if (payloadSize > 0) {\\n payloadBuffer.init(payloadSize);\\n payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(32), payloadSize);\\n }\\n\\n return\\n LayerZeroPacket.Packet(\\n srcChain,\\n dstChain,\\n nonce,\\n dstAddress,\\n srcAddressBuffer.buf,\\n ulnAddress,\\n payloadBuffer.buf\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf96248293a8bb6e9a3908ac7eb78dfb794bb197a5743d377905fe771911d2192\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/RLPDecode.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\n// https://github.com/hamdiallam/solidity-rlp\\n\\npragma solidity ^0.7.0;\\n\\nlibrary RLPDecode {\\n uint8 constant STRING_SHORT_START = 0x80;\\n uint8 constant STRING_LONG_START = 0xb8;\\n uint8 constant LIST_SHORT_START = 0xc0;\\n uint8 constant LIST_LONG_START = 0xf8;\\n uint8 constant WORD_SIZE = 32;\\n\\n struct RLPItem {\\n uint len;\\n uint memPtr;\\n }\\n\\n struct Iterator {\\n RLPItem item; // Item that's being iterated over.\\n uint nextPtr; // Position of the next item in the list.\\n }\\n\\n /*\\n * @dev Returns the next element in the iteration. Reverts if it has not next element.\\n * @param self The iterator.\\n * @return The next element in the iteration.\\n */\\n function next(Iterator memory self) internal pure returns (RLPItem memory) {\\n require(hasNext(self), \\\"RLPDecoder iterator has no next\\\");\\n\\n uint ptr = self.nextPtr;\\n uint itemLength = _itemLength(ptr);\\n self.nextPtr = ptr + itemLength;\\n\\n return RLPItem(itemLength, ptr);\\n }\\n\\n /*\\n * @dev Returns true if the iteration has more elements.\\n * @param self The iterator.\\n * @return true if the iteration has more elements.\\n */\\n function hasNext(Iterator memory self) internal pure returns (bool) {\\n RLPItem memory item = self.item;\\n return self.nextPtr < item.memPtr + item.len;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n\\n function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {\\n uint memPtr;\\n assembly {\\n memPtr := add(item, 0x20)\\n }\\n // offset the pointer if the first byte\\n\\n uint8 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n uint len = item.length;\\n if (len > 0 && byte0 < LIST_SHORT_START) {\\n assembly {\\n memPtr := add(memPtr, 0x01)\\n }\\n len -= 1;\\n }\\n return RLPItem(len, memPtr);\\n }\\n\\n /*\\n * @dev Create an iterator. Reverts if item is not a list.\\n * @param self The RLP item.\\n * @return An 'Iterator' over the item.\\n */\\n function iterator(RLPItem memory self) internal pure returns (Iterator memory) {\\n require(isList(self), \\\"RLPDecoder iterator is not list\\\");\\n\\n uint ptr = self.memPtr + _payloadOffset(self.memPtr);\\n return Iterator(self, ptr);\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function rlpLen(RLPItem memory item) internal pure returns (uint) {\\n return item.len;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function payloadLen(RLPItem memory item) internal pure returns (uint) {\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid uint RLP item offset size\\\");\\n return item.len - offset;\\n }\\n\\n /*\\n * @param item RLP encoded list in bytes\\n */\\n function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n\\n uint items = numItems(item);\\n RLPItem[] memory result = new RLPItem[](items);\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < items; i++) {\\n dataLen = _itemLength(memPtr);\\n result[i] = RLPItem(dataLen, memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n\\n return result;\\n }\\n\\n /*\\n * @param get the RLP item by index. save gas.\\n */\\n function getItemByIndex(RLPItem memory item, uint idx) internal pure returns (RLPItem memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < idx; i++) {\\n dataLen = _itemLength(memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n dataLen = _itemLength(memPtr);\\n return RLPItem(dataLen, memPtr);\\n }\\n\\n /*\\n * @param get the RLP item by index. save gas.\\n */\\n function safeGetItemByIndex(RLPItem memory item, uint idx) internal pure returns (RLPItem memory) {\\n require(isList(item), \\\"RLPDecoder iterator is not a list\\\");\\n require(idx < numItems(item), \\\"RLP item out of bounds\\\");\\n uint endPtr = item.memPtr + item.len;\\n\\n uint memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint dataLen;\\n for (uint i = 0; i < idx; i++) {\\n dataLen = _itemLength(memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n dataLen = _itemLength(memPtr);\\n\\n require(memPtr + dataLen <= endPtr, \\\"RLP item overflow\\\");\\n return RLPItem(dataLen, memPtr);\\n }\\n\\n /*\\n * @param offset the receipt bytes item\\n */\\n function typeOffset(RLPItem memory item) internal pure returns (RLPItem memory) {\\n uint offset = _payloadOffset(item.memPtr);\\n uint8 byte0;\\n uint memPtr = item.memPtr;\\n uint len = item.len;\\n assembly {\\n memPtr := add(memPtr, offset)\\n byte0 := byte(0, mload(memPtr))\\n }\\n if (len > 0 && byte0 < LIST_SHORT_START) {\\n assembly {\\n memPtr := add(memPtr, 0x01)\\n }\\n len -= 1;\\n }\\n return RLPItem(len, memPtr);\\n }\\n\\n // @return indicator whether encoded payload is a list. negate this function call for isData.\\n function isList(RLPItem memory item) internal pure returns (bool) {\\n if (item.len == 0) return false;\\n\\n uint8 byte0;\\n uint memPtr = item.memPtr;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < LIST_SHORT_START) return false;\\n return true;\\n }\\n\\n /** RLPItem conversions into data types **/\\n\\n // @returns raw rlp encoding in bytes\\n function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n bytes memory result = new bytes(item.len);\\n if (result.length == 0) return result;\\n\\n uint ptr;\\n assembly {\\n ptr := add(0x20, result)\\n }\\n\\n copy(item.memPtr, ptr, item.len);\\n return result;\\n }\\n\\n // any non-zero byte except \\\"0x80\\\" is considered true\\n function toBoolean(RLPItem memory item) internal pure returns (bool) {\\n require(item.len == 1, \\\"RLPDecoder toBoolean invalid length\\\");\\n uint result;\\n uint memPtr = item.memPtr;\\n assembly {\\n result := byte(0, mload(memPtr))\\n }\\n\\n // SEE Github Issue #5.\\n // Summary: Most commonly used RLP libraries (i.e Geth) will encode\\n // \\\"0\\\" as \\\"0x80\\\" instead of as \\\"0\\\". We handle this edge case explicitly\\n // here.\\n if (result == 0 || result == STRING_SHORT_START) {\\n return false;\\n } else {\\n return true;\\n }\\n }\\n\\n function toAddress(RLPItem memory item) internal pure returns (address) {\\n // 1 byte for the length prefix\\n require(item.len == 21, \\\"RLPDecoder toAddress invalid length\\\");\\n\\n return address(toUint(item));\\n }\\n\\n function toUint(RLPItem memory item) internal pure returns (uint) {\\n require(item.len > 0 && item.len <= 33, \\\"RLPDecoder toUint invalid length\\\");\\n\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid RLP item offset size\\\");\\n uint len = item.len - offset;\\n\\n uint result;\\n uint memPtr = item.memPtr + offset;\\n assembly {\\n result := mload(memPtr)\\n\\n // shift to the correct location if necessary\\n if lt(len, 32) {\\n result := div(result, exp(256, sub(32, len)))\\n }\\n }\\n\\n return result;\\n }\\n\\n // enforces 32 byte length\\n function toUintStrict(RLPItem memory item) internal pure returns (uint) {\\n // one byte prefix\\n require(item.len == 33, \\\"RLPDecoder toUintStrict invalid length\\\");\\n\\n uint result;\\n uint memPtr = item.memPtr + 1;\\n assembly {\\n result := mload(memPtr)\\n }\\n\\n return result;\\n }\\n\\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n require(item.len > 0, \\\"RLPDecoder toBytes invalid length\\\");\\n\\n uint offset = _payloadOffset(item.memPtr);\\n require(item.len >= offset, \\\"RLPDecoder: invalid RLP item offset size\\\");\\n uint len = item.len - offset; // data length\\n bytes memory result = new bytes(len);\\n\\n uint destPtr;\\n assembly {\\n destPtr := add(0x20, result)\\n }\\n\\n copy(item.memPtr + offset, destPtr, len);\\n return result;\\n }\\n\\n /*\\n * Private Helpers\\n */\\n\\n // @return number of payload items inside an encoded list.\\n function numItems(RLPItem memory item) internal pure returns (uint) {\\n if (item.len == 0) return 0;\\n\\n uint count = 0;\\n uint currPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint endPtr = item.memPtr + item.len;\\n while (currPtr < endPtr) {\\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\\n count++;\\n }\\n\\n return count;\\n }\\n\\n // @return entire rlp item byte length\\n function _itemLength(uint memPtr) private pure returns (uint) {\\n uint itemLen;\\n uint byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) itemLen = 1;\\n else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;\\n else if (byte0 < LIST_SHORT_START) {\\n assembly {\\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\\n memPtr := add(memPtr, 1) // skip over the first byte\\n\\n /* 32 byte word size */\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n } else if (byte0 < LIST_LONG_START) {\\n itemLen = byte0 - LIST_SHORT_START + 1;\\n } else {\\n assembly {\\n let byteLen := sub(byte0, 0xf7)\\n memPtr := add(memPtr, 1)\\n\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n }\\n\\n return itemLen;\\n }\\n\\n // @return number of bytes until the data\\n function _payloadOffset(uint memPtr) private pure returns (uint) {\\n uint byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) return 0;\\n else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;\\n else if (byte0 < LIST_SHORT_START)\\n // being explicit\\n return byte0 - (STRING_LONG_START - 1) + 1;\\n else return byte0 - (LIST_LONG_START - 1) + 1;\\n }\\n\\n /*\\n * @param src Pointer to source\\n * @param dest Pointer to destination\\n * @param len Amount of memory to copy from the source\\n */\\n function copy(uint src, uint dest, uint len) private pure {\\n if (len == 0) return;\\n\\n // copy as many word sizes as possible\\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += WORD_SIZE;\\n dest += WORD_SIZE;\\n }\\n\\n // left over bytes. Mask is used to remove unwanted bytes from the word\\n uint mask = 256 ** (WORD_SIZE - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask)) // zero out src\\n let destpart := and(mload(dest), mask) // retrieve the bytes\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf75683c1b2c5029a6cf47eab2dcc23d9fe70a08f3b76c9eb9e7efbfe660958c6\",\"license\":\"BUSL-1.1\"},\"contracts/proof/utility/UltraLightNodeEVMDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.7.0;\\npragma abicoder v2;\\n\\nimport \\\"./RLPDecode.sol\\\";\\n\\nlibrary UltraLightNodeEVMDecoder {\\n using RLPDecode for RLPDecode.RLPItem;\\n using RLPDecode for RLPDecode.Iterator;\\n\\n struct Log {\\n address contractAddress;\\n bytes32 topicZero;\\n bytes data;\\n }\\n\\n function getReceiptLog(bytes memory data, uint logIndex) internal pure returns (Log memory) {\\n RLPDecode.Iterator memory it = RLPDecode.toRlpItem(data).iterator();\\n uint idx;\\n while (it.hasNext()) {\\n if (idx == 3) {\\n return toReceiptLog(it.next().getItemByIndex(logIndex).toRlpBytes());\\n } else it.next();\\n idx++;\\n }\\n revert(\\\"no log index in receipt\\\");\\n }\\n\\n function toReceiptLog(bytes memory data) internal pure returns (Log memory) {\\n RLPDecode.Iterator memory it = RLPDecode.toRlpItem(data).iterator();\\n Log memory log;\\n\\n uint idx;\\n while (it.hasNext()) {\\n if (idx == 0) {\\n log.contractAddress = it.next().toAddress();\\n } else if (idx == 1) {\\n RLPDecode.RLPItem memory item = it.next().getItemByIndex(0);\\n log.topicZero = bytes32(item.toUint());\\n } else if (idx == 2) log.data = it.next().toBytes();\\n else it.next();\\n idx++;\\n }\\n return log;\\n }\\n}\\n\",\"keccak256\":\"0xa5a921e346276438893241fb9719b074bed6e215d37e372f91b2712cb9f46567\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
356
+ "bytecode": "0x60c060405260008054600160ff199091161761ff0019166104001790553480156200002957600080fd5b50604051620020fc380380620020fc8339810160408190526200004c9162000088565b6001600160601b0319606092831b8116608052911b1660a052620000bf565b80516001600160a01b03811681146200008357600080fd5b919050565b600080604083850312156200009b578182fd5b620000a6836200006b565b9150620000b6602084016200006b565b90509250929050565b60805160601c60a05160601c612009620000f3600039806103a7528061045052508061022b528061033c52506120096000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639bcd850f11610081578063d633ad611161005b578063d633ad61146101a4578063e965c192146101ac578063ea455df9146101b4576100d4565b80639bcd850f14610174578063b71e0f711461017c578063be9d395e1461018f576100d4565b806347713b39116100b257806347713b39146101375780635711c2a81461013f5780636348d2691461015f576100d4565b806305af5d35146100d95780630f222e65146100f75780632ff2044914610117575b600080fd5b6100e16101c7565b6040516100ee9190611e0b565b60405180910390f35b61010a6101053660046118bf565b6101d0565b6040516100ee9190611ddc565b61012a610125366004611a28565b6101ed565b6040516100ee9190611d37565b6100e1610208565b61015261014d3660046119b0565b610216565b6040516100ee9190611bef565b610167610229565b6040516100ee9190611bc5565b6100e161024d565b61012a61018a366004611933565b610256565b61019761041c565b6040516100ee9190611be6565b6100e1610440565b61016761044e565b6101526101c23660046119b0565b610472565b60005460ff1681565b6101d8611599565b6101e48585858561047d565b95945050505050565b6101f56115b8565b61020084848461062c565b949350505050565b600054610100900460ff1681565b60606102218261079b565b90505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460ff1690565b61025e6115b8565b600082116102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611d00565b60405180910390fd5b600080806102b186880188611855565b92509250925060006102c58984848761047d565b60208101519091507fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8214610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c92565b610338816040015187836000015161062c565b94507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103a55761039f8560c0015161079b565b60c08601525b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156104105761040a8560c001516108bc565b60c08601525b50505050949350505050565b7fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8281565b600054610100900460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610221826108bc565b610485611599565b81518451146104c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c24565b60008251116104fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611cc9565b6105036115f6565b606060005b84518110156105af5784818151811061051d57fe5b6020026020010151915081805190602001208814610567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c5b565b61058d87828151811061057657fe5b602002602001015161058784610966565b906109da565b925060018551038110156105a7576105a483610b96565b97505b600101610508565b5060006105c0600361058785610cb3565b905060006105d66105d183896109da565b610d3f565b90506105e0611599565b6105f16105ec83610deb565b610b96565b81526106046105ec600061058785610deb565b602082015261061a61061583610deb565b610e9b565b60408201529998505050505050505050565b6106346115b8565b60408401516048850151604a860151858701604c81015160609091015161ffff83166106c157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b6106c9611610565b6106d3818a610fc8565b506106e38160008c606a8d611002565b5060006106f18a60206110dc565b905060006106ff8883611157565b9050610709611610565b6107138183610fc8565b5061072f60008e6107258660606110dc565b8492919086611002565b506040805160e08101825261ffff988916815296909716602087015267ffffffffffffffff909716958501959095525073ffffffffffffffffffffffffffffffffffffffff909116606083015251608082015260a08101869052915160c0830152509150509392505050565b6020810151606090600160ff821614156108b5576000806000806000806000898060200190518101906107ce9190611a74565b9750975097509750975097509750506000815111156108ad578151600090156107f8575060148201515b803b806108aa576000826040516020016108129190611b95565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260208381018352600080855292519194509192610868928f928f928f928f928f928f928b9201611e19565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529c506102249b505050505050505050505050565b50505b505050505050505b5090919050565b6060600080838060200190518101906108d591906119e3565b91509150600080835111156108eb575060148201515b73ffffffffffffffffffffffffffffffffffffffff811661095d5760405161dead9060009061091e908390602001611b95565b60405160208183030381529060405290508084604051602001610942929190611c02565b60405160208183030381529060405295505050505050610224565b50929392505050565b61096e6115f6565b602082018051835160009190911a90801580159061098f575060c060ff8316105b156109be57600192909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b6040805180820190915290815260208101929092525092915050565b6109e26115f6565b6109eb836111ce565b610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611f926021913960400191505060405180910390fd5b610a4983611208565b8210610ab657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f524c50206974656d206f7574206f6620626f756e647300000000000000000000604482015290519081900360640190fd5b8251602084015190810190600090610acd90611260565b60208601510190506000805b85811015610af857610aea836112ff565b928301929150600101610ad9565b50610b02826112ff565b9050828183011115610b7557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f524c50206974656d206f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b60405180604001604052808281526020018381525093505050505b92915050565b805160009015801590610bab57508151602110155b610c1657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c504465636f64657220746f55696e7420696e76616c6964206c656e677468604482015290519081900360640190fd5b6000610c258360200151611260565b90508083600001511015610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611f6a6028913960400191505060405180910390fd5b825160208085015183018051928490039291831015610caa57826020036101000a820491505b50949350505050565b610cbb6115f6565b6000610cca8360200151611260565b60208401518451908201805192935060009290921a91908015801590610cf3575060c060ff8416105b15610d2257600191909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604080518082019091529081526020810191909152949350505050565b610d4761162a565b610d50826111ce565b610dbb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f524c504465636f646572206974657261746f72206973206e6f74206c69737400604482015290519081900360640190fd5b6000610dca8360200151611260565b60208085015160408051808201909152868152920190820152915050919050565b610df36115f6565b610dfc826113d4565b610e6757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f524c504465636f646572206974657261746f7220686173206e6f206e65787400604482015290519081900360640190fd5b60208201516000610e77826112ff565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611fb36021913960400191505060405180910390fd5b6000610f048360200151611260565b90508083600001511015610f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611f6a6028913960400191505060405180910390fd5b825181900360008167ffffffffffffffff81118015610f8157600080fd5b506040519080825280601f01601f191660200182016040528015610fac576020820181803683370190505b5090506000816020019050610caa8487602001510182856113e9565b610fd0611610565b6020820615610fe55760208206602003820191505b506020828101829052604080518085526000815290920101905290565b61100a611610565b85602001518286011115611034576110348661102c8860200151888601611470565b600202611487565b6000808751805188602083010193508089870111156110535788860182525b5050508484015b6020841061109757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909301926020918201910161105a565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a01908116901991909116179052508495945050505050565b60008282018381101561115057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156111c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b80516000906111df57506000610224565b6020820151805160001a9060c08210156111fe57600092505050610224565b5060019392505050565b805160009061121957506000610224565b6000806112298460200151611260565b602085015185519181019250015b8082101561125757611248826112ff565b60019093019290910190611237565b50909392505050565b8051600090811a608081101561127a576000915050610224565b60b8811080611295575060c08110801590611295575060f881105b156112a4576001915050610224565b60c08110156112d6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a019050610224565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a019050610224565b80516000908190811a608081101561131a57600191506113cd565b60b881101561134d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81810191506113cd565b60c081101561137a5760b78103600185019450806020036101000a855104600182018101935050506113cd565b60f88110156113ad577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41810191506113cd565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80518051602091820151919092015191011190565b806113f35761146b565b5b602081106114315782518252602092830192909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016113f4565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b600081831115611481575081610b90565b50919050565b81516114938383610fc8565b5061149e83826114a4565b50505050565b6114ac611610565b611150838460000151518485516114c1611610565b82518211156114cf57600080fd5b846020015182850111156114f1576114f18561102c8760200151878601611470565b6000808651805187602083010193508088870111156115105787860182525b505050602084015b6020841061155557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09093019260209182019101611518565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a019081169019919091161790525083949350505050565b6040805160608082018352600080835260208301529181019190915290565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b604051806040016040528060008152602001600081525090565b604051806040016040528060608152602001600081525090565b604051806040016040528061163d6115f6565b8152602001600081525090565b600082601f83011261165a578081fd5b8135602061166f61166a83611edf565b611ebb565b82815281810190858301855b858110156116a457611692898684358b010161170b565b8452928401929084019060010161167b565b5090979650505050505050565b600082601f8301126116c1578081fd5b813560206116d161166a83611edf565b82815281810190858301838502870184018810156116ed578586fd5b855b858110156116a4578135845292840192908401906001016116ef565b600082601f83011261171b578081fd5b813561172961166a82611efd565b81815284602083860101111561173d578283fd5b816020850160208301379081016020019190915292915050565b600082601f830112611767578081fd5b815161177561166a82611efd565b818152846020838601011115611789578283fd5b610200826020830160208701611f3d565b6000604082840312156117ab578081fd5b6040516040810181811067ffffffffffffffff821117156117c857fe5b604052825181526020928301519281019290925250919050565b600060c082840312156117f3578081fd5b60405160c0810181811067ffffffffffffffff8211171561181057fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600080600060608486031215611869578283fd5b833567ffffffffffffffff80821115611880578485fd5b61188c8783880161164a565b945060208601359150808211156118a1578384fd5b506118ae868287016116b1565b925050604084013590509250925092565b600080600080608085870312156118d4578081fd5b84359350602085013567ffffffffffffffff808211156118f2578283fd5b6118fe888389016116b1565b945060408701359350606087013591508082111561191a578283fd5b506119278782880161164a565b91505092959194509250565b60008060008060608587031215611948578384fd5b84359350602085013567ffffffffffffffff80821115611966578485fd5b818701915087601f830112611979578485fd5b813581811115611987578586fd5b886020828501011115611998578586fd5b95986020929092019750949560400135945092505050565b6000602082840312156119c1578081fd5b813567ffffffffffffffff8111156119d7578182fd5b6102008482850161170b565b600080604083850312156119f5578182fd5b825167ffffffffffffffff811115611a0b578283fd5b611a1785828601611757565b925050602083015190509250929050565b600080600060608486031215611a3c578283fd5b833567ffffffffffffffff811115611a52578384fd5b611a5e8682870161170b565b9660208601359650604090950135949350505050565b6000806000806000806000806101c0898b031215611a90578586fd5b885160ff81168114611aa0578687fd5b80985050602089015196506040890151955060608901519450611ac68a60808b0161179a565b9350611ad58a60c08b016117e2565b925061018089015167ffffffffffffffff80821115611af2578384fd5b611afe8c838d01611757565b93506101a08b0151915080821115611b14578283fd5b50611b218b828c01611757565b9150509295985092959890939650565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611b63816020860160208601611f3d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b6000602082526111506020830184611b4b565b600060408252611c156040830185611b4b565b90508260208301529392505050565b6020808252601c908201527f50726f6f664c69623a20696e76616c69642070726f6f662073697a6500000000604082015260600190565b6020808252601a908201527f50726f6f664c69623a20696e76616c696420686173686c696e6b000000000000604082015260600190565b6020808252601f908201527f50726f6f664c69623a207061636b6574206e6f74207265636f676e697a656400604082015260600190565b6020808252601d908201527f50726f6f664c69623a2070726f6f662073697a65206d757374203e2030000000604082015260600190565b6020808252601e908201527f50726f6f664c69623a20696e76616c696420616464726573732073697a650000604082015260600190565b60006020825261ffff8084511660208401528060208501511660408401525067ffffffffffffffff60408401511660608301526060830151611d7c6080840182611b31565b50608083015160e060a0840152611d97610100840182611b4b565b905060a084015160c084015260c08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160e08501526101e48282611b4b565b600060208252825160208301526020830151604083015260408301516060808401526102006080840182611b4b565b60ff91909116815260200190565b60006101c060ff8b16835289602084015288604084015287606084015286516080840152602087015160a0840152855160c0840152602086015160e084015260408601516101008401526060860151610120840152608086015161014084015260a086015161016084015280610180840152611e9781840186611b4b565b90508281036101a0840152611eac8185611b4b565b9b9a5050505050505050505050565b60405181810167ffffffffffffffff81118282101715611ed757fe5b604052919050565b600067ffffffffffffffff821115611ef357fe5b5060209081020190565b600067ffffffffffffffff821115611f1157fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015611f58578181015183820152602001611f40565b8381111561149e575050600091015256fe524c504465636f6465723a20696e76616c696420524c50206974656d206f66667365742073697a65524c504465636f646572206974657261746f72206973206e6f742061206c697374524c504465636f64657220746f427974657320696e76616c6964206c656e677468a2646970667358221220f90f8bf57aa160d81d5c760bc79d208ec09430fd25deeb64c26823fe06ec5cd164736f6c63430007060033",
357
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639bcd850f11610081578063d633ad611161005b578063d633ad61146101a4578063e965c192146101ac578063ea455df9146101b4576100d4565b80639bcd850f14610174578063b71e0f711461017c578063be9d395e1461018f576100d4565b806347713b39116100b257806347713b39146101375780635711c2a81461013f5780636348d2691461015f576100d4565b806305af5d35146100d95780630f222e65146100f75780632ff2044914610117575b600080fd5b6100e16101c7565b6040516100ee9190611e0b565b60405180910390f35b61010a6101053660046118bf565b6101d0565b6040516100ee9190611ddc565b61012a610125366004611a28565b6101ed565b6040516100ee9190611d37565b6100e1610208565b61015261014d3660046119b0565b610216565b6040516100ee9190611bef565b610167610229565b6040516100ee9190611bc5565b6100e161024d565b61012a61018a366004611933565b610256565b61019761041c565b6040516100ee9190611be6565b6100e1610440565b61016761044e565b6101526101c23660046119b0565b610472565b60005460ff1681565b6101d8611599565b6101e48585858561047d565b95945050505050565b6101f56115b8565b61020084848461062c565b949350505050565b600054610100900460ff1681565b60606102218261079b565b90505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460ff1690565b61025e6115b8565b600082116102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611d00565b60405180910390fd5b600080806102b186880188611855565b92509250925060006102c58984848761047d565b60208101519091507fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8214610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c92565b610338816040015187836000015161062c565b94507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156103a55761039f8560c0015161079b565b60c08601525b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16856060015173ffffffffffffffffffffffffffffffffffffffff1614156104105761040a8560c001516108bc565b60c08601525b50505050949350505050565b7fe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea8281565b600054610100900460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610221826108bc565b610485611599565b81518451146104c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c24565b60008251116104fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611cc9565b6105036115f6565b606060005b84518110156105af5784818151811061051d57fe5b6020026020010151915081805190602001208814610567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029890611c5b565b61058d87828151811061057657fe5b602002602001015161058784610966565b906109da565b925060018551038110156105a7576105a483610b96565b97505b600101610508565b5060006105c0600361058785610cb3565b905060006105d66105d183896109da565b610d3f565b90506105e0611599565b6105f16105ec83610deb565b610b96565b81526106046105ec600061058785610deb565b602082015261061a61061583610deb565b610e9b565b60408201529998505050505050505050565b6106346115b8565b60408401516048850151604a860151858701604c81015160609091015161ffff83166106c157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b6106c9611610565b6106d3818a610fc8565b506106e38160008c606a8d611002565b5060006106f18a60206110dc565b905060006106ff8883611157565b9050610709611610565b6107138183610fc8565b5061072f60008e6107258660606110dc565b8492919086611002565b506040805160e08101825261ffff988916815296909716602087015267ffffffffffffffff909716958501959095525073ffffffffffffffffffffffffffffffffffffffff909116606083015251608082015260a08101869052915160c0830152509150509392505050565b6020810151606090600160ff821614156108b5576000806000806000806000898060200190518101906107ce9190611a74565b9750975097509750975097509750506000815111156108ad578151600090156107f8575060148201515b803b806108aa576000826040516020016108129190611b95565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260208381018352600080855292519194509192610868928f928f928f928f928f928f928b9201611e19565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529c506102249b505050505050505050505050565b50505b505050505050505b5090919050565b6060600080838060200190518101906108d591906119e3565b91509150600080835111156108eb575060148201515b73ffffffffffffffffffffffffffffffffffffffff811661095d5760405161dead9060009061091e908390602001611b95565b60405160208183030381529060405290508084604051602001610942929190611c02565b60405160208183030381529060405295505050505050610224565b50929392505050565b61096e6115f6565b602082018051835160009190911a90801580159061098f575060c060ff8316105b156109be57600192909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b6040805180820190915290815260208101929092525092915050565b6109e26115f6565b6109eb836111ce565b610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611f926021913960400191505060405180910390fd5b610a4983611208565b8210610ab657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f524c50206974656d206f7574206f6620626f756e647300000000000000000000604482015290519081900360640190fd5b8251602084015190810190600090610acd90611260565b60208601510190506000805b85811015610af857610aea836112ff565b928301929150600101610ad9565b50610b02826112ff565b9050828183011115610b7557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f524c50206974656d206f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b60405180604001604052808281526020018381525093505050505b92915050565b805160009015801590610bab57508151602110155b610c1657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f524c504465636f64657220746f55696e7420696e76616c6964206c656e677468604482015290519081900360640190fd5b6000610c258360200151611260565b90508083600001511015610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611f6a6028913960400191505060405180910390fd5b825160208085015183018051928490039291831015610caa57826020036101000a820491505b50949350505050565b610cbb6115f6565b6000610cca8360200151611260565b60208401518451908201805192935060009290921a91908015801590610cf3575060c060ff8416105b15610d2257600191909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604080518082019091529081526020810191909152949350505050565b610d4761162a565b610d50826111ce565b610dbb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f524c504465636f646572206974657261746f72206973206e6f74206c69737400604482015290519081900360640190fd5b6000610dca8360200151611260565b60208085015160408051808201909152868152920190820152915050919050565b610df36115f6565b610dfc826113d4565b610e6757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f524c504465636f646572206974657261746f7220686173206e6f206e65787400604482015290519081900360640190fd5b60208201516000610e77826112ff565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611fb36021913960400191505060405180910390fd5b6000610f048360200151611260565b90508083600001511015610f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611f6a6028913960400191505060405180910390fd5b825181900360008167ffffffffffffffff81118015610f8157600080fd5b506040519080825280601f01601f191660200182016040528015610fac576020820181803683370190505b5090506000816020019050610caa8487602001510182856113e9565b610fd0611610565b6020820615610fe55760208206602003820191505b506020828101829052604080518085526000815290920101905290565b61100a611610565b85602001518286011115611034576110348661102c8860200151888601611470565b600202611487565b6000808751805188602083010193508089870111156110535788860182525b5050508484015b6020841061109757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909301926020918201910161105a565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a01908116901991909116179052508495945050505050565b60008282018381101561115057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156111c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b80516000906111df57506000610224565b6020820151805160001a9060c08210156111fe57600092505050610224565b5060019392505050565b805160009061121957506000610224565b6000806112298460200151611260565b602085015185519181019250015b8082101561125757611248826112ff565b60019093019290910190611237565b50909392505050565b8051600090811a608081101561127a576000915050610224565b60b8811080611295575060c08110801590611295575060f881105b156112a4576001915050610224565b60c08110156112d6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a019050610224565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a019050610224565b80516000908190811a608081101561131a57600191506113cd565b60b881101561134d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81810191506113cd565b60c081101561137a5760b78103600185019450806020036101000a855104600182018101935050506113cd565b60f88110156113ad577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41810191506113cd565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80518051602091820151919092015191011190565b806113f35761146b565b5b602081106114315782518252602092830192909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016113f4565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b600081831115611481575081610b90565b50919050565b81516114938383610fc8565b5061149e83826114a4565b50505050565b6114ac611610565b611150838460000151518485516114c1611610565b82518211156114cf57600080fd5b846020015182850111156114f1576114f18561102c8760200151878601611470565b6000808651805187602083010193508088870111156115105787860182525b505050602084015b6020841061155557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09093019260209182019101611518565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a019081169019919091161790525083949350505050565b6040805160608082018352600080835260208301529181019190915290565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b604051806040016040528060008152602001600081525090565b604051806040016040528060608152602001600081525090565b604051806040016040528061163d6115f6565b8152602001600081525090565b600082601f83011261165a578081fd5b8135602061166f61166a83611edf565b611ebb565b82815281810190858301855b858110156116a457611692898684358b010161170b565b8452928401929084019060010161167b565b5090979650505050505050565b600082601f8301126116c1578081fd5b813560206116d161166a83611edf565b82815281810190858301838502870184018810156116ed578586fd5b855b858110156116a4578135845292840192908401906001016116ef565b600082601f83011261171b578081fd5b813561172961166a82611efd565b81815284602083860101111561173d578283fd5b816020850160208301379081016020019190915292915050565b600082601f830112611767578081fd5b815161177561166a82611efd565b818152846020838601011115611789578283fd5b610200826020830160208701611f3d565b6000604082840312156117ab578081fd5b6040516040810181811067ffffffffffffffff821117156117c857fe5b604052825181526020928301519281019290925250919050565b600060c082840312156117f3578081fd5b60405160c0810181811067ffffffffffffffff8211171561181057fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600080600060608486031215611869578283fd5b833567ffffffffffffffff80821115611880578485fd5b61188c8783880161164a565b945060208601359150808211156118a1578384fd5b506118ae868287016116b1565b925050604084013590509250925092565b600080600080608085870312156118d4578081fd5b84359350602085013567ffffffffffffffff808211156118f2578283fd5b6118fe888389016116b1565b945060408701359350606087013591508082111561191a578283fd5b506119278782880161164a565b91505092959194509250565b60008060008060608587031215611948578384fd5b84359350602085013567ffffffffffffffff80821115611966578485fd5b818701915087601f830112611979578485fd5b813581811115611987578586fd5b886020828501011115611998578586fd5b95986020929092019750949560400135945092505050565b6000602082840312156119c1578081fd5b813567ffffffffffffffff8111156119d7578182fd5b6102008482850161170b565b600080604083850312156119f5578182fd5b825167ffffffffffffffff811115611a0b578283fd5b611a1785828601611757565b925050602083015190509250929050565b600080600060608486031215611a3c578283fd5b833567ffffffffffffffff811115611a52578384fd5b611a5e8682870161170b565b9660208601359650604090950135949350505050565b6000806000806000806000806101c0898b031215611a90578586fd5b885160ff81168114611aa0578687fd5b80985050602089015196506040890151955060608901519450611ac68a60808b0161179a565b9350611ad58a60c08b016117e2565b925061018089015167ffffffffffffffff80821115611af2578384fd5b611afe8c838d01611757565b93506101a08b0151915080821115611b14578283fd5b50611b218b828c01611757565b9150509295985092959890939650565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611b63816020860160208601611f3d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b6000602082526111506020830184611b4b565b600060408252611c156040830185611b4b565b90508260208301529392505050565b6020808252601c908201527f50726f6f664c69623a20696e76616c69642070726f6f662073697a6500000000604082015260600190565b6020808252601a908201527f50726f6f664c69623a20696e76616c696420686173686c696e6b000000000000604082015260600190565b6020808252601f908201527f50726f6f664c69623a207061636b6574206e6f74207265636f676e697a656400604082015260600190565b6020808252601d908201527f50726f6f664c69623a2070726f6f662073697a65206d757374203e2030000000604082015260600190565b6020808252601e908201527f50726f6f664c69623a20696e76616c696420616464726573732073697a650000604082015260600190565b60006020825261ffff8084511660208401528060208501511660408401525067ffffffffffffffff60408401511660608301526060830151611d7c6080840182611b31565b50608083015160e060a0840152611d97610100840182611b4b565b905060a084015160c084015260c08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160e08501526101e48282611b4b565b600060208252825160208301526020830151604083015260408301516060808401526102006080840182611b4b565b60ff91909116815260200190565b60006101c060ff8b16835289602084015288604084015287606084015286516080840152602087015160a0840152855160c0840152602086015160e084015260408601516101008401526060860151610120840152608086015161014084015260a086015161016084015280610180840152611e9781840186611b4b565b90508281036101a0840152611eac8185611b4b565b9b9a5050505050505050505050565b60405181810167ffffffffffffffff81118282101715611ed757fe5b604052919050565b600067ffffffffffffffff821115611ef357fe5b5060209081020190565b600067ffffffffffffffff821115611f1157fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015611f58578181015183820152602001611f40565b8381111561149e575050600091015256fe524c504465636f6465723a20696e76616c696420524c50206974656d206f66667365742073697a65524c504465636f646572206974657261746f72206973206e6f742061206c697374524c504465636f64657220746f427974657320696e76616c6964206c656e677468a2646970667358221220f90f8bf57aa160d81d5c760bc79d208ec09430fd25deeb64c26823fe06ec5cd164736f6c63430007060033",
358
358
  "devdoc": {
359
359
  "kind": "dev",
360
360
  "methods": {},
@@ -368,7 +368,7 @@
368
368
  "storageLayout": {
369
369
  "storage": [
370
370
  {
371
- "astId": 21191,
371
+ "astId": 21420,
372
372
  "contract": "contracts/proof/MPTValidator01.sol:MPTValidator01",
373
373
  "label": "proofType",
374
374
  "offset": 0,
@@ -376,7 +376,7 @@
376
376
  "type": "t_uint8"
377
377
  },
378
378
  {
379
- "astId": 21194,
379
+ "astId": 21423,
380
380
  "contract": "contracts/proof/MPTValidator01.sol:MPTValidator01",
381
381
  "label": "utilsVersion",
382
382
  "offset": 1,
@@ -79,7 +79,7 @@
79
79
  "type": "function"
80
80
  }
81
81
  ],
82
- "transactionHash": "0x173a743a20a0eacb916cc5f2904b0ea2652b8312931fe57cf7df3d8fa20d791c",
82
+ "transactionHash": "0xd42934583d276f9c2b5560c3fc35a0228206d092723a87d3baaa73c3a7babb21",
83
83
  "receipt": {
84
84
  "to": null,
85
85
  "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
@@ -87,10 +87,10 @@
87
87
  "transactionIndex": 0,
88
88
  "gasUsed": "294163",
89
89
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
90
- "blockHash": "0x04bf01b49b1746b63e13e55fe5f179f133ff1716eeb0cb1cc808baf62eeb9178",
91
- "transactionHash": "0x173a743a20a0eacb916cc5f2904b0ea2652b8312931fe57cf7df3d8fa20d791c",
90
+ "blockHash": "0x981172ed67f9bdd1d65abf8ea6b9863cc032fbe6120544661ae221b7b6ee3a28",
91
+ "transactionHash": "0xd42934583d276f9c2b5560c3fc35a0228206d092723a87d3baaa73c3a7babb21",
92
92
  "logs": [],
93
- "blockNumber": 10,
93
+ "blockNumber": 11,
94
94
  "cumulativeGasUsed": "294163",
95
95
  "status": 1,
96
96
  "byzantium": true
@@ -99,10 +99,10 @@
99
99
  "0x8464135c8F25Da09e49BC8782676a84730C318bC"
100
100
  ],
101
101
  "numDeployments": 1,
102
- "solcInputHash": "26073710b59023fa12a4a7fdb81fff44",
103
- "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_endpoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"endpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_ua\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"increment\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"outboundNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/NonceContract.sol\":\"NonceContract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"contracts/NonceContract.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\n\\ncontract NonceContract {\\n ILayerZeroEndpoint public immutable endpoint;\\n // outboundNonce = [dstChainId][remoteAddress + localAddress]\\n mapping(uint16 => mapping(bytes => uint64)) public outboundNonce;\\n\\n constructor(address _endpoint) {\\n endpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function increment(uint16 _chainId, address _ua, bytes calldata _path) external returns (uint64) {\\n require(\\n endpoint.getSendLibraryAddress(_ua) == msg.sender,\\n \\\"NonceContract: msg.sender is not valid sendlibrary\\\"\\n );\\n return ++outboundNonce[_chainId][_path];\\n }\\n}\\n\",\"keccak256\":\"0x5f99165219fc2d46d48e943ec072b0f55f01398afe167d61cd671d1440ff53c3\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xb6a446c0b622566f8c2e2ae4c32208bcc3f815c5f5657a27fa48d583e31f7b7d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xdc7e072cf3064081a8edf4a286ca43ddecc24330f2923d96f416f9d3f6538447\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
104
- "bytecode": "0x60a060405234801561001057600080fd5b506040516104c53803806104c58339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b031661045961006c600039806101dd528061021a52506104596000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635e280f11146100465780636fe7b67314610077578063c533338f1461012a575b600080fd5b61004e6101db565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6004803603606081101561008d57600080fd5b61ffff8235169173ffffffffffffffffffffffffffffffffffffffff602082013516918101906060810160408201356401000000008111156100ce57600080fd5b8201836020820111156100e057600080fd5b8035906020019184600183028401116401000000008311171561010257600080fd5b5090925090506101ff565b6040805167ffffffffffffffff9092168252519081900360200190f35b61010d6004803603604081101561014057600080fd5b61ffff823516919081019060408101602082013564010000000081111561016657600080fd5b82018360208201111561017857600080fd5b8035906020019184600183028401116401000000008311171561019a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103bc945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639c729da1866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561029f57600080fd5b505afa1580156102b3573d6000803e3d6000fd5b505050506040513d60208110156102c957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614610337576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806103f26032913960400191505060405180910390fd5b6000808661ffff1661ffff1681526020019081526020016000208383604051808383808284379190910194855250506040516020938190039390930190922080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008116600167ffffffffffffffff9283160191821617909155979650505050505050565b6000602081815292815260409020815180830184018051928152908401929093019190912091525467ffffffffffffffff168156fe4e6f6e6365436f6e74726163743a206d73672e73656e646572206973206e6f742076616c69642073656e646c696272617279a2646970667358221220c1bfb2490cbea6bde5984d565ddc2a5410b5e6cba68523297196b3324e05319f64736f6c63430007060033",
105
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635e280f11146100465780636fe7b67314610077578063c533338f1461012a575b600080fd5b61004e6101db565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6004803603606081101561008d57600080fd5b61ffff8235169173ffffffffffffffffffffffffffffffffffffffff602082013516918101906060810160408201356401000000008111156100ce57600080fd5b8201836020820111156100e057600080fd5b8035906020019184600183028401116401000000008311171561010257600080fd5b5090925090506101ff565b6040805167ffffffffffffffff9092168252519081900360200190f35b61010d6004803603604081101561014057600080fd5b61ffff823516919081019060408101602082013564010000000081111561016657600080fd5b82018360208201111561017857600080fd5b8035906020019184600183028401116401000000008311171561019a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103bc945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639c729da1866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561029f57600080fd5b505afa1580156102b3573d6000803e3d6000fd5b505050506040513d60208110156102c957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614610337576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806103f26032913960400191505060405180910390fd5b6000808661ffff1661ffff1681526020019081526020016000208383604051808383808284379190910194855250506040516020938190039390930190922080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008116600167ffffffffffffffff9283160191821617909155979650505050505050565b6000602081815292815260409020815180830184018051928152908401929093019190912091525467ffffffffffffffff168156fe4e6f6e6365436f6e74726163743a206d73672e73656e646572206973206e6f742076616c69642073656e646c696272617279a2646970667358221220c1bfb2490cbea6bde5984d565ddc2a5410b5e6cba68523297196b3324e05319f64736f6c63430007060033",
102
+ "solcInputHash": "12c423ed555aea5404eb3b1e98eff6eb",
103
+ "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_endpoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"endpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_ua\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"increment\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"outboundNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/NonceContract.sol\":\"NonceContract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":30000},\"remappings\":[]},\"sources\":{\"contracts/NonceContract.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\n\\ncontract NonceContract {\\n ILayerZeroEndpoint public immutable endpoint;\\n // outboundNonce = [dstChainId][remoteAddress + localAddress]\\n mapping(uint16 => mapping(bytes => uint64)) public outboundNonce;\\n\\n constructor(address _endpoint) {\\n endpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function increment(uint16 _chainId, address _ua, bytes calldata _path) external returns (uint64) {\\n require(\\n endpoint.getSendLibraryAddress(_ua) == msg.sender,\\n \\\"NonceContract: msg.sender is not valid sendlibrary\\\"\\n );\\n return ++outboundNonce[_chainId][_path];\\n }\\n}\\n\",\"keccak256\":\"0x5f99165219fc2d46d48e943ec072b0f55f01398afe167d61cd671d1440ff53c3\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xb6a446c0b622566f8c2e2ae4c32208bcc3f815c5f5657a27fa48d583e31f7b7d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xdc7e072cf3064081a8edf4a286ca43ddecc24330f2923d96f416f9d3f6538447\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
104
+ "bytecode": "0x60a060405234801561001057600080fd5b506040516104c53803806104c58339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b031661045961006c600039806101dd528061021a52506104596000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635e280f11146100465780636fe7b67314610077578063c533338f1461012a575b600080fd5b61004e6101db565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6004803603606081101561008d57600080fd5b61ffff8235169173ffffffffffffffffffffffffffffffffffffffff602082013516918101906060810160408201356401000000008111156100ce57600080fd5b8201836020820111156100e057600080fd5b8035906020019184600183028401116401000000008311171561010257600080fd5b5090925090506101ff565b6040805167ffffffffffffffff9092168252519081900360200190f35b61010d6004803603604081101561014057600080fd5b61ffff823516919081019060408101602082013564010000000081111561016657600080fd5b82018360208201111561017857600080fd5b8035906020019184600183028401116401000000008311171561019a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103bc945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639c729da1866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561029f57600080fd5b505afa1580156102b3573d6000803e3d6000fd5b505050506040513d60208110156102c957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614610337576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806103f26032913960400191505060405180910390fd5b6000808661ffff1661ffff1681526020019081526020016000208383604051808383808284379190910194855250506040516020938190039390930190922080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008116600167ffffffffffffffff9283160191821617909155979650505050505050565b6000602081815292815260409020815180830184018051928152908401929093019190912091525467ffffffffffffffff168156fe4e6f6e6365436f6e74726163743a206d73672e73656e646572206973206e6f742076616c69642073656e646c696272617279a2646970667358221220afafcc3ab7d18f838c9c0f24cbad3ff228610acf8df48ce2767e0ec2e6c6a1b164736f6c63430007060033",
105
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635e280f11146100465780636fe7b67314610077578063c533338f1461012a575b600080fd5b61004e6101db565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61010d6004803603606081101561008d57600080fd5b61ffff8235169173ffffffffffffffffffffffffffffffffffffffff602082013516918101906060810160408201356401000000008111156100ce57600080fd5b8201836020820111156100e057600080fd5b8035906020019184600183028401116401000000008311171561010257600080fd5b5090925090506101ff565b6040805167ffffffffffffffff9092168252519081900360200190f35b61010d6004803603604081101561014057600080fd5b61ffff823516919081019060408101602082013564010000000081111561016657600080fd5b82018360208201111561017857600080fd5b8035906020019184600183028401116401000000008311171561019a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103bc945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639c729da1866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561029f57600080fd5b505afa1580156102b3573d6000803e3d6000fd5b505050506040513d60208110156102c957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614610337576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806103f26032913960400191505060405180910390fd5b6000808661ffff1661ffff1681526020019081526020016000208383604051808383808284379190910194855250506040516020938190039390930190922080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008116600167ffffffffffffffff9283160191821617909155979650505050505050565b6000602081815292815260409020815180830184018051928152908401929093019190912091525467ffffffffffffffff168156fe4e6f6e6365436f6e74726163743a206d73672e73656e646572206973206e6f742076616c69642073656e646c696272617279a2646970667358221220afafcc3ab7d18f838c9c0f24cbad3ff228610acf8df48ce2767e0ec2e6c6a1b164736f6c63430007060033",
106
106
  "devdoc": {
107
107
  "kind": "dev",
108
108
  "methods": {},