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

2654 lines
89 KiB
JSON

{
"id": "5461e7195d1b207d9f742b742b266222",
"_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/PriorityQueue.sol": {
"content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.13;\r\n\r\n/// @notice The structure that contains meta information of the L2 transaction that was requested from L1\r\n/// @dev The weird size of fields was selected specifically to minimize the structure storage size\r\n/// @param canonicalTxHash Hashed L2 transaction data that is needed to process it\r\n/// @param expirationTimestamp Expiration timestamp for this request (must be satisfied before)\r\n/// @param layer2Tip Additional payment to the validator as an incentive to perform the operation\r\nstruct PriorityOperation {\r\n bytes32 canonicalTxHash;\r\n uint64 expirationTimestamp;\r\n uint192 layer2Tip;\r\n}\r\n\r\n/// @author Matter Labs\r\n/// @custom:security-contact security@matterlabs.dev\r\n/// @dev The library provides the API to interact with the priority queue container\r\n/// @dev Order of processing operations from queue - FIFO (Fist in - first out)\r\nlibrary PriorityQueue {\r\n using PriorityQueue for Queue;\r\n\r\n /// @notice Container that stores priority operations\r\n /// @param data The inner mapping that saves priority operation by its index\r\n /// @param head The pointer to the first unprocessed priority operation, equal to the tail if the queue is empty\r\n /// @param tail The pointer to the free slot\r\n struct Queue {\r\n mapping(uint256 => PriorityOperation) data;\r\n uint256 tail;\r\n uint256 head;\r\n }\r\n\r\n /// @notice Returns zero if and only if no operations were processed from the queue\r\n /// @return Index of the oldest priority operation that wasn't processed yet\r\n function getFirstUnprocessedPriorityTx(Queue storage _queue) internal view returns (uint256) {\r\n return _queue.head;\r\n }\r\n\r\n /// @return The total number of priority operations that were added to the priority queue, including all processed ones\r\n function getTotalPriorityTxs(Queue storage _queue) internal view returns (uint256) {\r\n return _queue.tail;\r\n }\r\n\r\n /// @return The total number of unprocessed priority operations in a priority queue\r\n function getSize(Queue storage _queue) internal view returns (uint256) {\r\n return uint256(_queue.tail - _queue.head);\r\n }\r\n\r\n /// @return Whether the priority queue contains no operations\r\n function isEmpty(Queue storage _queue) internal view returns (bool) {\r\n return _queue.tail == _queue.head;\r\n }\r\n\r\n /// @notice Add the priority operation to the end of the priority queue\r\n function pushBack(Queue storage _queue, PriorityOperation memory _operation) internal {\r\n // Save value into the stack to avoid double reading from the storage\r\n uint256 tail = _queue.tail;\r\n\r\n _queue.data[tail] = _operation;\r\n _queue.tail = tail + 1;\r\n }\r\n\r\n /// @return The first unprocessed priority operation from the queue\r\n function front(Queue storage _queue) internal view returns (PriorityOperation memory) {\r\n require(!_queue.isEmpty(), \"D\"); // priority queue is empty\r\n\r\n return _queue.data[_queue.head];\r\n }\r\n\r\n /// @notice Remove the first unprocessed priority operation from the queue\r\n /// @return priorityOperation that was popped from the priority queue\r\n function popFront(Queue storage _queue) internal returns (PriorityOperation memory priorityOperation) {\r\n require(!_queue.isEmpty(), \"s\"); // priority queue is empty\r\n\r\n // Save value into the stack to avoid double reading from the storage\r\n uint256 head = _queue.head;\r\n\r\n priorityOperation = _queue.data[head];\r\n delete _queue.data[head];\r\n _queue.head = head + 1;\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/PriorityQueue.sol": {
"PriorityQueue": {
"abi": [],
"devdoc": {
"author": "Matter Labs",
"custom:security-contact": "security@matterlabs.dev",
"details": "The library provides the API to interact with the priority queue containerOrder of processing operations from queue - FIFO (Fist in - first out)",
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/bridges/bridge/zksync/libraries/PriorityQueue.sol\":915:3636 library PriorityQueue {... */\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/PriorityQueue.sol\":915:3636 library PriorityQueue {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212204aa3b9ad7287ec869640af8253a332ac9a2252b77653083ccd9e1753e00c9b3564736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204aa3b9ad7287ec869640af8253a332ac9a2252b77653083ccd9e1753e00c9b3564736f6c634300081a0033",
"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 BLOBBASEFEE LOG3 0xB9 0xAD PUSH19 0x87EC869640AF8253A332AC9A2252B77653083C 0xCD SWAP15 OR MSTORE8 0xE0 0xC SWAP12 CALLDATALOAD PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "915:2721:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204aa3b9ad7287ec869640af8253a332ac9a2252b77653083ccd9e1753e00c9b3564736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOBBASEFEE LOG3 0xB9 0xAD PUSH19 0x87EC869640AF8253A332AC9A2252B77653083C 0xCD SWAP15 OR MSTORE8 0xE0 0xC SWAP12 CALLDATALOAD PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "915:2721:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"front(struct PriorityQueue.Queue storage pointer)": "infinite",
"getFirstUnprocessedPriorityTx(struct PriorityQueue.Queue storage pointer)": "infinite",
"getSize(struct PriorityQueue.Queue storage pointer)": "infinite",
"getTotalPriorityTxs(struct PriorityQueue.Queue storage pointer)": "infinite",
"isEmpty(struct PriorityQueue.Queue storage pointer)": "infinite",
"popFront(struct PriorityQueue.Queue storage pointer)": "infinite",
"pushBack(struct PriorityQueue.Queue storage pointer,struct PriorityOperation memory)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 915,
"end": 3636,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 915,
"end": 3636,
"name": "DUP3",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "DUP3",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "DUP3",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "CODECOPY",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "DUP1",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "MLOAD",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "BYTE",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 915,
"end": 3636,
"name": "EQ",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 915,
"end": 3636,
"name": "JUMPI",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "MSTORE",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 915,
"end": 3636,
"name": "MSTORE",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "REVERT",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 915,
"end": 3636,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "ADDRESS",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "MSTORE",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 915,
"end": 3636,
"name": "DUP2",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "MSTORE8",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "DUP3",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "DUP2",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212204aa3b9ad7287ec869640af8253a332ac9a2252b77653083ccd9e1753e00c9b3564736f6c634300081a0033",
".code": [
{
"begin": 915,
"end": 3636,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "ADDRESS",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "EQ",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 915,
"end": 3636,
"name": "MSTORE",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 915,
"end": 3636,
"name": "DUP1",
"source": 0
},
{
"begin": 915,
"end": 3636,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"contracts/bridges/bridge/zksync/libraries/PriorityQueue.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\",\"details\":\"The library provides the API to interact with the priority queue containerOrder of processing operations from queue - FIFO (Fist in - first out)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridges/bridge/zksync/libraries/PriorityQueue.sol\":\"PriorityQueue\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/bridges/bridge/zksync/libraries/PriorityQueue.sol\":{\"keccak256\":\"0x0340dcaa8744e0ad548375bc5c681e994f274a92435e7053d16beeba2d3adf26\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3fe288f3b8fd86749e287fa78fafd2f373d29187b3a243539c1830e5b8074104\",\"dweb:/ipfs/QmcY6C5Qk2qohee9YtSWqdDMtVuXyXauSkaCJqAoXVR9cR\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/bridges/bridge/zksync/libraries/PriorityQueue.sol": {
"ast": {
"absolutePath": "contracts/bridges/bridge/zksync/libraries/PriorityQueue.sol",
"exportedSymbols": {
"PriorityOperation": [
9
],
"PriorityQueue": [
189
]
},
"id": 190,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "35:24:0"
},
{
"canonicalName": "PriorityOperation",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "63:487:0",
"text": "@notice The structure that contains meta information of the L2 transaction that was requested from L1\n @dev The weird size of fields was selected specifically to minimize the structure storage size\n @param canonicalTxHash Hashed L2 transaction data that is needed to process it\n @param expirationTimestamp Expiration timestamp for this request (must be satisfied before)\n @param layer2Tip Additional payment to the validator as an incentive to perform the operation"
},
"id": 9,
"members": [
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "canonicalTxHash",
"nameLocation": "590:15:0",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "582:23:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "582:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "expirationTimestamp",
"nameLocation": "619:19:0",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "612:26:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 5,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "612:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "layer2Tip",
"nameLocation": "653:9:0",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "645:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"typeName": {
"id": 7,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "645:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"visibility": "internal"
}
],
"name": "PriorityOperation",
"nameLocation": "557:17:0",
"nodeType": "StructDefinition",
"scope": 190,
"src": "550:116:0",
"visibility": "public"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "PriorityQueue",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "670:245:0",
"text": "@author Matter Labs\n @custom:security-contact security@matterlabs.dev\n @dev The library provides the API to interact with the priority queue container\n @dev Order of processing operations from queue - FIFO (Fist in - first out)"
},
"fullyImplemented": true,
"id": 189,
"linearizedBaseContracts": [
189
],
"name": "PriorityQueue",
"nameLocation": "923:13:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"global": false,
"id": 14,
"libraryName": {
"id": 11,
"name": "PriorityQueue",
"nameLocations": [
"950:13:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 189,
"src": "950:13:0"
},
"nodeType": "UsingForDirective",
"src": "944:30:0",
"typeName": {
"id": 13,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 12,
"name": "Queue",
"nameLocations": [
"968:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "968:5:0"
},
"referencedDeclaration": 25,
"src": "968:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
}
},
{
"canonicalName": "PriorityQueue.Queue",
"documentation": {
"id": 15,
"nodeType": "StructuredDocumentation",
"src": "982:303:0",
"text": "@notice Container that stores priority operations\n @param data The inner mapping that saves priority operation by its index\n @param head The pointer to the first unprocessed priority operation, equal to the tail if the queue is empty\n @param tail The pointer to the free slot"
},
"id": 25,
"members": [
{
"constant": false,
"id": 20,
"mutability": "mutable",
"name": "data",
"nameLocation": "1353:4:0",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "1315:42:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation)"
},
"typeName": {
"id": 19,
"keyName": "",
"keyNameLocation": "-1:-1:-1",
"keyType": {
"id": 16,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1323:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1315:37:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation)"
},
"valueName": "",
"valueNameLocation": "-1:-1:-1",
"valueType": {
"id": 18,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17,
"name": "PriorityOperation",
"nameLocations": [
"1334:17:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 9,
"src": "1334:17:0"
},
"referencedDeclaration": 9,
"src": "1334:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage_ptr",
"typeString": "struct PriorityOperation"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 22,
"mutability": "mutable",
"name": "tail",
"nameLocation": "1376:4:0",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "1368:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1368:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "head",
"nameLocation": "1399:4:0",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "1391:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 23,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1391:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "Queue",
"nameLocation": "1298:5:0",
"nodeType": "StructDefinition",
"scope": 189,
"src": "1291:120:0",
"visibility": "public"
},
{
"body": {
"id": 37,
"nodeType": "Block",
"src": "1683:37:0",
"statements": [
{
"expression": {
"expression": {
"id": 34,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "1701:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 35,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1708:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "1701:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 33,
"id": 36,
"nodeType": "Return",
"src": "1694:18:0"
}
]
},
"documentation": {
"id": 26,
"nodeType": "StructuredDocumentation",
"src": "1419:165:0",
"text": "@notice Returns zero if and only if no operations were processed from the queue\n @return Index of the oldest priority operation that wasn't processed yet"
},
"id": 38,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getFirstUnprocessedPriorityTx",
"nameLocation": "1599:29:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 30,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "1643:6:0",
"nodeType": "VariableDeclaration",
"scope": 38,
"src": "1629:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 28,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27,
"name": "Queue",
"nameLocations": [
"1629:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "1629:5:0"
},
"referencedDeclaration": 25,
"src": "1629:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "1628:22:0"
},
"returnParameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 38,
"src": "1674:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1674:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1673:9:0"
},
"scope": 189,
"src": "1590:130:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 50,
"nodeType": "Block",
"src": "1936:37:0",
"statements": [
{
"expression": {
"expression": {
"id": 47,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 42,
"src": "1954:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 48,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1961:4:0",
"memberName": "tail",
"nodeType": "MemberAccess",
"referencedDeclaration": 22,
"src": "1954:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 46,
"id": 49,
"nodeType": "Return",
"src": "1947:18:0"
}
]
},
"documentation": {
"id": 39,
"nodeType": "StructuredDocumentation",
"src": "1728:119:0",
"text": "@return The total number of priority operations that were added to the priority queue, including all processed ones"
},
"id": 51,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getTotalPriorityTxs",
"nameLocation": "1862:19:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 43,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 42,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "1896:6:0",
"nodeType": "VariableDeclaration",
"scope": 51,
"src": "1882:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 41,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 40,
"name": "Queue",
"nameLocations": [
"1882:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "1882:5:0"
},
"referencedDeclaration": 25,
"src": "1882:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "1881:22:0"
},
"returnParameters": {
"id": 46,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 51,
"src": "1927:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 44,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1927:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1926:9:0"
},
"scope": 189,
"src": "1853:120:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 69,
"nodeType": "Block",
"src": "2141:60:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 66,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 62,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "2167:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 63,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2174:4:0",
"memberName": "tail",
"nodeType": "MemberAccess",
"referencedDeclaration": 22,
"src": "2167:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"expression": {
"id": 64,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55,
"src": "2181:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 65,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2188:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "2181:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2167:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2159:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 60,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2159:7:0",
"typeDescriptions": {}
}
},
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2159:34:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 59,
"id": 68,
"nodeType": "Return",
"src": "2152:41:0"
}
]
},
"documentation": {
"id": 52,
"nodeType": "StructuredDocumentation",
"src": "1981:83:0",
"text": "@return The total number of unprocessed priority operations in a priority queue"
},
"id": 70,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getSize",
"nameLocation": "2079:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 56,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 55,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "2101:6:0",
"nodeType": "VariableDeclaration",
"scope": 70,
"src": "2087:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 54,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 53,
"name": "Queue",
"nameLocations": [
"2087:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "2087:5:0"
},
"referencedDeclaration": 25,
"src": "2087:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "2086:22:0"
},
"returnParameters": {
"id": 59,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 58,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 70,
"src": "2132:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 57,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2132:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2131:9:0"
},
"scope": 189,
"src": "2070:131:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 85,
"nodeType": "Block",
"src": "2344:52:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 83,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 79,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 74,
"src": "2362:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 80,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2369:4:0",
"memberName": "tail",
"nodeType": "MemberAccess",
"referencedDeclaration": 22,
"src": "2362:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 81,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 74,
"src": "2377:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 82,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2384:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "2377:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2362:26:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 78,
"id": 84,
"nodeType": "Return",
"src": "2355:33:0"
}
]
},
"documentation": {
"id": 71,
"nodeType": "StructuredDocumentation",
"src": "2209:61:0",
"text": "@return Whether the priority queue contains no operations"
},
"id": 86,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isEmpty",
"nameLocation": "2285:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 75,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 74,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "2307:6:0",
"nodeType": "VariableDeclaration",
"scope": 86,
"src": "2293:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 73,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 72,
"name": "Queue",
"nameLocations": [
"2293:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "2293:5:0"
},
"referencedDeclaration": 25,
"src": "2293:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "2292:22:0"
},
"returnParameters": {
"id": 78,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 77,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 86,
"src": "2338:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 76,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2338:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2337:6:0"
},
"scope": 189,
"src": "2276:120:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "2567:200:0",
"statements": [
{
"assignments": [
97
],
"declarations": [
{
"constant": false,
"id": 97,
"mutability": "mutable",
"name": "tail",
"nameLocation": "2665:4:0",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "2657:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 96,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2657:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 100,
"initialValue": {
"expression": {
"id": 98,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 90,
"src": "2672:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 99,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2679:4:0",
"memberName": "tail",
"nodeType": "MemberAccess",
"referencedDeclaration": 22,
"src": "2672:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2657:26:0"
},
{
"expression": {
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"id": 101,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 90,
"src": "2696:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 104,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2703:4:0",
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": 20,
"src": "2696:11:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation storage ref)"
}
},
"id": 105,
"indexExpression": {
"id": 103,
"name": "tail",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 97,
"src": "2708:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2696:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage",
"typeString": "struct PriorityOperation storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 106,
"name": "_operation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 93,
"src": "2716:10:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation memory"
}
},
"src": "2696:30:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage",
"typeString": "struct PriorityOperation storage ref"
}
},
"id": 108,
"nodeType": "ExpressionStatement",
"src": "2696:30:0"
},
{
"expression": {
"id": 115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 109,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 90,
"src": "2737:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 111,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "2744:4:0",
"memberName": "tail",
"nodeType": "MemberAccess",
"referencedDeclaration": 22,
"src": "2737:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 112,
"name": "tail",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 97,
"src": "2751:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 113,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2758:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "2751:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2737:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 116,
"nodeType": "ExpressionStatement",
"src": "2737:22:0"
}
]
},
"documentation": {
"id": 87,
"nodeType": "StructuredDocumentation",
"src": "2404:71:0",
"text": "@notice Add the priority operation to the end of the priority queue"
},
"id": 118,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "pushBack",
"nameLocation": "2490:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 94,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 90,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "2513:6:0",
"nodeType": "VariableDeclaration",
"scope": 118,
"src": "2499:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 89,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 88,
"name": "Queue",
"nameLocations": [
"2499:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "2499:5:0"
},
"referencedDeclaration": 25,
"src": "2499:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 93,
"mutability": "mutable",
"name": "_operation",
"nameLocation": "2546:10:0",
"nodeType": "VariableDeclaration",
"scope": 118,
"src": "2521:35:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation"
},
"typeName": {
"id": 92,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 91,
"name": "PriorityOperation",
"nameLocations": [
"2521:17:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 9,
"src": "2521:17:0"
},
"referencedDeclaration": 9,
"src": "2521:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage_ptr",
"typeString": "struct PriorityOperation"
}
},
"visibility": "internal"
}
],
"src": "2498:59:0"
},
"returnParameters": {
"id": 95,
"nodeType": "ParameterList",
"parameters": [],
"src": "2567:0:0"
},
"scope": 189,
"src": "2481:286:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 142,
"nodeType": "Block",
"src": "2934:121:0",
"statements": [
{
"expression": {
"arguments": [
{
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2953:17:0",
"subExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 129,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2954:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 130,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2961:7:0",
"memberName": "isEmpty",
"nodeType": "MemberAccess",
"referencedDeclaration": 86,
"src": "2954:14:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_Queue_$25_storage_ptr_$returns$_t_bool_$attached_to$_t_struct$_Queue_$25_storage_ptr_$",
"typeString": "function (struct PriorityQueue.Queue storage pointer) view returns (bool)"
}
},
"id": 131,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2954:16:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "44",
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2972:3:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6c3fd336b49dcb1c57dd4fbeaf5f898320b0da06a5ef64e798c6497600bb79f2",
"typeString": "literal_string \"D\""
},
"value": "D"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6c3fd336b49dcb1c57dd4fbeaf5f898320b0da06a5ef64e798c6497600bb79f2",
"typeString": "literal_string \"D\""
}
],
"id": 128,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2945:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2945:31:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 135,
"nodeType": "ExpressionStatement",
"src": "2945:31:0"
},
{
"expression": {
"baseExpression": {
"expression": {
"id": 136,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "3023:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 137,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3030:4:0",
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": 20,
"src": "3023:11:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation storage ref)"
}
},
"id": 140,
"indexExpression": {
"expression": {
"id": 138,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "3035:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 139,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3042:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "3035:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3023:24:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage",
"typeString": "struct PriorityOperation storage ref"
}
},
"functionReturnParameters": 127,
"id": 141,
"nodeType": "Return",
"src": "3016:31:0"
}
]
},
"documentation": {
"id": 119,
"nodeType": "StructuredDocumentation",
"src": "2775:67:0",
"text": "@return The first unprocessed priority operation from the queue"
},
"id": 143,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "front",
"nameLocation": "2857:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 123,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 122,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "2877:6:0",
"nodeType": "VariableDeclaration",
"scope": 143,
"src": "2863:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 121,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 120,
"name": "Queue",
"nameLocations": [
"2863:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "2863:5:0"
},
"referencedDeclaration": 25,
"src": "2863:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "2862:22:0"
},
"returnParameters": {
"id": 127,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 126,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 143,
"src": "2908:24:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation"
},
"typeName": {
"id": 125,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 124,
"name": "PriorityOperation",
"nameLocations": [
"2908:17:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 9,
"src": "2908:17:0"
},
"referencedDeclaration": 9,
"src": "2908:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage_ptr",
"typeString": "struct PriorityOperation"
}
},
"visibility": "internal"
}
],
"src": "2907:26:0"
},
"scope": 189,
"src": "2848:207:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 187,
"nodeType": "Block",
"src": "3320:313:0",
"statements": [
{
"expression": {
"arguments": [
{
"id": 157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "3339:17:0",
"subExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"id": 154,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "3340:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3347:7:0",
"memberName": "isEmpty",
"nodeType": "MemberAccess",
"referencedDeclaration": 86,
"src": "3340:14:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_Queue_$25_storage_ptr_$returns$_t_bool_$attached_to$_t_struct$_Queue_$25_storage_ptr_$",
"typeString": "function (struct PriorityQueue.Queue storage pointer) view returns (bool)"
}
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3340:16:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "73",
"id": 158,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3358:3:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_60a73bfb121a98fb6b52dfb29eb0defd76b60065b8cf07902baf28c167d24daf",
"typeString": "literal_string \"s\""
},
"value": "s"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_60a73bfb121a98fb6b52dfb29eb0defd76b60065b8cf07902baf28c167d24daf",
"typeString": "literal_string \"s\""
}
],
"id": 153,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "3331:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3331:31:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 160,
"nodeType": "ExpressionStatement",
"src": "3331:31:0"
},
{
"assignments": [
162
],
"declarations": [
{
"constant": false,
"id": 162,
"mutability": "mutable",
"name": "head",
"nameLocation": "3489:4:0",
"nodeType": "VariableDeclaration",
"scope": 187,
"src": "3481:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 161,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3481:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 165,
"initialValue": {
"expression": {
"id": 163,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "3496:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 164,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3503:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "3496:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3481:26:0"
},
{
"expression": {
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 166,
"name": "priorityOperation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 151,
"src": "3520:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"baseExpression": {
"expression": {
"id": 167,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "3540:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 168,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3547:4:0",
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": 20,
"src": "3540:11:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation storage ref)"
}
},
"id": 170,
"indexExpression": {
"id": 169,
"name": "head",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 162,
"src": "3552:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3540:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage",
"typeString": "struct PriorityOperation storage ref"
}
},
"src": "3520:37:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation memory"
}
},
"id": 172,
"nodeType": "ExpressionStatement",
"src": "3520:37:0"
},
{
"expression": {
"id": 177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "delete",
"prefix": true,
"src": "3568:24:0",
"subExpression": {
"baseExpression": {
"expression": {
"id": 173,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "3575:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 174,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3582:4:0",
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": 20,
"src": "3575:11:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_PriorityOperation_$9_storage_$",
"typeString": "mapping(uint256 => struct PriorityOperation storage ref)"
}
},
"id": 176,
"indexExpression": {
"id": 175,
"name": "head",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 162,
"src": "3587:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3575:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage",
"typeString": "struct PriorityOperation storage ref"
}
},
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 178,
"nodeType": "ExpressionStatement",
"src": "3568:24:0"
},
{
"expression": {
"id": 185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 179,
"name": "_queue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "3603:6:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue storage pointer"
}
},
"id": 181,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "3610:4:0",
"memberName": "head",
"nodeType": "MemberAccess",
"referencedDeclaration": 24,
"src": "3603:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 182,
"name": "head",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 162,
"src": "3617:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 183,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3624:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "3617:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3603:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 186,
"nodeType": "ExpressionStatement",
"src": "3603:22:0"
}
]
},
"documentation": {
"id": 144,
"nodeType": "StructuredDocumentation",
"src": "3063:149:0",
"text": "@notice Remove the first unprocessed priority operation from the queue\n @return priorityOperation that was popped from the priority queue"
},
"id": 188,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "popFront",
"nameLocation": "3227:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 148,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 147,
"mutability": "mutable",
"name": "_queue",
"nameLocation": "3250:6:0",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "3236:20:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
},
"typeName": {
"id": 146,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 145,
"name": "Queue",
"nameLocations": [
"3236:5:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 25,
"src": "3236:5:0"
},
"referencedDeclaration": 25,
"src": "3236:5:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Queue_$25_storage_ptr",
"typeString": "struct PriorityQueue.Queue"
}
},
"visibility": "internal"
}
],
"src": "3235:22:0"
},
"returnParameters": {
"id": 152,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 151,
"mutability": "mutable",
"name": "priorityOperation",
"nameLocation": "3301:17:0",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "3276:42:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_memory_ptr",
"typeString": "struct PriorityOperation"
},
"typeName": {
"id": 150,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 149,
"name": "PriorityOperation",
"nameLocations": [
"3276:17:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 9,
"src": "3276:17:0"
},
"referencedDeclaration": 9,
"src": "3276:17:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriorityOperation_$9_storage_ptr",
"typeString": "struct PriorityOperation"
}
},
"visibility": "internal"
}
],
"src": "3275:44:0"
},
"scope": 189,
"src": "3218:415:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 190,
"src": "915:2721:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "35:3603:0"
},
"id": 0
}
}
}
}