1887 lines
64 KiB
JSON
1887 lines
64 KiB
JSON
{
|
|
"id": "f8c3849081a5cffe5bfee291444997d1",
|
|
"_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/LibMap.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.13;\r\n\r\n/// @notice Library for storage of packed unsigned integers.\r\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibMap.sol)\r\nlibrary LibMap {\r\n /// @dev A uint32 map in storage.\r\n struct Uint32Map {\r\n mapping(uint256 => uint256) map;\r\n }\r\n\r\n /// @dev Retrieves the uint32 value at a specific index from the Uint32Map.\r\n /// @param _map The Uint32Map instance containing the packed uint32 values.\r\n /// @param _index The index of the uint32 value to retrieve.\r\n /// @return result The uint32 value at the specified index.\r\n function get(Uint32Map storage _map, uint256 _index) internal view returns (uint32 result) {\r\n unchecked {\r\n // Each storage slot can store 256 bits of data.\r\n // As uint32 is 32 bits long, 8 uint32s can be packed into one storage slot.\r\n // Hence, `_index / 8` is done to find the storage slot that contains the required uint32.\r\n uint256 mapValue = _map.map[_index / 8];\r\n\r\n // First three bits of the original `_index` denotes the position of the uint32 in that slot.\r\n // So, '(_index & 7) * 32' is done to find the bit position of the uint32 in that storage slot.\r\n uint256 bitOffset = (_index & 7) * 32;\r\n\r\n // Shift the bits to the right and retrieve the uint32 value.\r\n result = uint32(mapValue >> bitOffset);\r\n }\r\n }\r\n\r\n /// @dev Updates the uint32 value at `_index` in `map`.\r\n /// @param _map The Uint32Map instance containing the packed uint32 values.\r\n /// @param _index The index of the uint32 value to retrieve.\r\n /// @param _value The new value at the specified index.\r\n function set(\r\n Uint32Map storage _map,\r\n uint256 _index,\r\n uint32 _value\r\n ) internal {\r\n unchecked {\r\n // Each storage slot can store 256 bits of data.\r\n // As uint32 is 32 bits long, 8 uint32s can be packed into one storage slot.\r\n // Hence, `_index / 8` is done to find the storage slot that contains the required uint32.\r\n uint256 mapIndex = _index / 8;\r\n uint256 mapValue = _map.map[mapIndex];\r\n\r\n // First three bits of the original `_index` denotes the position of the uint32 in that slot.\r\n // So, '(_index & 7) * 32' is done to find the bit position of the uint32 in that storage slot.\r\n uint256 bitOffset = (_index & 7) * 32;\r\n\r\n // XORing a value A with B, and then with A again, gives the original value B.\r\n // We will use this property to update the uint32 value in the slot.\r\n\r\n // Shift the bits to the right and retrieve the uint32 value.\r\n uint32 oldValue = uint32(mapValue >> bitOffset);\r\n\r\n // Calculate the XOR of the new value and the existing value.\r\n uint256 newValueXorOldValue = uint256(oldValue ^ _value);\r\n\r\n // Finally, we XOR the slot with the XOR of the new value and the existing value,\r\n // shifted to its proper position. The XOR operation will effectively replace the old value with the new value.\r\n _map.map[mapIndex] = (newValueXorOldValue << bitOffset) ^ mapValue;\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/zksync/libraries/LibMap.sol": {
|
|
"LibMap": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"author": "Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibMap.sol)",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"contracts/bridges/bridge/zksync/libraries/LibMap.sol\":213:3302 library LibMap {... */\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/LibMap.sol\":213:3302 library LibMap {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201f108259ac20e56533bc8ce452830c892bb5d919e9d0caeaccabe6ccc7e9fdec64736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201f108259ac20e56533bc8ce452830c892bb5d919e9d0caeaccabe6ccc7e9fdec64736f6c634300081a0033",
|
|
"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 0x1F LT DUP3 MSIZE 0xAC KECCAK256 0xE5 PUSH6 0x33BC8CE45283 0xC DUP10 0x2B 0xB5 0xD9 NOT 0xE9 0xD0 0xCA 0xEA 0xCC 0xAB 0xE6 0xCC 0xC7 0xE9 REVERT 0xEC PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "213:3089:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201f108259ac20e56533bc8ce452830c892bb5d919e9d0caeaccabe6ccc7e9fdec64736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1F LT DUP3 MSIZE 0xAC KECCAK256 0xE5 PUSH6 0x33BC8CE45283 0xC DUP10 0x2B 0xB5 0xD9 NOT 0xE9 0xD0 0xCA 0xEA 0xCC 0xAB 0xE6 0xCC 0xC7 0xE9 REVERT 0xEC PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "213:3089:0:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"get(struct LibMap.Uint32Map storage pointer,uint256)": "infinite",
|
|
"set(struct LibMap.Uint32Map storage pointer,uint256,uint32)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH #[$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH [$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "CODECOPY",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MLOAD",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "BYTE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH [tag]",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "JUMPI",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "tag",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "JUMPDEST",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MSTORE8",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "RETURN",
|
|
"source": 0
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a26469706673582212201f108259ac20e56533bc8ce452830c892bb5d919e9d0caeaccabe6ccc7e9fdec64736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 213,
|
|
"end": 3302,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"contracts/bridges/bridge/zksync/libraries/LibMap.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibMap.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Library for storage of packed unsigned integers.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/zksync/libraries/LibMap.sol\":\"LibMap\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/zksync/libraries/LibMap.sol\":{\"keccak256\":\"0x8d50cd9c46e6075eab39b21614b00cedc136fa2b753c76ee56488d574c7b3697\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebff13b1ef6bbe0fb5a9e2b0f875be12185d646d91fa6a49e7de0fbf1b543580\",\"dweb:/ipfs/QmcB1uNTR8TxAbxgucF9tZJph3dHbxRDNxV8GKrrBGH2o6\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"notice": "Library for storage of packed unsigned integers.",
|
|
"version": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"contracts/bridges/bridge/zksync/libraries/LibMap.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/bridges/bridge/zksync/libraries/LibMap.sol",
|
|
"exportedSymbols": {
|
|
"LibMap": [
|
|
115
|
|
]
|
|
},
|
|
"id": 116,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".13"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "33:24:0"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "LibMap",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 2,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "61:152:0",
|
|
"text": "@notice Library for storage of packed unsigned integers.\n @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibMap.sol)"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 115,
|
|
"linearizedBaseContracts": [
|
|
115
|
|
],
|
|
"name": "LibMap",
|
|
"nameLocation": "221:6:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"canonicalName": "LibMap.Uint32Map",
|
|
"documentation": {
|
|
"id": 3,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "235:33:0",
|
|
"text": "@dev A uint32 map in storage."
|
|
},
|
|
"id": 8,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 7,
|
|
"mutability": "mutable",
|
|
"name": "map",
|
|
"nameLocation": "330:3:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8,
|
|
"src": "302:31:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
|
|
"typeString": "mapping(uint256 => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 4,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "310:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "302:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
|
|
"typeString": "mapping(uint256 => uint256)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 5,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "321:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "Uint32Map",
|
|
"nameLocation": "281:9:0",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 115,
|
|
"src": "274:67:0",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 47,
|
|
"nodeType": "Block",
|
|
"src": "733:750:0",
|
|
"statements": [
|
|
{
|
|
"id": 46,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "744:732:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
20
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 20,
|
|
"mutability": "mutable",
|
|
"name": "mapValue",
|
|
"nameLocation": "1033:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1025:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 19,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1025:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 21,
|
|
"name": "_map",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12,
|
|
"src": "1044:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map storage pointer"
|
|
}
|
|
},
|
|
"id": 22,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1049:3:0",
|
|
"memberName": "map",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 7,
|
|
"src": "1044:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
|
|
"typeString": "mapping(uint256 => uint256)"
|
|
}
|
|
},
|
|
"id": 26,
|
|
"indexExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 23,
|
|
"name": "_index",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 14,
|
|
"src": "1053:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 24,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1062:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "1053:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1044:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1025:39:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
29
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 29,
|
|
"mutability": "mutable",
|
|
"name": "bitOffset",
|
|
"nameLocation": "1305:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1297:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1297:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 36,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 35,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 32,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 30,
|
|
"name": "_index",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 14,
|
|
"src": "1318:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&",
|
|
"rightExpression": {
|
|
"hexValue": "37",
|
|
"id": 31,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1327:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_7_by_1",
|
|
"typeString": "int_const 7"
|
|
},
|
|
"value": "7"
|
|
},
|
|
"src": "1318:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 33,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1317:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 34,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1332:2:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "1317:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1297:37:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 44,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 37,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17,
|
|
"src": "1426:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 42,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 40,
|
|
"name": "mapValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20,
|
|
"src": "1442:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"id": 41,
|
|
"name": "bitOffset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 29,
|
|
"src": "1454:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1442:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 39,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1435:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint32_$",
|
|
"typeString": "type(uint32)"
|
|
},
|
|
"typeName": {
|
|
"id": 38,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1435:6:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 43,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1435:29:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "1426:38:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"id": 45,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1426:38:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 9,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "349:287:0",
|
|
"text": "@dev Retrieves the uint32 value at a specific index from the Uint32Map.\n @param _map The Uint32Map instance containing the packed uint32 values.\n @param _index The index of the uint32 value to retrieve.\n @return result The uint32 value at the specified index."
|
|
},
|
|
"id": 48,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "get",
|
|
"nameLocation": "651:3:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12,
|
|
"mutability": "mutable",
|
|
"name": "_map",
|
|
"nameLocation": "673:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 48,
|
|
"src": "655:22:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map"
|
|
},
|
|
"typeName": {
|
|
"id": 11,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 10,
|
|
"name": "Uint32Map",
|
|
"nameLocations": [
|
|
"655:9:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 8,
|
|
"src": "655:9:0"
|
|
},
|
|
"referencedDeclaration": 8,
|
|
"src": "655:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 14,
|
|
"mutability": "mutable",
|
|
"name": "_index",
|
|
"nameLocation": "687:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 48,
|
|
"src": "679:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "679:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "654:40:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 18,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 17,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "725:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 48,
|
|
"src": "718:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 16,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "718:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "717:15:0"
|
|
},
|
|
"scope": 115,
|
|
"src": "642:841:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 113,
|
|
"nodeType": "Block",
|
|
"src": "1871:1428:0",
|
|
"statements": [
|
|
{
|
|
"id": 112,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1882:1410:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
60
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 60,
|
|
"mutability": "mutable",
|
|
"name": "mapIndex",
|
|
"nameLocation": "2171:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 112,
|
|
"src": "2163:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 59,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2163:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 64,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 63,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 61,
|
|
"name": "_index",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 54,
|
|
"src": "2182:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 62,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2191:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "2182:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2163:29:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
66
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 66,
|
|
"mutability": "mutable",
|
|
"name": "mapValue",
|
|
"nameLocation": "2215:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 112,
|
|
"src": "2207:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 65,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2207:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 71,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 67,
|
|
"name": "_map",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 52,
|
|
"src": "2226:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map storage pointer"
|
|
}
|
|
},
|
|
"id": 68,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2231:3:0",
|
|
"memberName": "map",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 7,
|
|
"src": "2226:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
|
|
"typeString": "mapping(uint256 => uint256)"
|
|
}
|
|
},
|
|
"id": 70,
|
|
"indexExpression": {
|
|
"id": 69,
|
|
"name": "mapIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 60,
|
|
"src": "2235:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2226:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2207:37:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
73
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 73,
|
|
"mutability": "mutable",
|
|
"name": "bitOffset",
|
|
"nameLocation": "2485:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 112,
|
|
"src": "2477:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 72,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2477:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 80,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 79,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 74,
|
|
"name": "_index",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 54,
|
|
"src": "2498:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&",
|
|
"rightExpression": {
|
|
"hexValue": "37",
|
|
"id": 75,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2507:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_7_by_1",
|
|
"typeString": "int_const 7"
|
|
},
|
|
"value": "7"
|
|
},
|
|
"src": "2498:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 77,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "2497:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 78,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2512:2:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "2497:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2477:37:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
82
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 82,
|
|
"mutability": "mutable",
|
|
"name": "oldValue",
|
|
"nameLocation": "2789:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 112,
|
|
"src": "2782:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 81,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2782:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 89,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 87,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 85,
|
|
"name": "mapValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 66,
|
|
"src": "2807:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"id": 86,
|
|
"name": "bitOffset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 73,
|
|
"src": "2819:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2807:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 84,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2800:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint32_$",
|
|
"typeString": "type(uint32)"
|
|
},
|
|
"typeName": {
|
|
"id": 83,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2800:6:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 88,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2800:29:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2782:47:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
91
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 91,
|
|
"mutability": "mutable",
|
|
"name": "newValueXorOldValue",
|
|
"nameLocation": "2929:19:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 112,
|
|
"src": "2921:27:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 90,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2921:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 98,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"id": 96,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 94,
|
|
"name": "oldValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 82,
|
|
"src": "2959:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "^",
|
|
"rightExpression": {
|
|
"id": 95,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 56,
|
|
"src": "2970:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "2959:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
],
|
|
"id": 93,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2951:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 92,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2951:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 97,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2951:26:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2921:56:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 110,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 99,
|
|
"name": "_map",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 52,
|
|
"src": "3214:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map storage pointer"
|
|
}
|
|
},
|
|
"id": 102,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3219:3:0",
|
|
"memberName": "map",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 7,
|
|
"src": "3214:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
|
|
"typeString": "mapping(uint256 => uint256)"
|
|
}
|
|
},
|
|
"id": 103,
|
|
"indexExpression": {
|
|
"id": 101,
|
|
"name": "mapIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 60,
|
|
"src": "3223:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3214:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 106,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 104,
|
|
"name": "newValueXorOldValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 91,
|
|
"src": "3236:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<<",
|
|
"rightExpression": {
|
|
"id": 105,
|
|
"name": "bitOffset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 73,
|
|
"src": "3259:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3236:32:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 107,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3235:34:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "^",
|
|
"rightExpression": {
|
|
"id": 108,
|
|
"name": "mapValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 66,
|
|
"src": "3272:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3235:45:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3214:66:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 111,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3214:66:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 49,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1491:263:0",
|
|
"text": "@dev Updates the uint32 value at `_index` in `map`.\n @param _map The Uint32Map instance containing the packed uint32 values.\n @param _index The index of the uint32 value to retrieve.\n @param _value The new value at the specified index."
|
|
},
|
|
"id": 114,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "set",
|
|
"nameLocation": "1769:3:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 57,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 52,
|
|
"mutability": "mutable",
|
|
"name": "_map",
|
|
"nameLocation": "1801:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 114,
|
|
"src": "1783:22:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map"
|
|
},
|
|
"typeName": {
|
|
"id": 51,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 50,
|
|
"name": "Uint32Map",
|
|
"nameLocations": [
|
|
"1783:9:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 8,
|
|
"src": "1783:9:0"
|
|
},
|
|
"referencedDeclaration": 8,
|
|
"src": "1783:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Uint32Map_$8_storage_ptr",
|
|
"typeString": "struct LibMap.Uint32Map"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 54,
|
|
"mutability": "mutable",
|
|
"name": "_index",
|
|
"nameLocation": "1824:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 114,
|
|
"src": "1816:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 53,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1816:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 56,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nameLocation": "1848:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 114,
|
|
"src": "1841:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 55,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1841:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1772:89:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 58,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1871:0:0"
|
|
},
|
|
"scope": 115,
|
|
"src": "1760:1539:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 116,
|
|
"src": "213:3089:0",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "33:3271:0"
|
|
},
|
|
"id": 0
|
|
}
|
|
}
|
|
}
|
|
} |