open-dex/contracts/libraries/artifacts/build-info/fd5e431a610bf23e44d72c18dd3fe7ab.json
2024-08-24 12:08:46 +03:00

5169 lines
173 KiB
JSON

{
"id": "fd5e431a610bf23e44d72c18dd3fe7ab",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/libraries/Path.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\r\npragma solidity >=0.6.0;\r\n\r\nimport './BytesLib.sol';\r\n\r\n/// @title Functions for manipulating path data for multihop swaps\r\nlibrary Path {\r\n using BytesLib for bytes;\r\n\r\n /// @dev The length of the bytes encoded address\r\n uint256 private constant ADDR_SIZE = 20;\r\n /// @dev The length of the bytes encoded fee\r\n uint256 private constant FEE_SIZE = 3;\r\n\r\n /// @dev The offset of a single token address and pool fee\r\n uint256 private constant NEXT_OFFSET = ADDR_SIZE + FEE_SIZE;\r\n /// @dev The offset of an encoded pool key\r\n uint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE;\r\n /// @dev The minimum length of an encoding that contains 2 or more pools\r\n uint256 private constant MULTIPLE_POOLS_MIN_LENGTH = POP_OFFSET + NEXT_OFFSET;\r\n\r\n /// @notice Returns true iff the path contains two or more pools\r\n /// @param path The encoded swap path\r\n /// @return True if path contains two or more pools, otherwise false\r\n function hasMultiplePools(bytes memory path) internal pure returns (bool) {\r\n return path.length >= MULTIPLE_POOLS_MIN_LENGTH;\r\n }\r\n\r\n /// @notice Returns the number of pools in the path\r\n /// @param path The encoded swap path\r\n /// @return The number of pools in the path\r\n function numPools(bytes memory path) internal pure returns (uint256) {\r\n // Ignore the first token address. From then on every fee and token offset indicates a pool.\r\n return ((path.length - ADDR_SIZE) / NEXT_OFFSET);\r\n }\r\n\r\n /// @notice Decodes the first pool in path\r\n /// @param path The bytes encoded swap path\r\n /// @return tokenA The first token of the given pool\r\n /// @return tokenB The second token of the given pool\r\n /// @return fee The fee level of the pool\r\n function decodeFirstPool(bytes memory path)\r\n internal\r\n pure\r\n returns (\r\n address tokenA,\r\n address tokenB,\r\n uint24 fee\r\n )\r\n {\r\n tokenA = path.toAddress(0);\r\n fee = path.toUint24(ADDR_SIZE);\r\n tokenB = path.toAddress(NEXT_OFFSET);\r\n }\r\n\r\n /// @notice Gets the segment corresponding to the first pool in the path\r\n /// @param path The bytes encoded swap path\r\n /// @return The segment containing all data necessary to target the first pool in the path\r\n function getFirstPool(bytes memory path) internal pure returns (bytes memory) {\r\n return path.slice(0, POP_OFFSET);\r\n }\r\n\r\n /// @notice Skips a token + fee element from the buffer and returns the remainder\r\n /// @param path The swap path\r\n /// @return The remaining token + fee elements in the path\r\n function skipToken(bytes memory path) internal pure returns (bytes memory) {\r\n return path.slice(NEXT_OFFSET, path.length - NEXT_OFFSET);\r\n }\r\n}\r\n"
},
"contracts/libraries/BytesLib.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\r\n/*\r\n * @title Solidity Bytes Arrays Utils\r\n * @author Gonçalo Sá <goncalo.sa@consensys.net>\r\n *\r\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\r\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\r\n */\r\npragma solidity >=0.5.0 ;\r\n\r\nlibrary BytesLib {\r\n function slice(\r\n bytes memory _bytes,\r\n uint256 _start,\r\n uint256 _length\r\n ) internal pure returns (bytes memory) {\r\n require(_length + 31 >= _length, 'slice_overflow');\r\n require(_start + _length >= _start, 'slice_overflow');\r\n require(_bytes.length >= _start + _length, 'slice_outOfBounds');\r\n\r\n bytes memory tempBytes;\r\n\r\n assembly {\r\n switch iszero(_length)\r\n case 0 {\r\n // Get a location of some free memory and store it in tempBytes as\r\n // Solidity does for memory variables.\r\n tempBytes := mload(0x40)\r\n\r\n // The first word of the slice result is potentially a partial\r\n // word read from the original array. To read it, we calculate\r\n // the length of that partial word and start copying that many\r\n // bytes into the array. The first word we copy will start with\r\n // data we don't care about, but the last `lengthmod` bytes will\r\n // land at the beginning of the contents of the new array. When\r\n // we're done copying, we overwrite the full first word with\r\n // the actual length of the slice.\r\n let lengthmod := and(_length, 31)\r\n\r\n // The multiplication in the next line is necessary\r\n // because when slicing multiples of 32 bytes (lengthmod == 0)\r\n // the following copy loop was copying the origin's length\r\n // and then ending prematurely not copying everything it should.\r\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\r\n let end := add(mc, _length)\r\n\r\n for {\r\n // The multiplication in the next line has the same exact purpose\r\n // as the one above.\r\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\r\n } lt(mc, end) {\r\n mc := add(mc, 0x20)\r\n cc := add(cc, 0x20)\r\n } {\r\n mstore(mc, mload(cc))\r\n }\r\n\r\n mstore(tempBytes, _length)\r\n\r\n //update free-memory pointer\r\n //allocating the array padded to 32 bytes like the compiler does now\r\n mstore(0x40, and(add(mc, 31), not(31)))\r\n }\r\n //if we want a zero-length slice let's just return a zero-length array\r\n default {\r\n tempBytes := mload(0x40)\r\n //zero out the 32 bytes slice we are about to return\r\n //we need to do it because Solidity does not garbage collect\r\n mstore(tempBytes, 0)\r\n\r\n mstore(0x40, add(tempBytes, 0x20))\r\n }\r\n }\r\n\r\n return tempBytes;\r\n }\r\n\r\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\r\n require(_start + 20 >= _start, 'toAddress_overflow');\r\n require(_bytes.length >= _start + 20, 'toAddress_outOfBounds');\r\n address tempAddress;\r\n\r\n assembly {\r\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\r\n }\r\n\r\n return tempAddress;\r\n }\r\n\r\n function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {\r\n require(_start + 3 >= _start, 'toUint24_overflow');\r\n require(_bytes.length >= _start + 3, 'toUint24_outOfBounds');\r\n uint24 tempUint;\r\n\r\n assembly {\r\n tempUint := mload(add(add(_bytes, 0x3), _start))\r\n }\r\n\r\n return tempUint;\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/libraries/BytesLib.sol": {
"BytesLib": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/libraries/BytesLib.sol\":380:4295 library BytesLib {... */\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/libraries/BytesLib.sol\":380:4295 library BytesLib {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212206bee1714c976d239950616370b960f3f9e0810b0c1fd9da50e71898570d977bb64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212206bee1714c976d239950616370b960f3f9e0810b0c1fd9da50e71898570d977bb64736f6c634300081a0033",
"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 PUSH12 0xEE1714C976D239950616370B SWAP7 0xF EXTCODEHASH SWAP15 ADDMOD LT 0xB0 0xC1 REVERT SWAP14 0xA5 0xE PUSH18 0x898570D977BB64736F6C634300081A003300 ",
"sourceMap": "380:3915:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212206bee1714c976d239950616370b960f3f9e0810b0c1fd9da50e71898570d977bb64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH12 0xEE1714C976D239950616370B SWAP7 0xF EXTCODEHASH SWAP15 ADDMOD LT 0xB0 0xC1 REVERT SWAP14 0xA5 0xE PUSH18 0x898570D977BB64736F6C634300081A003300 ",
"sourceMap": "380:3915:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"slice(bytes memory,uint256,uint256)": "infinite",
"toAddress(bytes memory,uint256)": "infinite",
"toUint24(bytes memory,uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 380,
"end": 4295,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 380,
"end": 4295,
"name": "DUP3",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "DUP3",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "DUP3",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "CODECOPY",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "DUP1",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "MLOAD",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "BYTE",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 380,
"end": 4295,
"name": "EQ",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 380,
"end": 4295,
"name": "JUMPI",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "MSTORE",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 380,
"end": 4295,
"name": "MSTORE",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "REVERT",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 380,
"end": 4295,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "ADDRESS",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "MSTORE",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 380,
"end": 4295,
"name": "DUP2",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "MSTORE8",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "DUP3",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "DUP2",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212206bee1714c976d239950616370b960f3f9e0810b0c1fd9da50e71898570d977bb64736f6c634300081a0033",
".code": [
{
"begin": 380,
"end": 4295,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "ADDRESS",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "EQ",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 380,
"end": 4295,
"name": "MSTORE",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 380,
"end": 4295,
"name": "DUP1",
"source": 0
},
{
"begin": 380,
"end": 4295,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"contracts/libraries/BytesLib.sol",
"contracts/libraries/Path.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/libraries/BytesLib.sol\":\"BytesLib\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/BytesLib.sol\":{\"keccak256\":\"0x543cd42ca2a9e08eced835d27ff769703c09a740ae3ca48e3890f8591a5d4955\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://30d99bbb0368c9eb852c69bab080d2544446e32756bdffc9c648a594e875fb5d\",\"dweb:/ipfs/Qmc7E1WSTt9gE4TJBtbzQ7e3QzcaNG1L3Dim9FqRdJL6va\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
"contracts/libraries/Path.sol": {
"Path": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"stateVariables": {
"ADDR_SIZE": {
"details": "The length of the bytes encoded address"
},
"FEE_SIZE": {
"details": "The length of the bytes encoded fee"
},
"MULTIPLE_POOLS_MIN_LENGTH": {
"details": "The minimum length of an encoding that contains 2 or more pools"
},
"NEXT_OFFSET": {
"details": "The offset of a single token address and pool fee"
},
"POP_OFFSET": {
"details": "The offset of an encoded pool key"
}
},
"title": "Functions for manipulating path data for multihop swaps",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/libraries/Path.sol\":170:2854 library Path {... */\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/libraries/Path.sol\":170:2854 library Path {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa264697066735822122091ac663ae88c7da0a14f726a62a2ce01bda35d9bdcc676d461ca420c85db4c5064736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea264697066735822122091ac663ae88c7da0a14f726a62a2ce01bda35d9bdcc676d461ca420c85db4c5064736f6c634300081a0033",
"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 SWAP2 0xAC PUSH7 0x3AE88C7DA0A14F PUSH19 0x6A62A2CE01BDA35D9BDCC676D461CA420C85DB 0x4C POP PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "170:2684:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea264697066735822122091ac663ae88c7da0a14f726a62a2ce01bda35d9bdcc676d461ca420c85db4c5064736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 0xAC PUSH7 0x3AE88C7DA0A14F PUSH19 0x6A62A2CE01BDA35D9BDCC676D461CA420C85DB 0x4C POP PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "170:2684:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"decodeFirstPool(bytes memory)": "infinite",
"getFirstPool(bytes memory)": "infinite",
"hasMultiplePools(bytes memory)": "infinite",
"numPools(bytes memory)": "infinite",
"skipToken(bytes memory)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 170,
"end": 2854,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 170,
"end": 2854,
"name": "DUP3",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "DUP3",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "DUP3",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "CODECOPY",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "DUP1",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "MLOAD",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "BYTE",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 170,
"end": 2854,
"name": "EQ",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 170,
"end": 2854,
"name": "JUMPI",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "MSTORE",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "4"
},
{
"begin": 170,
"end": 2854,
"name": "MSTORE",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "24"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "REVERT",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 170,
"end": 2854,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "ADDRESS",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "MSTORE",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 170,
"end": 2854,
"name": "DUP2",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "MSTORE8",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "DUP3",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "DUP2",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a264697066735822122091ac663ae88c7da0a14f726a62a2ce01bda35d9bdcc676d461ca420c85db4c5064736f6c634300081a0033",
".code": [
{
"begin": 170,
"end": 2854,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "ADDRESS",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "EQ",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 170,
"end": 2854,
"name": "MSTORE",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 170,
"end": 2854,
"name": "DUP1",
"source": 1
},
{
"begin": 170,
"end": 2854,
"name": "REVERT",
"source": 1
}
]
}
},
"sourceList": [
"contracts/libraries/BytesLib.sol",
"contracts/libraries/Path.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"ADDR_SIZE\":{\"details\":\"The length of the bytes encoded address\"},\"FEE_SIZE\":{\"details\":\"The length of the bytes encoded fee\"},\"MULTIPLE_POOLS_MIN_LENGTH\":{\"details\":\"The minimum length of an encoding that contains 2 or more pools\"},\"NEXT_OFFSET\":{\"details\":\"The offset of a single token address and pool fee\"},\"POP_OFFSET\":{\"details\":\"The offset of an encoded pool key\"}},\"title\":\"Functions for manipulating path data for multihop swaps\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/libraries/Path.sol\":\"Path\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/BytesLib.sol\":{\"keccak256\":\"0x543cd42ca2a9e08eced835d27ff769703c09a740ae3ca48e3890f8591a5d4955\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://30d99bbb0368c9eb852c69bab080d2544446e32756bdffc9c648a594e875fb5d\",\"dweb:/ipfs/Qmc7E1WSTt9gE4TJBtbzQ7e3QzcaNG1L3Dim9FqRdJL6va\"]},\"contracts/libraries/Path.sol\":{\"keccak256\":\"0x13c1302a21dbc2bbac527052506140eb3ed342c3b83054e07d0040d22c3dd284\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://ed3ce8db752fabe37b23d6fd1205a35102f2f6e91ad14f42536538b6ea71ae08\",\"dweb:/ipfs/QmSpSmvuTcavQW3HixkdAcFhCyzLwSkHKNUa7RrEM47jet\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/libraries/BytesLib.sol": {
"ast": {
"absolutePath": "contracts/libraries/BytesLib.sol",
"exportedSymbols": {
"BytesLib": [
118
]
},
"id": 119,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "351:25:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "BytesLib",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"id": 118,
"linearizedBaseContracts": [
118
],
"name": "BytesLib",
"nameLocation": "388:8:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 46,
"nodeType": "Block",
"src": "544:2931:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 17,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 13,
"name": "_length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "563:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "3331",
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "573:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_31_by_1",
"typeString": "int_const 31"
},
"value": "31"
},
"src": "563:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 16,
"name": "_length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "579:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "563:23:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "736c6963655f6f766572666c6f77",
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "588:16:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5d3d629f76473d94377d221b1f1c8f2161f7b65cab69e095662ec5d0e026c17e",
"typeString": "literal_string \"slice_overflow\""
},
"value": "slice_overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5d3d629f76473d94377d221b1f1c8f2161f7b65cab69e095662ec5d0e026c17e",
"typeString": "literal_string \"slice_overflow\""
}
],
"id": 12,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "555:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "555:50:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20,
"nodeType": "ExpressionStatement",
"src": "555:50:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 22,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "624:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 23,
"name": "_length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "633:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "624:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 25,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "644:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "624:26:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "736c6963655f6f766572666c6f77",
"id": 27,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "652:16:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5d3d629f76473d94377d221b1f1c8f2161f7b65cab69e095662ec5d0e026c17e",
"typeString": "literal_string \"slice_overflow\""
},
"value": "slice_overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5d3d629f76473d94377d221b1f1c8f2161f7b65cab69e095662ec5d0e026c17e",
"typeString": "literal_string \"slice_overflow\""
}
],
"id": 21,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "616:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 28,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "616:53:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 29,
"nodeType": "ExpressionStatement",
"src": "616:53:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 36,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 31,
"name": "_bytes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "688:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "695:6:0",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "688:13:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 35,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 33,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "705:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 34,
"name": "_length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "714:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "705:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "688:33:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "736c6963655f6f75744f66426f756e6473",
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "723:19:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cca2258dcc0d08c244435525255fbef9116c9a31b4c29471218f002bbbceb7a0",
"typeString": "literal_string \"slice_outOfBounds\""
},
"value": "slice_outOfBounds"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cca2258dcc0d08c244435525255fbef9116c9a31b4c29471218f002bbbceb7a0",
"typeString": "literal_string \"slice_outOfBounds\""
}
],
"id": 30,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "680:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "680:63:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 39,
"nodeType": "ExpressionStatement",
"src": "680:63:0"
},
{
"assignments": [
41
],
"declarations": [
{
"constant": false,
"id": 41,
"mutability": "mutable",
"name": "tempBytes",
"nameLocation": "769:9:0",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "756:22:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 40,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "756:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 42,
"nodeType": "VariableDeclarationStatement",
"src": "756:22:0"
},
{
"AST": {
"nativeSrc": "800:2639:0",
"nodeType": "YulBlock",
"src": "800:2639:0",
"statements": [
{
"cases": [
{
"body": {
"nativeSrc": "862:2130:0",
"nodeType": "YulBlock",
"src": "862:2130:0",
"statements": [
{
"nativeSrc": "1033:24:0",
"nodeType": "YulAssignment",
"src": "1033:24:0",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1052:4:0",
"nodeType": "YulLiteral",
"src": "1052:4:0",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "1046:5:0",
"nodeType": "YulIdentifier",
"src": "1046:5:0"
},
"nativeSrc": "1046:11:0",
"nodeType": "YulFunctionCall",
"src": "1046:11:0"
},
"variableNames": [
{
"name": "tempBytes",
"nativeSrc": "1033:9:0",
"nodeType": "YulIdentifier",
"src": "1033:9:0"
}
]
},
{
"nativeSrc": "1727:33:0",
"nodeType": "YulVariableDeclaration",
"src": "1727:33:0",
"value": {
"arguments": [
{
"name": "_length",
"nativeSrc": "1748:7:0",
"nodeType": "YulIdentifier",
"src": "1748:7:0"
},
{
"kind": "number",
"nativeSrc": "1757:2:0",
"nodeType": "YulLiteral",
"src": "1757:2:0",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "and",
"nativeSrc": "1744:3:0",
"nodeType": "YulIdentifier",
"src": "1744:3:0"
},
"nativeSrc": "1744:16:0",
"nodeType": "YulFunctionCall",
"src": "1744:16:0"
},
"variables": [
{
"name": "lengthmod",
"nativeSrc": "1731:9:0",
"nodeType": "YulTypedName",
"src": "1731:9:0",
"type": ""
}
]
},
{
"nativeSrc": "2107:70:0",
"nodeType": "YulVariableDeclaration",
"src": "2107:70:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "tempBytes",
"nativeSrc": "2125:9:0",
"nodeType": "YulIdentifier",
"src": "2125:9:0"
},
{
"name": "lengthmod",
"nativeSrc": "2136:9:0",
"nodeType": "YulIdentifier",
"src": "2136:9:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2121:3:0",
"nodeType": "YulIdentifier",
"src": "2121:3:0"
},
"nativeSrc": "2121:25:0",
"nodeType": "YulFunctionCall",
"src": "2121:25:0"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "2152:4:0",
"nodeType": "YulLiteral",
"src": "2152:4:0",
"type": "",
"value": "0x20"
},
{
"arguments": [
{
"name": "lengthmod",
"nativeSrc": "2165:9:0",
"nodeType": "YulIdentifier",
"src": "2165:9:0"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2158:6:0",
"nodeType": "YulIdentifier",
"src": "2158:6:0"
},
"nativeSrc": "2158:17:0",
"nodeType": "YulFunctionCall",
"src": "2158:17:0"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "2148:3:0",
"nodeType": "YulIdentifier",
"src": "2148:3:0"
},
"nativeSrc": "2148:28:0",
"nodeType": "YulFunctionCall",
"src": "2148:28:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2117:3:0",
"nodeType": "YulIdentifier",
"src": "2117:3:0"
},
"nativeSrc": "2117:60:0",
"nodeType": "YulFunctionCall",
"src": "2117:60:0"
},
"variables": [
{
"name": "mc",
"nativeSrc": "2111:2:0",
"nodeType": "YulTypedName",
"src": "2111:2:0",
"type": ""
}
]
},
{
"nativeSrc": "2199:27:0",
"nodeType": "YulVariableDeclaration",
"src": "2199:27:0",
"value": {
"arguments": [
{
"name": "mc",
"nativeSrc": "2214:2:0",
"nodeType": "YulIdentifier",
"src": "2214:2:0"
},
{
"name": "_length",
"nativeSrc": "2218:7:0",
"nodeType": "YulIdentifier",
"src": "2218:7:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2210:3:0",
"nodeType": "YulIdentifier",
"src": "2210:3:0"
},
"nativeSrc": "2210:16:0",
"nodeType": "YulFunctionCall",
"src": "2210:16:0"
},
"variables": [
{
"name": "end",
"nativeSrc": "2203:3:0",
"nodeType": "YulTypedName",
"src": "2203:3:0",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "2649:71:0",
"nodeType": "YulBlock",
"src": "2649:71:0",
"statements": [
{
"expression": {
"arguments": [
{
"name": "mc",
"nativeSrc": "2683:2:0",
"nodeType": "YulIdentifier",
"src": "2683:2:0"
},
{
"arguments": [
{
"name": "cc",
"nativeSrc": "2693:2:0",
"nodeType": "YulIdentifier",
"src": "2693:2:0"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "2687:5:0",
"nodeType": "YulIdentifier",
"src": "2687:5:0"
},
"nativeSrc": "2687:9:0",
"nodeType": "YulFunctionCall",
"src": "2687:9:0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "2676:6:0",
"nodeType": "YulIdentifier",
"src": "2676:6:0"
},
"nativeSrc": "2676:21:0",
"nodeType": "YulFunctionCall",
"src": "2676:21:0"
},
"nativeSrc": "2676:21:0",
"nodeType": "YulExpressionStatement",
"src": "2676:21:0"
}
]
},
"condition": {
"arguments": [
{
"name": "mc",
"nativeSrc": "2525:2:0",
"nodeType": "YulIdentifier",
"src": "2525:2:0"
},
{
"name": "end",
"nativeSrc": "2529:3:0",
"nodeType": "YulIdentifier",
"src": "2529:3:0"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "2522:2:0",
"nodeType": "YulIdentifier",
"src": "2522:2:0"
},
"nativeSrc": "2522:11:0",
"nodeType": "YulFunctionCall",
"src": "2522:11:0"
},
"nativeSrc": "2250:470:0",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "2534:114:0",
"nodeType": "YulBlock",
"src": "2534:114:0",
"statements": [
{
"nativeSrc": "2561:19:0",
"nodeType": "YulAssignment",
"src": "2561:19:0",
"value": {
"arguments": [
{
"name": "mc",
"nativeSrc": "2571:2:0",
"nodeType": "YulIdentifier",
"src": "2571:2:0"
},
{
"kind": "number",
"nativeSrc": "2575:4:0",
"nodeType": "YulLiteral",
"src": "2575:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2567:3:0",
"nodeType": "YulIdentifier",
"src": "2567:3:0"
},
"nativeSrc": "2567:13:0",
"nodeType": "YulFunctionCall",
"src": "2567:13:0"
},
"variableNames": [
{
"name": "mc",
"nativeSrc": "2561:2:0",
"nodeType": "YulIdentifier",
"src": "2561:2:0"
}
]
},
{
"nativeSrc": "2606:19:0",
"nodeType": "YulAssignment",
"src": "2606:19:0",
"value": {
"arguments": [
{
"name": "cc",
"nativeSrc": "2616:2:0",
"nodeType": "YulIdentifier",
"src": "2616:2:0"
},
{
"kind": "number",
"nativeSrc": "2620:4:0",
"nodeType": "YulLiteral",
"src": "2620:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2612:3:0",
"nodeType": "YulIdentifier",
"src": "2612:3:0"
},
"nativeSrc": "2612:13:0",
"nodeType": "YulFunctionCall",
"src": "2612:13:0"
},
"variableNames": [
{
"name": "cc",
"nativeSrc": "2606:2:0",
"nodeType": "YulIdentifier",
"src": "2606:2:0"
}
]
}
]
},
"pre": {
"nativeSrc": "2254:267:0",
"nodeType": "YulBlock",
"src": "2254:267:0",
"statements": [
{
"nativeSrc": "2418:80:0",
"nodeType": "YulVariableDeclaration",
"src": "2418:80:0",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_bytes",
"nativeSrc": "2440:6:0",
"nodeType": "YulIdentifier",
"src": "2440:6:0"
},
{
"name": "lengthmod",
"nativeSrc": "2448:9:0",
"nodeType": "YulIdentifier",
"src": "2448:9:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2436:3:0",
"nodeType": "YulIdentifier",
"src": "2436:3:0"
},
"nativeSrc": "2436:22:0",
"nodeType": "YulFunctionCall",
"src": "2436:22:0"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "2464:4:0",
"nodeType": "YulLiteral",
"src": "2464:4:0",
"type": "",
"value": "0x20"
},
{
"arguments": [
{
"name": "lengthmod",
"nativeSrc": "2477:9:0",
"nodeType": "YulIdentifier",
"src": "2477:9:0"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2470:6:0",
"nodeType": "YulIdentifier",
"src": "2470:6:0"
},
"nativeSrc": "2470:17:0",
"nodeType": "YulFunctionCall",
"src": "2470:17:0"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "2460:3:0",
"nodeType": "YulIdentifier",
"src": "2460:3:0"
},
"nativeSrc": "2460:28:0",
"nodeType": "YulFunctionCall",
"src": "2460:28:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2432:3:0",
"nodeType": "YulIdentifier",
"src": "2432:3:0"
},
"nativeSrc": "2432:57:0",
"nodeType": "YulFunctionCall",
"src": "2432:57:0"
},
{
"name": "_start",
"nativeSrc": "2491:6:0",
"nodeType": "YulIdentifier",
"src": "2491:6:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2428:3:0",
"nodeType": "YulIdentifier",
"src": "2428:3:0"
},
"nativeSrc": "2428:70:0",
"nodeType": "YulFunctionCall",
"src": "2428:70:0"
},
"variables": [
{
"name": "cc",
"nativeSrc": "2422:2:0",
"nodeType": "YulTypedName",
"src": "2422:2:0",
"type": ""
}
]
}
]
},
"src": "2250:470:0"
},
{
"expression": {
"arguments": [
{
"name": "tempBytes",
"nativeSrc": "2751:9:0",
"nodeType": "YulIdentifier",
"src": "2751:9:0"
},
{
"name": "_length",
"nativeSrc": "2762:7:0",
"nodeType": "YulIdentifier",
"src": "2762:7:0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "2744:6:0",
"nodeType": "YulIdentifier",
"src": "2744:6:0"
},
"nativeSrc": "2744:26:0",
"nodeType": "YulFunctionCall",
"src": "2744:26:0"
},
"nativeSrc": "2744:26:0",
"nodeType": "YulExpressionStatement",
"src": "2744:26:0"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2941:4:0",
"nodeType": "YulLiteral",
"src": "2941:4:0",
"type": "",
"value": "0x40"
},
{
"arguments": [
{
"arguments": [
{
"name": "mc",
"nativeSrc": "2955:2:0",
"nodeType": "YulIdentifier",
"src": "2955:2:0"
},
{
"kind": "number",
"nativeSrc": "2959:2:0",
"nodeType": "YulLiteral",
"src": "2959:2:0",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2951:3:0",
"nodeType": "YulIdentifier",
"src": "2951:3:0"
},
"nativeSrc": "2951:11:0",
"nodeType": "YulFunctionCall",
"src": "2951:11:0"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "2968:2:0",
"nodeType": "YulLiteral",
"src": "2968:2:0",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nativeSrc": "2964:3:0",
"nodeType": "YulIdentifier",
"src": "2964:3:0"
},
"nativeSrc": "2964:7:0",
"nodeType": "YulFunctionCall",
"src": "2964:7:0"
}
],
"functionName": {
"name": "and",
"nativeSrc": "2947:3:0",
"nodeType": "YulIdentifier",
"src": "2947:3:0"
},
"nativeSrc": "2947:25:0",
"nodeType": "YulFunctionCall",
"src": "2947:25:0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "2934:6:0",
"nodeType": "YulIdentifier",
"src": "2934:6:0"
},
"nativeSrc": "2934:39:0",
"nodeType": "YulFunctionCall",
"src": "2934:39:0"
},
"nativeSrc": "2934:39:0",
"nodeType": "YulExpressionStatement",
"src": "2934:39:0"
}
]
},
"nativeSrc": "855:2137:0",
"nodeType": "YulCase",
"src": "855:2137:0",
"value": {
"kind": "number",
"nativeSrc": "860:1:0",
"nodeType": "YulLiteral",
"src": "860:1:0",
"type": "",
"value": "0"
}
},
{
"body": {
"nativeSrc": "3106:322:0",
"nodeType": "YulBlock",
"src": "3106:322:0",
"statements": [
{
"nativeSrc": "3129:24:0",
"nodeType": "YulAssignment",
"src": "3129:24:0",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "3148:4:0",
"nodeType": "YulLiteral",
"src": "3148:4:0",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "3142:5:0",
"nodeType": "YulIdentifier",
"src": "3142:5:0"
},
"nativeSrc": "3142:11:0",
"nodeType": "YulFunctionCall",
"src": "3142:11:0"
},
"variableNames": [
{
"name": "tempBytes",
"nativeSrc": "3129:9:0",
"nodeType": "YulIdentifier",
"src": "3129:9:0"
}
]
},
{
"expression": {
"arguments": [
{
"name": "tempBytes",
"nativeSrc": "3338:9:0",
"nodeType": "YulIdentifier",
"src": "3338:9:0"
},
{
"kind": "number",
"nativeSrc": "3349:1:0",
"nodeType": "YulLiteral",
"src": "3349:1:0",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3331:6:0",
"nodeType": "YulIdentifier",
"src": "3331:6:0"
},
"nativeSrc": "3331:20:0",
"nodeType": "YulFunctionCall",
"src": "3331:20:0"
},
"nativeSrc": "3331:20:0",
"nodeType": "YulExpressionStatement",
"src": "3331:20:0"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "3382:4:0",
"nodeType": "YulLiteral",
"src": "3382:4:0",
"type": "",
"value": "0x40"
},
{
"arguments": [
{
"name": "tempBytes",
"nativeSrc": "3392:9:0",
"nodeType": "YulIdentifier",
"src": "3392:9:0"
},
{
"kind": "number",
"nativeSrc": "3403:4:0",
"nodeType": "YulLiteral",
"src": "3403:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3388:3:0",
"nodeType": "YulIdentifier",
"src": "3388:3:0"
},
"nativeSrc": "3388:20:0",
"nodeType": "YulFunctionCall",
"src": "3388:20:0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3375:6:0",
"nodeType": "YulIdentifier",
"src": "3375:6:0"
},
"nativeSrc": "3375:34:0",
"nodeType": "YulFunctionCall",
"src": "3375:34:0"
},
"nativeSrc": "3375:34:0",
"nodeType": "YulExpressionStatement",
"src": "3375:34:0"
}
]
},
"nativeSrc": "3098:330:0",
"nodeType": "YulCase",
"src": "3098:330:0",
"value": "default"
}
],
"expression": {
"arguments": [
{
"name": "_length",
"nativeSrc": "829:7:0",
"nodeType": "YulIdentifier",
"src": "829:7:0"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "822:6:0",
"nodeType": "YulIdentifier",
"src": "822:6:0"
},
"nativeSrc": "822:15:0",
"nodeType": "YulFunctionCall",
"src": "822:15:0"
},
"nativeSrc": "815:2613:0",
"nodeType": "YulSwitch",
"src": "815:2613:0"
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 3,
"isOffset": false,
"isSlot": false,
"src": "2440:6:0",
"valueSize": 1
},
{
"declaration": 7,
"isOffset": false,
"isSlot": false,
"src": "1748:7:0",
"valueSize": 1
},
{
"declaration": 7,
"isOffset": false,
"isSlot": false,
"src": "2218:7:0",
"valueSize": 1
},
{
"declaration": 7,
"isOffset": false,
"isSlot": false,
"src": "2762:7:0",
"valueSize": 1
},
{
"declaration": 7,
"isOffset": false,
"isSlot": false,
"src": "829:7:0",
"valueSize": 1
},
{
"declaration": 5,
"isOffset": false,
"isSlot": false,
"src": "2491:6:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "1033:9:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "2125:9:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "2751:9:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "3129:9:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "3338:9:0",
"valueSize": 1
},
{
"declaration": 41,
"isOffset": false,
"isSlot": false,
"src": "3392:9:0",
"valueSize": 1
}
],
"id": 43,
"nodeType": "InlineAssembly",
"src": "791:2648:0"
},
{
"expression": {
"id": 44,
"name": "tempBytes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 41,
"src": "3458:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 11,
"id": 45,
"nodeType": "Return",
"src": "3451:16:0"
}
]
},
"id": 47,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "slice",
"nameLocation": "413:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "_bytes",
"nameLocation": "442:6:0",
"nodeType": "VariableDeclaration",
"scope": 47,
"src": "429:19:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "429:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "_start",
"nameLocation": "467:6:0",
"nodeType": "VariableDeclaration",
"scope": 47,
"src": "459:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "459:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "_length",
"nameLocation": "492:7:0",
"nodeType": "VariableDeclaration",
"scope": 47,
"src": "484:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "484:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "418:88:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 47,
"src": "530:12:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 9,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "530:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "529:14:0"
},
"scope": 118,
"src": "404:3071:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 81,
"nodeType": "Block",
"src": "3571:338:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 59,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 57,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 51,
"src": "3590:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "3230",
"id": 58,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3599:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "3590:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 60,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 51,
"src": "3605:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3590:21:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "746f416464726573735f6f766572666c6f77",
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3613:20:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f71efb0937d5d9d75bbebe9d7207dad811fd47ced903ea9404d5e8d77eb17a95",
"typeString": "literal_string \"toAddress_overflow\""
},
"value": "toAddress_overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f71efb0937d5d9d75bbebe9d7207dad811fd47ced903ea9404d5e8d77eb17a95",
"typeString": "literal_string \"toAddress_overflow\""
}
],
"id": 56,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "3582:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3582:52:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 64,
"nodeType": "ExpressionStatement",
"src": "3582:52:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 71,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 66,
"name": "_bytes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 49,
"src": "3653:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3660:6:0",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "3653:13:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 68,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 51,
"src": "3670:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "3230",
"id": 69,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3679:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "3670:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3653:28:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "746f416464726573735f6f75744f66426f756e6473",
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3683:23:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9f688071e1df0f70b63e3651005878331be1fe9591d6cfb3187cb52a13439e5d",
"typeString": "literal_string \"toAddress_outOfBounds\""
},
"value": "toAddress_outOfBounds"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9f688071e1df0f70b63e3651005878331be1fe9591d6cfb3187cb52a13439e5d",
"typeString": "literal_string \"toAddress_outOfBounds\""
}
],
"id": 65,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "3645:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3645:62:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 74,
"nodeType": "ExpressionStatement",
"src": "3645:62:0"
},
{
"assignments": [
76
],
"declarations": [
{
"constant": false,
"id": 76,
"mutability": "mutable",
"name": "tempAddress",
"nameLocation": "3726:11:0",
"nodeType": "VariableDeclaration",
"scope": 81,
"src": "3718:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 75,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3718:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 77,
"nodeType": "VariableDeclarationStatement",
"src": "3718:19:0"
},
{
"AST": {
"nativeSrc": "3759:112:0",
"nodeType": "YulBlock",
"src": "3759:112:0",
"statements": [
{
"nativeSrc": "3774:86:0",
"nodeType": "YulAssignment",
"src": "3774:86:0",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_bytes",
"nativeSrc": "3807:6:0",
"nodeType": "YulIdentifier",
"src": "3807:6:0"
},
{
"kind": "number",
"nativeSrc": "3815:4:0",
"nodeType": "YulLiteral",
"src": "3815:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3803:3:0",
"nodeType": "YulIdentifier",
"src": "3803:3:0"
},
"nativeSrc": "3803:17:0",
"nodeType": "YulFunctionCall",
"src": "3803:17:0"
},
{
"name": "_start",
"nativeSrc": "3822:6:0",
"nodeType": "YulIdentifier",
"src": "3822:6:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3799:3:0",
"nodeType": "YulIdentifier",
"src": "3799:3:0"
},
"nativeSrc": "3799:30:0",
"nodeType": "YulFunctionCall",
"src": "3799:30:0"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "3793:5:0",
"nodeType": "YulIdentifier",
"src": "3793:5:0"
},
"nativeSrc": "3793:37:0",
"nodeType": "YulFunctionCall",
"src": "3793:37:0"
},
{
"kind": "number",
"nativeSrc": "3832:27:0",
"nodeType": "YulLiteral",
"src": "3832:27:0",
"type": "",
"value": "0x1000000000000000000000000"
}
],
"functionName": {
"name": "div",
"nativeSrc": "3789:3:0",
"nodeType": "YulIdentifier",
"src": "3789:3:0"
},
"nativeSrc": "3789:71:0",
"nodeType": "YulFunctionCall",
"src": "3789:71:0"
},
"variableNames": [
{
"name": "tempAddress",
"nativeSrc": "3774:11:0",
"nodeType": "YulIdentifier",
"src": "3774:11:0"
}
]
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 49,
"isOffset": false,
"isSlot": false,
"src": "3807:6:0",
"valueSize": 1
},
{
"declaration": 51,
"isOffset": false,
"isSlot": false,
"src": "3822:6:0",
"valueSize": 1
},
{
"declaration": 76,
"isOffset": false,
"isSlot": false,
"src": "3774:11:0",
"valueSize": 1
}
],
"id": 78,
"nodeType": "InlineAssembly",
"src": "3750:121:0"
},
{
"expression": {
"id": 79,
"name": "tempAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 76,
"src": "3890:11:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 55,
"id": 80,
"nodeType": "Return",
"src": "3883:18:0"
}
]
},
"id": 82,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toAddress",
"nameLocation": "3492:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 52,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 49,
"mutability": "mutable",
"name": "_bytes",
"nameLocation": "3515:6:0",
"nodeType": "VariableDeclaration",
"scope": 82,
"src": "3502:19:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 48,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3502:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 51,
"mutability": "mutable",
"name": "_start",
"nameLocation": "3531:6:0",
"nodeType": "VariableDeclaration",
"scope": 82,
"src": "3523:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 50,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3523:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3501:37:0"
},
"returnParameters": {
"id": 55,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 54,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 82,
"src": "3562:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 53,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3562:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "3561:9:0"
},
"scope": 118,
"src": "3483:426:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 116,
"nodeType": "Block",
"src": "4003:289:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 92,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 86,
"src": "4022:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "33",
"id": 93,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4031:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "4022:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 95,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 86,
"src": "4036:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4022:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "746f55696e7432345f6f766572666c6f77",
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4044:19:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_428a8ba368fc474210479d5009a3c2ddaf9d762393b1b3cd3cf1b440d48791c5",
"typeString": "literal_string \"toUint24_overflow\""
},
"value": "toUint24_overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_428a8ba368fc474210479d5009a3c2ddaf9d762393b1b3cd3cf1b440d48791c5",
"typeString": "literal_string \"toUint24_overflow\""
}
],
"id": 91,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "4014:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4014:50:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 99,
"nodeType": "ExpressionStatement",
"src": "4014:50:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 101,
"name": "_bytes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 84,
"src": "4083:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4090:6:0",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "4083:13:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 103,
"name": "_start",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 86,
"src": "4100:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "33",
"id": 104,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4109:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "4100:10:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4083:27:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "746f55696e7432345f6f75744f66426f756e6473",
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4112:22:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_92c5fac6e5cb4f75ffccd9c8f373ae2e2c333a8b9c2fdc616c52c36fa31575dc",
"typeString": "literal_string \"toUint24_outOfBounds\""
},
"value": "toUint24_outOfBounds"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_92c5fac6e5cb4f75ffccd9c8f373ae2e2c333a8b9c2fdc616c52c36fa31575dc",
"typeString": "literal_string \"toUint24_outOfBounds\""
}
],
"id": 100,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "4075:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4075:60:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 109,
"nodeType": "ExpressionStatement",
"src": "4075:60:0"
},
{
"assignments": [
111
],
"declarations": [
{
"constant": false,
"id": 111,
"mutability": "mutable",
"name": "tempUint",
"nameLocation": "4153:8:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "4146:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 110,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "4146:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
}
],
"id": 112,
"nodeType": "VariableDeclarationStatement",
"src": "4146:15:0"
},
{
"AST": {
"nativeSrc": "4183:74:0",
"nodeType": "YulBlock",
"src": "4183:74:0",
"statements": [
{
"nativeSrc": "4198:48:0",
"nodeType": "YulAssignment",
"src": "4198:48:0",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_bytes",
"nativeSrc": "4224:6:0",
"nodeType": "YulIdentifier",
"src": "4224:6:0"
},
{
"kind": "number",
"nativeSrc": "4232:3:0",
"nodeType": "YulLiteral",
"src": "4232:3:0",
"type": "",
"value": "0x3"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4220:3:0",
"nodeType": "YulIdentifier",
"src": "4220:3:0"
},
"nativeSrc": "4220:16:0",
"nodeType": "YulFunctionCall",
"src": "4220:16:0"
},
{
"name": "_start",
"nativeSrc": "4238:6:0",
"nodeType": "YulIdentifier",
"src": "4238:6:0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4216:3:0",
"nodeType": "YulIdentifier",
"src": "4216:3:0"
},
"nativeSrc": "4216:29:0",
"nodeType": "YulFunctionCall",
"src": "4216:29:0"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "4210:5:0",
"nodeType": "YulIdentifier",
"src": "4210:5:0"
},
"nativeSrc": "4210:36:0",
"nodeType": "YulFunctionCall",
"src": "4210:36:0"
},
"variableNames": [
{
"name": "tempUint",
"nativeSrc": "4198:8:0",
"nodeType": "YulIdentifier",
"src": "4198:8:0"
}
]
}
]
},
"evmVersion": "cancun",
"externalReferences": [
{
"declaration": 84,
"isOffset": false,
"isSlot": false,
"src": "4224:6:0",
"valueSize": 1
},
{
"declaration": 86,
"isOffset": false,
"isSlot": false,
"src": "4238:6:0",
"valueSize": 1
},
{
"declaration": 111,
"isOffset": false,
"isSlot": false,
"src": "4198:8:0",
"valueSize": 1
}
],
"id": 113,
"nodeType": "InlineAssembly",
"src": "4174:83:0"
},
{
"expression": {
"id": 114,
"name": "tempUint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 111,
"src": "4276:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"functionReturnParameters": 90,
"id": 115,
"nodeType": "Return",
"src": "4269:15:0"
}
]
},
"id": 117,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toUint24",
"nameLocation": "3926:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 87,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 84,
"mutability": "mutable",
"name": "_bytes",
"nameLocation": "3948:6:0",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "3935:19:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 83,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3935:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 86,
"mutability": "mutable",
"name": "_start",
"nameLocation": "3964:6:0",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "3956:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 85,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3956:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3934:37:0"
},
"returnParameters": {
"id": 90,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 89,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "3995:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 88,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "3995:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
}
],
"src": "3994:8:0"
},
"scope": 118,
"src": "3917:375:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 119,
"src": "380:3915:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "351:3946:0"
},
"id": 0
},
"contracts/libraries/Path.sol": {
"ast": {
"absolutePath": "contracts/libraries/Path.sol",
"exportedSymbols": {
"BytesLib": [
118
],
"Path": [
251
]
},
"id": 252,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 120,
"literals": [
"solidity",
">=",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "46:24:1"
},
{
"absolutePath": "contracts/libraries/BytesLib.sol",
"file": "./BytesLib.sol",
"id": 121,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 252,
"sourceUnit": 119,
"src": "74:24:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Path",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 122,
"nodeType": "StructuredDocumentation",
"src": "102:68:1",
"text": "@title Functions for manipulating path data for multihop swaps"
},
"fullyImplemented": true,
"id": 251,
"linearizedBaseContracts": [
251
],
"name": "Path",
"nameLocation": "178:4:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"global": false,
"id": 125,
"libraryName": {
"id": 123,
"name": "BytesLib",
"nameLocations": [
"196:8:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 118,
"src": "196:8:1"
},
"nodeType": "UsingForDirective",
"src": "190:25:1",
"typeName": {
"id": 124,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "209:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
{
"constant": true,
"documentation": {
"id": 126,
"nodeType": "StructuredDocumentation",
"src": "223:48:1",
"text": "@dev The length of the bytes encoded address"
},
"id": 129,
"mutability": "constant",
"name": "ADDR_SIZE",
"nameLocation": "302:9:1",
"nodeType": "VariableDeclaration",
"scope": 251,
"src": "277:39:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 127,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "277:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "3230",
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "314:2:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"visibility": "private"
},
{
"constant": true,
"documentation": {
"id": 130,
"nodeType": "StructuredDocumentation",
"src": "323:44:1",
"text": "@dev The length of the bytes encoded fee"
},
"id": 133,
"mutability": "constant",
"name": "FEE_SIZE",
"nameLocation": "398:8:1",
"nodeType": "VariableDeclaration",
"scope": 251,
"src": "373:37:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 131,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "373:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "33",
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "409:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"visibility": "private"
},
{
"constant": true,
"documentation": {
"id": 134,
"nodeType": "StructuredDocumentation",
"src": "419:58:1",
"text": "@dev The offset of a single token address and pool fee"
},
"id": 139,
"mutability": "constant",
"name": "NEXT_OFFSET",
"nameLocation": "508:11:1",
"nodeType": "VariableDeclaration",
"scope": 251,
"src": "483:59:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 135,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "483:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 138,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"id": 136,
"name": "ADDR_SIZE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "522:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 137,
"name": "FEE_SIZE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 133,
"src": "534:8:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "522:20:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": true,
"documentation": {
"id": 140,
"nodeType": "StructuredDocumentation",
"src": "549:42:1",
"text": "@dev The offset of an encoded pool key"
},
"id": 145,
"mutability": "constant",
"name": "POP_OFFSET",
"nameLocation": "622:10:1",
"nodeType": "VariableDeclaration",
"scope": 251,
"src": "597:61:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 141,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "597:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"id": 142,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "635:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 143,
"name": "ADDR_SIZE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "649:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "635:23:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": true,
"documentation": {
"id": 146,
"nodeType": "StructuredDocumentation",
"src": "665:72:1",
"text": "@dev The minimum length of an encoding that contains 2 or more pools"
},
"id": 151,
"mutability": "constant",
"name": "MULTIPLE_POOLS_MIN_LENGTH",
"nameLocation": "768:25:1",
"nodeType": "VariableDeclaration",
"scope": 251,
"src": "743:77:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 147,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "743:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"id": 148,
"name": "POP_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 145,
"src": "796:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 149,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "809:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "796:24:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"body": {
"id": 164,
"nodeType": "Block",
"src": "1090:66:1",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 162,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 159,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 154,
"src": "1108:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1113:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1108:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 161,
"name": "MULTIPLE_POOLS_MIN_LENGTH",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 151,
"src": "1123:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1108:40:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 158,
"id": 163,
"nodeType": "Return",
"src": "1101:47:1"
}
]
},
"documentation": {
"id": 152,
"nodeType": "StructuredDocumentation",
"src": "829:181:1",
"text": "@notice Returns true iff the path contains two or more pools\n @param path The encoded swap path\n @return True if path contains two or more pools, otherwise false"
},
"id": 165,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "hasMultiplePools",
"nameLocation": "1025:16:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 155,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 154,
"mutability": "mutable",
"name": "path",
"nameLocation": "1055:4:1",
"nodeType": "VariableDeclaration",
"scope": 165,
"src": "1042:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 153,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1042:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1041:19:1"
},
"returnParameters": {
"id": 158,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 157,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 165,
"src": "1084:4:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 156,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1084:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1083:6:1"
},
"scope": 251,
"src": "1016:140:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 182,
"nodeType": "Block",
"src": "1382:169:1",
"statements": [
{
"expression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 173,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 168,
"src": "1504:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1509:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1504:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 175,
"name": "ADDR_SIZE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "1518:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1504:23:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 177,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1503:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 178,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "1531:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1503:39:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 180,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1502:41:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 172,
"id": 181,
"nodeType": "Return",
"src": "1495:48:1"
}
]
},
"documentation": {
"id": 166,
"nodeType": "StructuredDocumentation",
"src": "1164:143:1",
"text": "@notice Returns the number of pools in the path\n @param path The encoded swap path\n @return The number of pools in the path"
},
"id": 183,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "numPools",
"nameLocation": "1322:8:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 169,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 168,
"mutability": "mutable",
"name": "path",
"nameLocation": "1344:4:1",
"nodeType": "VariableDeclaration",
"scope": 183,
"src": "1331:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 167,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1331:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1330:19:1"
},
"returnParameters": {
"id": 172,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 171,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 183,
"src": "1373:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 170,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1373:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1372:9:1"
},
"scope": 251,
"src": "1313:238:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 216,
"nodeType": "Block",
"src": "2013:133:1",
"statements": [
{
"expression": {
"id": 200,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 195,
"name": "tokenA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 189,
"src": "2024:6:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"hexValue": "30",
"id": 198,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2048:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"expression": {
"id": 196,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 186,
"src": "2033:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2038:9:1",
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
"src": "2033:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$attached_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2033:17:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2024:26:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 201,
"nodeType": "ExpressionStatement",
"src": "2024:26:1"
},
{
"expression": {
"id": 207,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 202,
"name": "fee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 193,
"src": "2061:3:1",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 205,
"name": "ADDR_SIZE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "2081:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 203,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 186,
"src": "2067:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2072:8:1",
"memberName": "toUint24",
"nodeType": "MemberAccess",
"referencedDeclaration": 117,
"src": "2067:13:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint24_$attached_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (uint24)"
}
},
"id": 206,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2067:24:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"src": "2061:30:1",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"id": 208,
"nodeType": "ExpressionStatement",
"src": "2061:30:1"
},
{
"expression": {
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 209,
"name": "tokenB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "2102:6:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 212,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "2126:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 210,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 186,
"src": "2111:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2116:9:1",
"memberName": "toAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 82,
"src": "2111:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$attached_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256) pure returns (address)"
}
},
"id": 213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2111:27:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2102:36:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 215,
"nodeType": "ExpressionStatement",
"src": "2102:36:1"
}
]
},
"documentation": {
"id": 184,
"nodeType": "StructuredDocumentation",
"src": "1559:255:1",
"text": "@notice Decodes the first pool in path\n @param path The bytes encoded swap path\n @return tokenA The first token of the given pool\n @return tokenB The second token of the given pool\n @return fee The fee level of the pool"
},
"id": 217,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "decodeFirstPool",
"nameLocation": "1829:15:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 187,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 186,
"mutability": "mutable",
"name": "path",
"nameLocation": "1858:4:1",
"nodeType": "VariableDeclaration",
"scope": 217,
"src": "1845:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 185,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1845:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1844:19:1"
},
"returnParameters": {
"id": 194,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 189,
"mutability": "mutable",
"name": "tokenA",
"nameLocation": "1936:6:1",
"nodeType": "VariableDeclaration",
"scope": 217,
"src": "1928:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 188,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1928:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 191,
"mutability": "mutable",
"name": "tokenB",
"nameLocation": "1965:6:1",
"nodeType": "VariableDeclaration",
"scope": 217,
"src": "1957:14:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 190,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1957:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 193,
"mutability": "mutable",
"name": "fee",
"nameLocation": "1993:3:1",
"nodeType": "VariableDeclaration",
"scope": 217,
"src": "1986:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 192,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "1986:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
}
],
"src": "1913:94:1"
},
"scope": 251,
"src": "1820:326:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 231,
"nodeType": "Block",
"src": "2455:51:1",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2484:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"id": 228,
"name": "POP_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 145,
"src": "2487:10:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 225,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 220,
"src": "2473:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2478:5:1",
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 47,
"src": "2473:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$attached_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
}
},
"id": 229,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2473:25:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 224,
"id": 230,
"nodeType": "Return",
"src": "2466:32:1"
}
]
},
"documentation": {
"id": 218,
"nodeType": "StructuredDocumentation",
"src": "2154:217:1",
"text": "@notice Gets the segment corresponding to the first pool in the path\n @param path The bytes encoded swap path\n @return The segment containing all data necessary to target the first pool in the path"
},
"id": 232,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getFirstPool",
"nameLocation": "2386:12:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 221,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 220,
"mutability": "mutable",
"name": "path",
"nameLocation": "2412:4:1",
"nodeType": "VariableDeclaration",
"scope": 232,
"src": "2399:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 219,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2399:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2398:19:1"
},
"returnParameters": {
"id": 224,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 223,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 232,
"src": "2441:12:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 222,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2441:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2440:14:1"
},
"scope": 251,
"src": "2377:129:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 249,
"nodeType": "Block",
"src": "2775:76:1",
"statements": [
{
"expression": {
"arguments": [
{
"id": 242,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "2804:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 246,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 243,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "2817:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2822:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "2817:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 245,
"name": "NEXT_OFFSET",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 139,
"src": "2831:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2817:25:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 240,
"name": "path",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 235,
"src": "2793:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2798:5:1",
"memberName": "slice",
"nodeType": "MemberAccess",
"referencedDeclaration": 47,
"src": "2793:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$attached_to$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
}
},
"id": 247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2793:50:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"functionReturnParameters": 239,
"id": 248,
"nodeType": "Return",
"src": "2786:57:1"
}
]
},
"documentation": {
"id": 233,
"nodeType": "StructuredDocumentation",
"src": "2514:180:1",
"text": "@notice Skips a token + fee element from the buffer and returns the remainder\n @param path The swap path\n @return The remaining token + fee elements in the path"
},
"id": 250,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "skipToken",
"nameLocation": "2709:9:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 236,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 235,
"mutability": "mutable",
"name": "path",
"nameLocation": "2732:4:1",
"nodeType": "VariableDeclaration",
"scope": 250,
"src": "2719:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 234,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2719:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2718:19:1"
},
"returnParameters": {
"id": 239,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 238,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 250,
"src": "2761:12:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 237,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2761:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2760:14:1"
},
"scope": 251,
"src": "2700:151:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 252,
"src": "170:2684:1",
"usedErrors": [],
"usedEvents": []
}
],
"src": "46:2810:1"
},
"id": 1
}
}
}
}