Cipher-Zero/contracts/bridges/bridge/zksync/libraries/artifacts/build-info/260927caa0e6a83c11f4d8a8146dcdd4.json
2024-09-01 23:29:11 +03:00

2697 lines
86 KiB
JSON

{
"id": "260927caa0e6a83c11f4d8a8146dcdd4",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/bridges/bridge/zksync/libraries/Merkle.sol": {
"content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.13;\r\n\r\nimport \"../../common/libraries/UncheckedMath.sol\";\r\n\r\n/// @author Matter Labs\r\n/// @custom:security-contact security@matterlabs.dev\r\nlibrary Merkle {\r\n using UncheckedMath for uint256;\r\n\r\n /// @dev Calculate Merkle root by the provided Merkle proof.\r\n /// NOTE: When using this function, check that the _path length is equal to the tree height to prevent shorter/longer paths attack\r\n /// @param _path Merkle path from the leaf to the root\r\n /// @param _index Leaf index in the tree\r\n /// @param _itemHash Hash of leaf content\r\n /// @return The Merkle root\r\n function calculateRoot(\r\n bytes32[] calldata _path,\r\n uint256 _index,\r\n bytes32 _itemHash\r\n ) internal pure returns (bytes32) {\r\n uint256 pathLength = _path.length;\r\n require(pathLength > 0, \"xc\");\r\n require(pathLength < 256, \"bt\");\r\n require(_index < (1 << pathLength), \"px\");\r\n\r\n bytes32 currentHash = _itemHash;\r\n for (uint256 i; i < pathLength; i = i.uncheckedInc()) {\r\n currentHash = (_index % 2 == 0)\r\n ? _efficientHash(currentHash, _path[i])\r\n : _efficientHash(_path[i], currentHash);\r\n _index /= 2;\r\n }\r\n\r\n return currentHash;\r\n }\r\n\r\n /// @dev Keccak hash of the concatenation of two 32-byte words\r\n function _efficientHash(bytes32 _lhs, bytes32 _rhs) private pure returns (bytes32 result) {\r\n assembly {\r\n mstore(0x00, _lhs)\r\n mstore(0x20, _rhs)\r\n result := keccak256(0x00, 0x40)\r\n }\r\n }\r\n}\r\n"
},
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.13;\r\n\r\n/**\r\n * @author Matter Labs\r\n * @custom:security-contact security@matterlabs.dev\r\n * @notice The library for unchecked math.\r\n */\r\nlibrary UncheckedMath {\r\n function uncheckedInc(uint256 _number) internal pure returns (uint256) {\r\n unchecked {\r\n return _number + 1;\r\n }\r\n }\r\n\r\n function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) {\r\n unchecked {\r\n return _lhs + _rhs;\r\n }\r\n }\r\n}\r\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"UncheckedMath": {
"abi": [],
"devdoc": {
"author": "Matter Labs",
"custom:security-contact": "security@matterlabs.dev",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":194:533 library UncheckedMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":194:533 library UncheckedMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMPDEST 0xD8 EXTCODEHASH SWAP8 0xD7 0xC3 PUSH25 0xFA45458026C62282A19FB35AF7F45774396C0421868FFC9E3A PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "194:339:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMPDEST 0xD8 EXTCODEHASH SWAP8 0xD7 0xC3 PUSH25 0xFA45458026C62282A19FB35AF7F45774396C0421868FFC9E3A PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "194:339:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"uncheckedAdd(uint256,uint256)": "infinite",
"uncheckedInc(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 194,
"end": 533,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "CODECOPY",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "DUP1",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "MLOAD",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "BYTE",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 194,
"end": 533,
"name": "EQ",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 194,
"end": 533,
"name": "JUMPI",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "REVERT",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 194,
"end": 533,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "ADDRESS",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 194,
"end": 533,
"name": "DUP2",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "MSTORE8",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "DUP3",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "DUP2",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212205bd83f97d7c378fa45458026c62282a19fb35af7f45774396c0421868ffc9e3a64736f6c634300081a0033",
".code": [
{
"begin": 194,
"end": 533,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "ADDRESS",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "EQ",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 194,
"end": 533,
"name": "MSTORE",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 194,
"end": 533,
"name": "DUP1",
"source": 0
},
{
"begin": 194,
"end": 533,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"contracts/bridges/bridge/zksync/libraries/Merkle.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Matter Labs\",\"custom:security-contact\":\"security@matterlabs.dev\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"The library for unchecked math.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":\"UncheckedMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":{\"keccak256\":\"0x2cf9e93e085f3261240197efe90c17f47635db4cb9dc3f6006e229334d72464f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c2750b3ec07b265e363a99a422c2fe98b14629f849a7f7e04532c25bf6c57e3\",\"dweb:/ipfs/QmcfvmA4dh1hTp45ogvXPmTVcdz9Cq6je3QnrbZdBbPfZY\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"notice": "The library for unchecked math.",
"version": 1
}
}
},
"contracts/bridges/bridge/zksync/libraries/Merkle.sol": {
"Merkle": {
"abi": [],
"devdoc": {
"author": "Matter Labs",
"custom:security-contact": "security@matterlabs.dev",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/bridges/bridge/zksync/libraries/Merkle.sol\":196:1636 library Merkle {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/bridges/bridge/zksync/libraries/Merkle.sol\":196:1636 library Merkle {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201eeb0d94a9c2bdb752ae5babaa030413f8606405c126effb9827fa03afc36cca64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201eeb0d94a9c2bdb752ae5babaa030413f8606405c126effb9827fa03afc36cca64736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1E 0xEB 0xD SWAP5 0xA9 0xC2 0xBD 0xB7 MSTORE 0xAE JUMPDEST 0xAB 0xAA SUB DIV SGT 0xF8 PUSH1 0x64 SDIV 0xC1 0x26 0xEF 0xFB SWAP9 0x27 STATICCALL SUB 0xAF 0xC3 PUSH13 0xCA64736F6C634300081A003300 ",
"sourceMap": "196:1440:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201eeb0d94a9c2bdb752ae5babaa030413f8606405c126effb9827fa03afc36cca64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1E 0xEB 0xD SWAP5 0xA9 0xC2 0xBD 0xB7 MSTORE 0xAE JUMPDEST 0xAB 0xAA SUB DIV SGT 0xF8 PUSH1 0x64 SDIV 0xC1 0x26 0xEF 0xFB SWAP9 0x27 STATICCALL SUB 0xAF 0xC3 PUSH13 0xCA64736F6C634300081A003300 ",
"sourceMap": "196:1440:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"_efficientHash(bytes32,bytes32)": "infinite",
"calculateRoot(bytes32[] calldata,uint256,bytes32)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 196,
"end": 1636,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 196,
"end": 1636,
"name": "DUP3",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "DUP3",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "DUP3",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "CODECOPY",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "DUP1",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "MLOAD",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "BYTE",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 196,
"end": 1636,
"name": "EQ",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 196,
"end": 1636,
"name": "JUMPI",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "MSTORE",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "4"
},
{
"begin": 196,
"end": 1636,
"name": "MSTORE",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "24"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "REVERT",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 196,
"end": 1636,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "ADDRESS",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "MSTORE",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 196,
"end": 1636,
"name": "DUP2",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "MSTORE8",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "DUP3",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "DUP2",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a26469706673582212201eeb0d94a9c2bdb752ae5babaa030413f8606405c126effb9827fa03afc36cca64736f6c634300081a0033",
".code": [
{
"begin": 196,
"end": 1636,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "ADDRESS",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "EQ",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 196,
"end": 1636,
"name": "MSTORE",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 196,
"end": 1636,
"name": "DUP1",
"source": 1
},
{
"begin": 196,
"end": 1636,
"name": "REVERT",
"source": 1
}
]
}
},
"sourceList": [
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"contracts/bridges/bridge/zksync/libraries/Merkle.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Matter Labs\",\"custom:security-contact\":\"security@matterlabs.dev\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/zksync/libraries/Merkle.sol\":\"Merkle\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/common/libraries/UncheckedMath.sol\":{\"keccak256\":\"0x2cf9e93e085f3261240197efe90c17f47635db4cb9dc3f6006e229334d72464f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c2750b3ec07b265e363a99a422c2fe98b14629f849a7f7e04532c25bf6c57e3\",\"dweb:/ipfs/QmcfvmA4dh1hTp45ogvXPmTVcdz9Cq6je3QnrbZdBbPfZY\"]},\"contracts/bridges/bridge/zksync/libraries/Merkle.sol\":{\"keccak256\":\"0xc4bf1ccf0587ce2b871709691b6152ae3b2ac9c590a99bfe478290a1d24e5c0e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d2661947e97be6dd7502ce94f9027cbe7ea304df612784a6d6059009b53c6cbe\",\"dweb:/ipfs/QmRfMJ5RTzbcpaibxuWtdXvpAUaXT4voVNZcBKkDTqCzMP\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/bridges/bridge/common/libraries/UncheckedMath.sol": {
"ast": {
"absolutePath": "contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"exportedSymbols": {
"UncheckedMath": [
31
]
},
"id": 32,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "35:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "UncheckedMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "63:129:0",
"text": " @author Matter Labs\n @custom:security-contact security@matterlabs.dev\n @notice The library for unchecked math."
},
"fullyImplemented": true,
"id": 31,
"linearizedBaseContracts": [
31
],
"name": "UncheckedMath",
"nameLocation": "202:13:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 14,
"nodeType": "Block",
"src": "294:73:0",
"statements": [
{
"id": 13,
"nodeType": "UncheckedBlock",
"src": "305:55:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 11,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 9,
"name": "_number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "337:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "347:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "337:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 8,
"id": 12,
"nodeType": "Return",
"src": "330:18:0"
}
]
}
]
},
"id": 15,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "uncheckedInc",
"nameLocation": "232:12:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "_number",
"nameLocation": "253:7:0",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "245:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "245:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "244:17:0"
},
"returnParameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "285:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "285:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "284:9:0"
},
"scope": 31,
"src": "223:144:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 29,
"nodeType": "Block",
"src": "457:73:0",
"statements": [
{
"id": 28,
"nodeType": "UncheckedBlock",
"src": "468:55:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 24,
"name": "_lhs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17,
"src": "500:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 25,
"name": "_rhs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19,
"src": "507:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "500:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 23,
"id": 27,
"nodeType": "Return",
"src": "493:18:0"
}
]
}
]
},
"id": 30,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "uncheckedAdd",
"nameLocation": "384:12:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17,
"mutability": "mutable",
"name": "_lhs",
"nameLocation": "405:4:0",
"nodeType": "VariableDeclaration",
"scope": 30,
"src": "397:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 16,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "397:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "_rhs",
"nameLocation": "419:4:0",
"nodeType": "VariableDeclaration",
"scope": 30,
"src": "411:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 18,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "411:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "396:28:0"
},
"returnParameters": {
"id": 23,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 30,
"src": "448:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "448:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "447:9:0"
},
"scope": 31,
"src": "375:155:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 32,
"src": "194:339:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "35:500:0"
},
"id": 0
},
"contracts/bridges/bridge/zksync/libraries/Merkle.sol": {
"ast": {
"absolutePath": "contracts/bridges/bridge/zksync/libraries/Merkle.sol",
"exportedSymbols": {
"Merkle": [
140
],
"UncheckedMath": [
31
]
},
"id": 141,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 33,
"literals": [
"solidity",
"^",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "35:24:1"
},
{
"absolutePath": "contracts/bridges/bridge/common/libraries/UncheckedMath.sol",
"file": "../../common/libraries/UncheckedMath.sol",
"id": 34,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 141,
"sourceUnit": 32,
"src": "63:50:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Merkle",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 35,
"nodeType": "StructuredDocumentation",
"src": "117:79:1",
"text": "@author Matter Labs\n @custom:security-contact security@matterlabs.dev"
},
"fullyImplemented": true,
"id": 140,
"linearizedBaseContracts": [
140
],
"name": "Merkle",
"nameLocation": "204:6:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"global": false,
"id": 38,
"libraryName": {
"id": 36,
"name": "UncheckedMath",
"nameLocations": [
"224:13:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 31,
"src": "224:13:1"
},
"nodeType": "UsingForDirective",
"src": "218:32:1",
"typeName": {
"id": 37,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "242:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 126,
"nodeType": "Block",
"src": "796:523:1",
"statements": [
{
"assignments": [
52
],
"declarations": [
{
"constant": false,
"id": 52,
"mutability": "mutable",
"name": "pathLength",
"nameLocation": "815:10:1",
"nodeType": "VariableDeclaration",
"scope": 126,
"src": "807:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 51,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "807:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 55,
"initialValue": {
"expression": {
"id": 53,
"name": "_path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 42,
"src": "828:5:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
"typeString": "bytes32[] calldata"
}
},
"id": 54,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "834:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "828:12:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "807:33:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 59,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 57,
"name": "pathLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 52,
"src": "859:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 58,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "872:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "859:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "7863",
"id": 60,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "875:4:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_54fc0399cbca13a28accdfb21ecc63af8da76dc5ff7ebbbc1a42052730a6b247",
"typeString": "literal_string \"xc\""
},
"value": "xc"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_54fc0399cbca13a28accdfb21ecc63af8da76dc5ff7ebbbc1a42052730a6b247",
"typeString": "literal_string \"xc\""
}
],
"id": 56,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "851:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "851:29:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 62,
"nodeType": "ExpressionStatement",
"src": "851:29:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 66,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 64,
"name": "pathLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 52,
"src": "899:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"hexValue": "323536",
"id": 65,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "912:3:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "256"
},
"src": "899:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "6274",
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "917:4:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1e06029ee24ae43e96e809634ae8d4b731b4fe51d5d97ab01ef4d4a865ceb746",
"typeString": "literal_string \"bt\""
},
"value": "bt"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1e06029ee24ae43e96e809634ae8d4b731b4fe51d5d97ab01ef4d4a865ceb746",
"typeString": "literal_string \"bt\""
}
],
"id": 63,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "891:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 68,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "891:31:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 69,
"nodeType": "ExpressionStatement",
"src": "891:31:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 76,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 71,
"name": "_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 44,
"src": "941:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 74,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "31",
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "951:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression": {
"id": 73,
"name": "pathLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 52,
"src": "956:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "951:15:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 75,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "950:17:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "941:26:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "7078",
"id": 77,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "969:4:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f37424abf7f6f28d973ffe4b8c4348cad65e824ae687e68a78f46e684c928424",
"typeString": "literal_string \"px\""
},
"value": "px"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f37424abf7f6f28d973ffe4b8c4348cad65e824ae687e68a78f46e684c928424",
"typeString": "literal_string \"px\""
}
],
"id": 70,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "933:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 78,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "933:41:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 79,
"nodeType": "ExpressionStatement",
"src": "933:41:1"
},
{
"assignments": [
81
],
"declarations": [
{
"constant": false,
"id": 81,
"mutability": "mutable",
"name": "currentHash",
"nameLocation": "995:11:1",
"nodeType": "VariableDeclaration",
"scope": 126,
"src": "987:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 80,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "987:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 83,
"initialValue": {
"id": 82,
"name": "_itemHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46,
"src": "1009:9:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "987:31:1"
},
{
"body": {
"id": 122,
"nodeType": "Block",
"src": "1083:198:1",
"statements": [
{
"expression": {
"id": 116,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 96,
"name": "currentHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 81,
"src": "1098:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"condition": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 97,
"name": "_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 44,
"src": "1113:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "32",
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1122:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1113:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 100,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1127:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1113:15:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 102,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1112:17:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"arguments": [
{
"baseExpression": {
"id": 110,
"name": "_path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 42,
"src": "1221:5:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
"typeString": "bytes32[] calldata"
}
},
"id": 112,
"indexExpression": {
"id": 111,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "1227:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1221:8:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 113,
"name": "currentHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 81,
"src": "1231:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 109,
"name": "_efficientHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "1206:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
"typeString": "function (bytes32,bytes32) pure returns (bytes32)"
}
},
"id": 114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1206:37:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1112:131:1",
"trueExpression": {
"arguments": [
{
"id": 104,
"name": "currentHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 81,
"src": "1164:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"baseExpression": {
"id": 105,
"name": "_path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 42,
"src": "1177:5:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
"typeString": "bytes32[] calldata"
}
},
"id": 107,
"indexExpression": {
"id": 106,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "1183:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1177:8:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 103,
"name": "_efficientHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "1149:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
"typeString": "function (bytes32,bytes32) pure returns (bytes32)"
}
},
"id": 108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1149:37:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1098:145:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 117,
"nodeType": "ExpressionStatement",
"src": "1098:145:1"
},
{
"expression": {
"id": 120,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 118,
"name": "_index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 44,
"src": "1258:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "32",
"id": 119,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1268:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1258:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 121,
"nodeType": "ExpressionStatement",
"src": "1258:11:1"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 89,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 87,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "1045:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 88,
"name": "pathLength",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 52,
"src": "1049:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1045:14:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 123,
"initializationExpression": {
"assignments": [
85
],
"declarations": [
{
"constant": false,
"id": 85,
"mutability": "mutable",
"name": "i",
"nameLocation": "1042:1:1",
"nodeType": "VariableDeclaration",
"scope": 123,
"src": "1034:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 84,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1034:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 86,
"nodeType": "VariableDeclarationStatement",
"src": "1034:9:1"
},
"isSimpleCounterLoop": false,
"loopExpression": {
"expression": {
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 90,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "1061:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 91,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "1065:1:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 92,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1067:12:1",
"memberName": "uncheckedInc",
"nodeType": "MemberAccess",
"referencedDeclaration": 15,
"src": "1065:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$",
"typeString": "function (uint256) pure returns (uint256)"
}
},
"id": 93,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1065:16:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1061:20:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 95,
"nodeType": "ExpressionStatement",
"src": "1061:20:1"
},
"nodeType": "ForStatement",
"src": "1029:252:1"
},
{
"expression": {
"id": 124,
"name": "currentHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 81,
"src": "1300:11:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 50,
"id": 125,
"nodeType": "Return",
"src": "1293:18:1"
}
]
},
"documentation": {
"id": 39,
"nodeType": "StructuredDocumentation",
"src": "258:382:1",
"text": "@dev Calculate Merkle root by the provided Merkle proof.\n NOTE: When using this function, check that the _path length is equal to the tree height to prevent shorter/longer paths attack\n @param _path Merkle path from the leaf to the root\n @param _index Leaf index in the tree\n @param _itemHash Hash of leaf content\n @return The Merkle root"
},
"id": 127,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "calculateRoot",
"nameLocation": "655:13:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 47,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 42,
"mutability": "mutable",
"name": "_path",
"nameLocation": "698:5:1",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "679:24:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
"typeString": "bytes32[]"
},
"typeName": {
"baseType": {
"id": 40,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "679:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 41,
"nodeType": "ArrayTypeName",
"src": "679:9:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
"typeString": "bytes32[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 44,
"mutability": "mutable",
"name": "_index",
"nameLocation": "722:6:1",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "714:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 43,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "714:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46,
"mutability": "mutable",
"name": "_itemHash",
"nameLocation": "747:9:1",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "739:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 45,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "739:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "668:95:1"
},
"returnParameters": {
"id": 50,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 49,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 127,
"src": "787:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 48,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "787:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "786:9:1"
},
"scope": 140,
"src": "646:673:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 138,
"nodeType": "Block",
"src": "1485:148:1",
"statements": [
{
"AST": {
"nativeSrc": "1505:121:1",
"nodeType": "YulBlock",
"src": "1505:121:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1527:4:1",
"nodeType": "YulLiteral",
"src": "1527:4:1",
"type": "",
"value": "0x00"
},
{
"name": "_lhs",
"nativeSrc": "1533:4:1",
"nodeType": "YulIdentifier",
"src": "1533:4:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1520:6:1",
"nodeType": "YulIdentifier",
"src": "1520:6:1"
},
"nativeSrc": "1520:18:1",
"nodeType": "YulFunctionCall",
"src": "1520:18:1"
},
"nativeSrc": "1520:18:1",
"nodeType": "YulExpressionStatement",
"src": "1520:18:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1559:4:1",
"nodeType": "YulLiteral",
"src": "1559:4:1",
"type": "",
"value": "0x20"
},
{
"name": "_rhs",
"nativeSrc": "1565:4:1",
"nodeType": "YulIdentifier",
"src": "1565:4:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1552:6:1",
"nodeType": "YulIdentifier",
"src": "1552:6:1"
},
"nativeSrc": "1552:18:1",
"nodeType": "YulFunctionCall",
"src": "1552:18:1"
},
"nativeSrc": "1552:18:1",
"nodeType": "YulExpressionStatement",
"src": "1552:18:1"
},
{
"nativeSrc": "1584:31:1",
"nodeType": "YulAssignment",
"src": "1584:31:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1604:4:1",
"nodeType": "YulLiteral",
"src": "1604:4:1",
"type": "",
"value": "0x00"
},
{
"kind": "number",
"nativeSrc": "1610:4:1",
"nodeType": "YulLiteral",
"src": "1610:4:1",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "keccak256",
"nativeSrc": "1594:9:1",
"nodeType": "YulIdentifier",
"src": "1594:9:1"
},
"nativeSrc": "1594:21:1",
"nodeType": "YulFunctionCall",
"src": "1594:21:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "1584:6:1",
"nodeType": "YulIdentifier",
"src": "1584:6:1"
}
]
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 130,
"isOffset": false,
"isSlot": false,
"src": "1533:4:1",
"valueSize": 1
},
{
"declaration": 132,
"isOffset": false,
"isSlot": false,
"src": "1565:4:1",
"valueSize": 1
},
{
"declaration": 135,
"isOffset": false,
"isSlot": false,
"src": "1584:6:1",
"valueSize": 1
}
],
"id": 137,
"nodeType": "InlineAssembly",
"src": "1496:130:1"
}
]
},
"documentation": {
"id": 128,
"nodeType": "StructuredDocumentation",
"src": "1327:62:1",
"text": "@dev Keccak hash of the concatenation of two 32-byte words"
},
"id": 139,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_efficientHash",
"nameLocation": "1404:14:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 133,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 130,
"mutability": "mutable",
"name": "_lhs",
"nameLocation": "1427:4:1",
"nodeType": "VariableDeclaration",
"scope": 139,
"src": "1419:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 129,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1419:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 132,
"mutability": "mutable",
"name": "_rhs",
"nameLocation": "1441:4:1",
"nodeType": "VariableDeclaration",
"scope": 139,
"src": "1433:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 131,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1433:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1418:28:1"
},
"returnParameters": {
"id": 136,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 135,
"mutability": "mutable",
"name": "result",
"nameLocation": "1477:6:1",
"nodeType": "VariableDeclaration",
"scope": 139,
"src": "1469:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 134,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1469:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1468:16:1"
},
"scope": 140,
"src": "1395:238:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "private"
}
],
"scope": 141,
"src": "196:1440:1",
"usedErrors": [],
"usedEvents": []
}
],
"src": "35:1603:1"
},
"id": 1
}
}
}
}