{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "orderIndex", "type": "uint64" } ], "name": "DexorderSwapCanceled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "orderIndex", "type": "uint64" }, { "indexed": false, "internalType": "uint8", "name": "trancheIndex", "type": "uint8" }, { "indexed": false, "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "name": "DexorderSwapFilled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "startOrderIndex", "type": "uint64" }, { "indexed": false, "internalType": "uint8", "name": "numOrders", "type": "uint8" } ], "name": "DexorderSwapPlaced", "type": "event" } ], "bytecode": { "object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208e118d174de92b5bfa45d6e4f9e42c970d7a9786586b75ee62665451c6903d5564736f6c63430008160033", "sourceMap": "245:13715:54:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;245:13715:54;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208e118d174de92b5bfa45d6e4f9e42c970d7a9786586b75ee62665451c6903d5564736f6c63430008160033", "sourceMap": "245:13715:54:-:0;;;;;;;;", "linkReferences": {} }, "methodIdentifiers": {}, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"orderIndex\",\"type\":\"uint64\"}],\"name\":\"DexorderSwapCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"orderIndex\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"trancheIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"DexorderSwapFilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"startOrderIndex\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"numOrders\",\"type\":\"uint8\"}],\"name\":\"DexorderSwapPlaced\",\"type\":\"event\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/OrderLib.sol\":\"OrderLib\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":999999999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@uniswap/v3-core/=lib_uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib_uniswap/v3-periphery/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":v3-core/=lib_uniswap/v3-core/\",\":v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/\"]},\"sources\":{\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0x954646445d1014c3cd85c7918f5e7adeeca5ee44b68c00bafa237e597a4e35ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://516fa3be52da4763147175bfba4be0aa011fadbb0c1afb01f97265bd4cee7973\",\"dweb:/ipfs/QmdixAyMJefx7qePChgdxcBH5MxhmN7vsqPuPLx3CgrVmF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://daae589a9d6fa7e55f99f86c0a16796ca490f243fb3693632c3711c0646c1d56\",\"dweb:/ipfs/QmR3zpd7wNw3rcUdekwiv6FYHJqksuTCXLVioTxu6Fbxk3\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26fef835622b46a5ba08b3ef6b46a22e94b5f285d0f0fb66b703bd30217d2c34\",\"dweb:/ipfs/QmZ548qdwfL1qF7aXz3xh1GCdTiST81kGGuKRqVUfYmPZR\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a0a107160525724f9e1bbbab031defc2f298296dd9e331f16a6f7130cec32146\",\"dweb:/ipfs/QmemujxSd7gX8A9M8UwmNbz4Ms3U9FG9QfudUgxwvTmPWf\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://b9379ad954680c44a0bc523b314ae4c4da735f9fe1d02aa56ea5bdba6f1136f2\",\"dweb:/ipfs/QmZXdgQNXKAckrXWz9R3mc47F1fvDvr28a2ewJrwNAw71B\"]},\"lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://1c42b9e6f5902ac38dd43e25750939baa7e0c1425dc75afd717c4412731065d5\",\"dweb:/ipfs/QmWaoacnzsucTvBME2o7YgZBZMhaHv7fkj83htHMVWJKWh\"]},\"lib_uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://095ce0626b41318c772b3ebf19d548282607f6a8f3d6c41c13edfbd5370c8652\",\"dweb:/ipfs/QmVDZfJJ89UUCE1hMyzqpkZAtQ8jUsBgZNE5AMRG7RzRFS\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://982f4328f956c3e60e67501e759eb292ac487f76460c774c50e9ae4fcc92aae5\",\"dweb:/ipfs/QmRnzEDsaqtd9PJEVcgQi7p5aV5pMSvRUoGZJAdwFUJxgZ\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://8febc9bdb399a4d94bb89f5377732652e2400e4a8dee808201ade6848f9004e7\",\"dweb:/ipfs/QmaKDqYYFU4d2W2iN77aDHptfbFmYZRrMYXHeGpJmM8C1c\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://d0b571930cc7488b1d546a7e9cea7c52d8b3c4e207da657ed0e0db7343b8cd03\",\"dweb:/ipfs/QmaGK6vVwB95QSTR1XMYvrh7ivYAYZxi3fD7v6VMA4jZ39\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://b99c8c9ae8e27ee6559e5866bea82cbc9ffc8247f8d15b7422a4deb287d4d047\",\"dweb:/ipfs/QmfL8gaqt3ffAnm6nVj5ksuNpLygXuL3xq5VBqrkwC2JJ3\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://64144fb96e1c7fdba87305acadb98a198d26a3d46c097cb3a666e567f6f29735\",\"dweb:/ipfs/QmUnWVwN9FKB9uV5Pr8YfLpWZnYM2DENnRMaadZ492JS9u\"]},\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://ed63907c38ff36b0e22bc9ffc53e791ea74f0d4f0e7c257fdfb5aaf8825b1f0f\",\"dweb:/ipfs/QmSQrckghEjs6HVsA5GVgpNpZWvTXMY5eQLF7cN6deFeEg\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IERC721Permit.sol\":{\"keccak256\":\"0x9e3c2a4ee65ddf95b2dfcb0815784eea3a295707e6f8b83e4c4f0f8fe2e3a1d4\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://bfd939085b3618101b955f87c7fabf38338ba1aad480295acb8102ebc5d72471\",\"dweb:/ipfs/QmauQD8bGDHTztmTDfaKXjzM7Wacrq2XU7VcTbwn1WrDBL\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol\":{\"keccak256\":\"0x3357b065654abb7f4a9ebd184a260bc39efde2afa4e99dca2e72ffc28e9c2984\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://f7682dab014724be8e0a5a401b047788ff9c70b77fa5bd567ea6adc333cb3b56\",\"dweb:/ipfs/QmatH1Gc6z3AkP4dHjAEBKfCBbgBfD4vCceF4TuZU2bCyW\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol\":{\"keccak256\":\"0x7affcfeb5127c0925a71d6a65345e117c33537523aeca7bc98085ead8452519d\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e16b291294210e71cb0f20cd0afe62ae2dc6878d627f5ccc19c4dc9cd80aec3f\",\"dweb:/ipfs/QmQGitSyBr26nour81BZmpmDMyJpvZRqHQZvnCD1Acb127\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol\":{\"keccak256\":\"0xb547e10f1e69bed03621a62b73a503e260643066c6b4054867a4d1fef47eb274\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://f9a90f58f5fd5fb42f7811f4094113b532f307b14a73764c91f977590747f407\",\"dweb:/ipfs/QmSeNH2mfiDMKf3Q6V2sqtNxx1s72JNuA1VVxRM9HoMqYp\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol\":{\"keccak256\":\"0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f\",\"dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol\":{\"keccak256\":\"0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53\",\"dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM\"]},\"lib_uniswap/v3-periphery/contracts/libraries/PoolAddress.sol\":{\"keccak256\":\"0x0a107d09991fd2dc9a3ca13bf0745f0b6f6f6ffea3e55ad3677ecdbadef089b4\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e179110a9ec825b7f15384a9c61f90261fe6227b289dac9996b0ed9cf1655b48\",\"dweb:/ipfs/Qma2amC8zJSW2PzPCk1nBYiFd4mjZiAW9z4kxjoYZPCtRr\"]},\"lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2\",\"dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v\"]},\"src/Constants.sol\":{\"keccak256\":\"0x41bf66b69d0d8c9c32c43fd3af5396d1288ac512fd5c6c14e06dbb06a06adf3f\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://283443c74eef1b4ff300c1465a46877957188c3f65ed71aea60bd11362938418\",\"dweb:/ipfs/QmQPn2nrbKVei7HUooGXy7msfoXNT8E2yVkT1kZAC9T3ds\"]},\"src/OrderLib.sol\":{\"keccak256\":\"0x3141c71ba0edb4839dcee8f6d461c8969ec85548d756178c94e19e76075a9e89\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://f7b1efe6062b9095fe9d71475066743a7c80a1cb6b6c37e9e710195689a54424\",\"dweb:/ipfs/QmcdVcXijUv1CBW1V7nvM9s8gteb3QnmtuDEkrMGmcYEV5\"]},\"src/UniswapSwapper.sol\":{\"keccak256\":\"0xeba32c1f50322147452a5e8bb33daf0de90d0abaa26929f00da4cea788f92825\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://ccef611297b80392e32363f9dce4f10403d2a9b3780475ffde7c38f1f2d23781\",\"dweb:/ipfs/QmVCN2oa3aQCx1KMxGN7EM4reJNFxegXyLSCQoe62dM2Kx\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.22+commit.4fc1097e" }, "language": "Solidity", "output": { "abi": [ { "inputs": [ { "internalType": "uint64", "name": "orderIndex", "type": "uint64", "indexed": false } ], "type": "event", "name": "DexorderSwapCanceled", "anonymous": false }, { "inputs": [ { "internalType": "uint64", "name": "orderIndex", "type": "uint64", "indexed": false }, { "internalType": "uint8", "name": "trancheIndex", "type": "uint8", "indexed": false }, { "internalType": "uint256", "name": "amountIn", "type": "uint256", "indexed": false }, { "internalType": "uint256", "name": "amountOut", "type": "uint256", "indexed": false } ], "type": "event", "name": "DexorderSwapFilled", "anonymous": false }, { "inputs": [ { "internalType": "uint64", "name": "startOrderIndex", "type": "uint64", "indexed": false }, { "internalType": "uint8", "name": "numOrders", "type": "uint8", "indexed": false } ], "type": "event", "name": "DexorderSwapPlaced", "anonymous": false } ], "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@uniswap/v3-core/=lib_uniswap/v3-core/", "@uniswap/v3-periphery/=lib_uniswap/v3-periphery/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v3-core/=lib_uniswap/v3-core/", "v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/" ], "optimizer": { "runs": 999999999, "details": { "peephole": true, "inliner": true, "jumpdestRemover": true, "orderLiterals": true, "deduplicate": true, "cse": true, "constantOptimizer": true, "yul": true, "yulDetails": { "stackAllocation": true, "optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu" } } }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "src/OrderLib.sol": "OrderLib" }, "libraries": {} }, "sources": { "lib/forge-std/src/console2.sol": { "keccak256": "0x954646445d1014c3cd85c7918f5e7adeeca5ee44b68c00bafa237e597a4e35ea", "urls": [ "bzz-raw://516fa3be52da4763147175bfba4be0aa011fadbb0c1afb01f97265bd4cee7973", "dweb:/ipfs/QmdixAyMJefx7qePChgdxcBH5MxhmN7vsqPuPLx3CgrVmF" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { "keccak256": "0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b", "urls": [ "bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34", "dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol": { "keccak256": "0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68", "urls": [ "bzz-raw://daae589a9d6fa7e55f99f86c0a16796ca490f243fb3693632c3711c0646c1d56", "dweb:/ipfs/QmR3zpd7wNw3rcUdekwiv6FYHJqksuTCXLVioTxu6Fbxk3" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { "keccak256": "0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf", "urls": [ "bzz-raw://26fef835622b46a5ba08b3ef6b46a22e94b5f285d0f0fb66b703bd30217d2c34", "dweb:/ipfs/QmZ548qdwfL1qF7aXz3xh1GCdTiST81kGGuKRqVUfYmPZR" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol": { "keccak256": "0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9", "urls": [ "bzz-raw://a0a107160525724f9e1bbbab031defc2f298296dd9e331f16a6f7130cec32146", "dweb:/ipfs/QmemujxSd7gX8A9M8UwmNbz4Ms3U9FG9QfudUgxwvTmPWf" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { "keccak256": "0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1", "urls": [ "bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f", "dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy" ], "license": "MIT" }, "lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol": { "keccak256": "0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489", "urls": [ "bzz-raw://b9379ad954680c44a0bc523b314ae4c4da735f9fe1d02aa56ea5bdba6f1136f2", "dweb:/ipfs/QmZXdgQNXKAckrXWz9R3mc47F1fvDvr28a2ewJrwNAw71B" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol": { "keccak256": "0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1", "urls": [ "bzz-raw://1c42b9e6f5902ac38dd43e25750939baa7e0c1425dc75afd717c4412731065d5", "dweb:/ipfs/QmWaoacnzsucTvBME2o7YgZBZMhaHv7fkj83htHMVWJKWh" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol": { "keccak256": "0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69", "urls": [ "bzz-raw://095ce0626b41318c772b3ebf19d548282607f6a8f3d6c41c13edfbd5370c8652", "dweb:/ipfs/QmVDZfJJ89UUCE1hMyzqpkZAtQ8jUsBgZNE5AMRG7RzRFS" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol": { "keccak256": "0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634", "urls": [ "bzz-raw://982f4328f956c3e60e67501e759eb292ac487f76460c774c50e9ae4fcc92aae5", "dweb:/ipfs/QmRnzEDsaqtd9PJEVcgQi7p5aV5pMSvRUoGZJAdwFUJxgZ" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol": { "keccak256": "0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5", "urls": [ "bzz-raw://8febc9bdb399a4d94bb89f5377732652e2400e4a8dee808201ade6848f9004e7", "dweb:/ipfs/QmaKDqYYFU4d2W2iN77aDHptfbFmYZRrMYXHeGpJmM8C1c" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol": { "keccak256": "0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd", "urls": [ "bzz-raw://d0b571930cc7488b1d546a7e9cea7c52d8b3c4e207da657ed0e0db7343b8cd03", "dweb:/ipfs/QmaGK6vVwB95QSTR1XMYvrh7ivYAYZxi3fD7v6VMA4jZ39" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol": { "keccak256": "0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7", "urls": [ "bzz-raw://b99c8c9ae8e27ee6559e5866bea82cbc9ffc8247f8d15b7422a4deb287d4d047", "dweb:/ipfs/QmfL8gaqt3ffAnm6nVj5ksuNpLygXuL3xq5VBqrkwC2JJ3" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol": { "keccak256": "0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235", "urls": [ "bzz-raw://64144fb96e1c7fdba87305acadb98a198d26a3d46c097cb3a666e567f6f29735", "dweb:/ipfs/QmUnWVwN9FKB9uV5Pr8YfLpWZnYM2DENnRMaadZ492JS9u" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol": { "keccak256": "0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f", "urls": [ "bzz-raw://ed63907c38ff36b0e22bc9ffc53e791ea74f0d4f0e7c257fdfb5aaf8825b1f0f", "dweb:/ipfs/QmSQrckghEjs6HVsA5GVgpNpZWvTXMY5eQLF7cN6deFeEg" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IERC721Permit.sol": { "keccak256": "0x9e3c2a4ee65ddf95b2dfcb0815784eea3a295707e6f8b83e4c4f0f8fe2e3a1d4", "urls": [ "bzz-raw://bfd939085b3618101b955f87c7fabf38338ba1aad480295acb8102ebc5d72471", "dweb:/ipfs/QmauQD8bGDHTztmTDfaKXjzM7Wacrq2XU7VcTbwn1WrDBL" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol": { "keccak256": "0x3357b065654abb7f4a9ebd184a260bc39efde2afa4e99dca2e72ffc28e9c2984", "urls": [ "bzz-raw://f7682dab014724be8e0a5a401b047788ff9c70b77fa5bd567ea6adc333cb3b56", "dweb:/ipfs/QmatH1Gc6z3AkP4dHjAEBKfCBbgBfD4vCceF4TuZU2bCyW" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol": { "keccak256": "0x7affcfeb5127c0925a71d6a65345e117c33537523aeca7bc98085ead8452519d", "urls": [ "bzz-raw://e16b291294210e71cb0f20cd0afe62ae2dc6878d627f5ccc19c4dc9cd80aec3f", "dweb:/ipfs/QmQGitSyBr26nour81BZmpmDMyJpvZRqHQZvnCD1Acb127" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol": { "keccak256": "0xb547e10f1e69bed03621a62b73a503e260643066c6b4054867a4d1fef47eb274", "urls": [ "bzz-raw://f9a90f58f5fd5fb42f7811f4094113b532f307b14a73764c91f977590747f407", "dweb:/ipfs/QmSeNH2mfiDMKf3Q6V2sqtNxx1s72JNuA1VVxRM9HoMqYp" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol": { "keccak256": "0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862", "urls": [ "bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f", "dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": { "keccak256": "0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975", "urls": [ "bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53", "dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/libraries/PoolAddress.sol": { "keccak256": "0x0a107d09991fd2dc9a3ca13bf0745f0b6f6f6ffea3e55ad3677ecdbadef089b4", "urls": [ "bzz-raw://e179110a9ec825b7f15384a9c61f90261fe6227b289dac9996b0ed9cf1655b48", "dweb:/ipfs/Qma2amC8zJSW2PzPCk1nBYiFd4mjZiAW9z4kxjoYZPCtRr" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol": { "keccak256": "0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd", "urls": [ "bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2", "dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v" ], "license": "GPL-2.0-or-later" }, "src/Constants.sol": { "keccak256": "0x41bf66b69d0d8c9c32c43fd3af5396d1288ac512fd5c6c14e06dbb06a06adf3f", "urls": [ "bzz-raw://283443c74eef1b4ff300c1465a46877957188c3f65ed71aea60bd11362938418", "dweb:/ipfs/QmQPn2nrbKVei7HUooGXy7msfoXNT8E2yVkT1kZAC9T3ds" ], "license": "UNLICENSED" }, "src/OrderLib.sol": { "keccak256": "0x3141c71ba0edb4839dcee8f6d461c8969ec85548d756178c94e19e76075a9e89", "urls": [ "bzz-raw://f7b1efe6062b9095fe9d71475066743a7c80a1cb6b6c37e9e710195689a54424", "dweb:/ipfs/QmcdVcXijUv1CBW1V7nvM9s8gteb3QnmtuDEkrMGmcYEV5" ], "license": "UNLICENSED" }, "src/UniswapSwapper.sol": { "keccak256": "0xeba32c1f50322147452a5e8bb33daf0de90d0abaa26929f00da4cea788f92825", "urls": [ "bzz-raw://ccef611297b80392e32363f9dce4f10403d2a9b3780475ffde7c38f1f2d23781", "dweb:/ipfs/QmVCN2oa3aQCx1KMxGN7EM4reJNFxegXyLSCQoe62dM2Kx" ], "license": "UNLICENSED" } }, "version": 1 }, "ast": { "absolutePath": "src/OrderLib.sol", "id": 47923, "exportedSymbols": { "Constants": [ 46264 ], "IERC165": [ 43789 ], "IERC20": [ 43556 ], "IERC721": [ 43697 ], "IERC721Enumerable": [ 43728 ], "IERC721Metadata": [ 43755 ], "IERC721Permit": [ 45094 ], "INonfungiblePositionManager": [ 45293 ], "IPeripheryImmutableState": [ 45309 ], "IPeripheryPayments": [ 45335 ], "IPoolInitializer": [ 45354 ], "ISwapRouter": [ 45454 ], "IUniswapV3Factory": [ 43872 ], "IUniswapV3Pool": [ 43894 ], "IUniswapV3PoolActions": [ 44004 ], "IUniswapV3PoolDerivedState": [ 44035 ], "IUniswapV3PoolEvents": [ 44154 ], "IUniswapV3PoolImmutables": [ 44194 ], "IUniswapV3PoolOwnerActions": [ 44220 ], "IUniswapV3PoolState": [ 44328 ], "IUniswapV3SwapCallback": [ 43908 ], "OrderLib": [ 47922 ], "PoolAddress": [ 45892 ], "TransferHelper": [ 46063 ], "UniswapSwapper": [ 48847 ], "console2": [ 29653 ] }, "nodeType": "SourceUnit", "src": "66:13895:54", "nodes": [ { "id": 46480, "nodeType": "PragmaDirective", "src": "66:24:54", "nodes": [], "literals": [ "solidity", ">=", "0.8", ".0" ] }, { "id": 46481, "nodeType": "PragmaDirective", "src": "91:19:54", "nodes": [], "literals": [ "abicoder", "v2" ] }, { "id": 46482, "nodeType": "ImportDirective", "src": "112:66:54", "nodes": [], "absolutePath": "lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol", "file": "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol", "nameLocation": "-1:-1:-1", "scope": 47923, "sourceUnit": 43895, "symbolAliases": [], "unitAlias": "" }, { "id": 46483, "nodeType": "ImportDirective", "src": "179:30:54", "nodes": [], "absolutePath": "src/UniswapSwapper.sol", "file": "./UniswapSwapper.sol", "nameLocation": "-1:-1:-1", "scope": 47923, "sourceUnit": 48848, "symbolAliases": [], "unitAlias": "" }, { "id": 46484, "nodeType": "ImportDirective", "src": "210:32:54", "nodes": [], "absolutePath": "lib/forge-std/src/console2.sol", "file": "forge-std/console2.sol", "nameLocation": "-1:-1:-1", "scope": 47923, "sourceUnit": 29654, "symbolAliases": [], "unitAlias": "" }, { "id": 47922, "nodeType": "ContractDefinition", "src": "245:13715:54", "nodes": [ { "id": 46491, "nodeType": "VariableDeclaration", "src": "314:52:54", "nodes": [], "constant": true, "mutability": "constant", "name": "NO_CHAIN", "nameLocation": "339:8:54", "scope": 47922, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46485, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "314:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "value": { "expression": { "arguments": [ { "id": 46488, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "355:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" }, "typeName": { "id": 46487, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "355:6:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" } ], "id": 46486, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "350:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46489, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "350:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint64", "typeString": "type(uint64)" } }, "id": 46490, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "363:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "350:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "id": 46498, "nodeType": "VariableDeclaration", "src": "372:56:54", "nodes": [], "constant": true, "mutability": "constant", "name": "NO_OCO_INDEX", "nameLocation": "397:12:54", "scope": 47922, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46492, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "372:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "value": { "expression": { "arguments": [ { "id": 46495, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "417:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" }, "typeName": { "id": 46494, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "417:6:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" } ], "id": 46493, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "412:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46496, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "412:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint64", "typeString": "type(uint64)" } }, "id": 46497, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "425:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "412:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "id": 46509, "nodeType": "StructDefinition", "src": "435:217:54", "nodes": [], "canonicalName": "OrderLib.OrdersInfo", "members": [ { "constant": false, "id": 46500, "mutability": "mutable", "name": "_ignored", "nameLocation": "468:8:54", "nodeType": "VariableDeclaration", "scope": 46509, "src": "463:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46499, "name": "bool", "nodeType": "ElementaryTypeName", "src": "463:4:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46504, "mutability": "mutable", "name": "orders", "nameLocation": "609:6:54", "nodeType": "VariableDeclaration", "scope": 46509, "src": "591:24:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus[]" }, "typeName": { "baseType": { "id": 46502, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46501, "name": "SwapOrderStatus", "nameLocations": [ "591:15:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46584, "src": "591:15:54" }, "referencedDeclaration": 46584, "src": "591:15:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" } }, "id": 46503, "nodeType": "ArrayTypeName", "src": "591:17:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus[]" } }, "visibility": "internal" }, { "constant": false, "id": 46508, "mutability": "mutable", "name": "ocoGroups", "nameLocation": "636:9:54", "nodeType": "VariableDeclaration", "scope": 46509, "src": "625:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.OcoGroup[]" }, "typeName": { "baseType": { "id": 46506, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46505, "name": "OcoGroup", "nameLocations": [ "625:8:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46653, "src": "625:8:54" }, "referencedDeclaration": 46653, "src": "625:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup" } }, "id": 46507, "nodeType": "ArrayTypeName", "src": "625:10:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.OcoGroup[]" } }, "visibility": "internal" } ], "name": "OrdersInfo", "nameLocation": "442:10:54", "scope": 47922, "visibility": "public" }, { "id": 46515, "nodeType": "EventDefinition", "src": "658:67:54", "nodes": [], "anonymous": false, "eventSelector": "704790b72d78f27fe222b5e80adb23b845160c560b9e927c2c87b75adc9c2e2b", "name": "DexorderSwapPlaced", "nameLocation": "664:18:54", "parameters": { "id": 46514, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46511, "indexed": false, "mutability": "mutable", "name": "startOrderIndex", "nameLocation": "691:15:54", "nodeType": "VariableDeclaration", "scope": 46515, "src": "684:22:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46510, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "684:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 46513, "indexed": false, "mutability": "mutable", "name": "numOrders", "nameLocation": "714:9:54", "nodeType": "VariableDeclaration", "scope": 46515, "src": "708:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 46512, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "708:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" } ], "src": "683:41:54" } }, { "id": 46525, "nodeType": "EventDefinition", "src": "731:102:54", "nodes": [], "anonymous": false, "eventSelector": "8b9a867d3ae2675d02744a1ce6d50e404d9af21941871223000c679e01911af8", "name": "DexorderSwapFilled", "nameLocation": "737:18:54", "parameters": { "id": 46524, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46517, "indexed": false, "mutability": "mutable", "name": "orderIndex", "nameLocation": "764:10:54", "nodeType": "VariableDeclaration", "scope": 46525, "src": "757:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46516, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "757:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 46519, "indexed": false, "mutability": "mutable", "name": "trancheIndex", "nameLocation": "782:12:54", "nodeType": "VariableDeclaration", "scope": 46525, "src": "776:18:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 46518, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "776:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" }, { "constant": false, "id": 46521, "indexed": false, "mutability": "mutable", "name": "amountIn", "nameLocation": "804:8:54", "nodeType": "VariableDeclaration", "scope": 46525, "src": "796:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46520, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "796:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 46523, "indexed": false, "mutability": "mutable", "name": "amountOut", "nameLocation": "822:9:54", "nodeType": "VariableDeclaration", "scope": 46525, "src": "814:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46522, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "814:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "756:76:54" } }, { "id": 46529, "nodeType": "EventDefinition", "src": "839:47:54", "nodes": [], "anonymous": false, "eventSelector": "74a075ee230588b5c76ea493a6d21b086384f29139b7227b9c6329e66106dc48", "name": "DexorderSwapCanceled", "nameLocation": "845:20:54", "parameters": { "id": 46528, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46527, "indexed": false, "mutability": "mutable", "name": "orderIndex", "nameLocation": "874:10:54", "nodeType": "VariableDeclaration", "scope": 46529, "src": "867:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46526, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "867:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "src": "866:19:54" } }, { "id": 46534, "nodeType": "EnumDefinition", "src": "892:158:54", "nodes": [], "canonicalName": "OrderLib.SwapOrderState", "members": [ { "id": 46530, "name": "Open", "nameLocation": "922:4:54", "nodeType": "EnumValue", "src": "922:4:54" }, { "id": 46531, "name": "Canceled", "nameLocation": "928:8:54", "nodeType": "EnumValue", "src": "928:8:54" }, { "id": 46532, "name": "Filled", "nameLocation": "938:6:54", "nodeType": "EnumValue", "src": "938:6:54" }, { "id": 46533, "name": "Expired", "nameLocation": "946:7:54", "nodeType": "EnumValue", "src": "946:7:54" } ], "name": "SwapOrderState", "nameLocation": "897:14:54" }, { "id": 46537, "nodeType": "EnumDefinition", "src": "1056:58:54", "nodes": [], "canonicalName": "OrderLib.Exchange", "members": [ { "id": 46535, "name": "UniswapV2", "nameLocation": "1080:9:54", "nodeType": "EnumValue", "src": "1080:9:54" }, { "id": 46536, "name": "UniswapV3", "nameLocation": "1099:9:54", "nodeType": "EnumValue", "src": "1099:9:54" } ], "name": "Exchange", "nameLocation": "1061:8:54" }, { "id": 46543, "nodeType": "StructDefinition", "src": "1120:67:54", "nodes": [], "canonicalName": "OrderLib.Route", "members": [ { "constant": false, "id": 46540, "mutability": "mutable", "name": "exchange", "nameLocation": "1152:8:54", "nodeType": "VariableDeclaration", "scope": 46543, "src": "1143:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" }, "typeName": { "id": 46539, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46538, "name": "Exchange", "nameLocations": [ "1143:8:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46537, "src": "1143:8:54" }, "referencedDeclaration": 46537, "src": "1143:8:54", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" } }, "visibility": "internal" }, { "constant": false, "id": 46542, "mutability": "mutable", "name": "fee", "nameLocation": "1177:3:54", "nodeType": "VariableDeclaration", "scope": 46543, "src": "1170:10:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 46541, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "1170:6:54", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" } ], "name": "Route", "nameLocation": "1127:5:54", "scope": 47922, "visibility": "public" }, { "id": 46563, "nodeType": "StructDefinition", "src": "1193:388:54", "nodes": [], "canonicalName": "OrderLib.SwapOrder", "members": [ { "constant": false, "id": 46545, "mutability": "mutable", "name": "tokenIn", "nameLocation": "1228:7:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1220:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 46544, "name": "address", "nodeType": "ElementaryTypeName", "src": "1220:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 46547, "mutability": "mutable", "name": "tokenOut", "nameLocation": "1253:8:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1245:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 46546, "name": "address", "nodeType": "ElementaryTypeName", "src": "1245:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 46550, "mutability": "mutable", "name": "route", "nameLocation": "1277:5:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1271:11:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage_ptr", "typeString": "struct OrderLib.Route" }, "typeName": { "id": 46549, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46548, "name": "Route", "nameLocations": [ "1271:5:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46543, "src": "1271:5:54" }, "referencedDeclaration": 46543, "src": "1271:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage_ptr", "typeString": "struct OrderLib.Route" } }, "visibility": "internal" }, { "constant": false, "id": 46552, "mutability": "mutable", "name": "amount", "nameLocation": "1300:6:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1292:14:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46551, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1292:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 46554, "mutability": "mutable", "name": "amountIsInput", "nameLocation": "1321:13:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1316:18:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46553, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1316:4:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46556, "mutability": "mutable", "name": "outputDirectlyToOwner", "nameLocation": "1349:21:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1344:26:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46555, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1344:4:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46558, "mutability": "mutable", "name": "chainOrder", "nameLocation": "1387:10:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1380:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46557, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "1380:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 46562, "mutability": "mutable", "name": "tranches", "nameLocation": "1566:8:54", "nodeType": "VariableDeclaration", "scope": 46563, "src": "1556:18:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.Tranche[]" }, "typeName": { "baseType": { "id": 46560, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46559, "name": "Tranche", "nameLocations": [ "1556:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46638, "src": "1556:7:54" }, "referencedDeclaration": 46638, "src": "1556:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" } }, "id": 46561, "nodeType": "ArrayTypeName", "src": "1556:9:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.Tranche[]" } }, "visibility": "internal" } ], "name": "SwapOrder", "nameLocation": "1200:9:54", "scope": 47922, "visibility": "public" }, { "id": 46584, "nodeType": "StructDefinition", "src": "1587:350:54", "nodes": [], "canonicalName": "OrderLib.SwapOrderStatus", "members": [ { "constant": false, "id": 46566, "mutability": "mutable", "name": "order", "nameLocation": "1630:5:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1620:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" }, "typeName": { "id": 46565, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46564, "name": "SwapOrder", "nameLocations": [ "1620:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "1620:9:54" }, "referencedDeclaration": 46563, "src": "1620:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "visibility": "internal" }, { "constant": false, "id": 46569, "mutability": "mutable", "name": "state", "nameLocation": "1660:5:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1645:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" }, "typeName": { "id": 46568, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46567, "name": "SwapOrderState", "nameLocations": [ "1645:14:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46534, "src": "1645:14:54" }, "referencedDeclaration": 46534, "src": "1645:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "visibility": "internal" }, { "constant": false, "id": 46571, "mutability": "mutable", "name": "start", "nameLocation": "1682:5:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1675:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 46570, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "1675:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" }, { "constant": false, "id": 46573, "mutability": "mutable", "name": "ocoGroup", "nameLocation": "1704:8:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1697:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46572, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "1697:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 46575, "mutability": "mutable", "name": "filledIn", "nameLocation": "1730:8:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1722:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46574, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1722:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 46577, "mutability": "mutable", "name": "filledOut", "nameLocation": "1766:9:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1758:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1758:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 46580, "mutability": "mutable", "name": "trancheFilledIn", "nameLocation": "1804:15:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1794:25:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 46578, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1794:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 46579, "nodeType": "ArrayTypeName", "src": "1794:9:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 46583, "mutability": "mutable", "name": "trancheFilledOut", "nameLocation": "1876:16:54", "nodeType": "VariableDeclaration", "scope": 46584, "src": "1866:26:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 46581, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1866:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 46582, "nodeType": "ArrayTypeName", "src": "1866:9:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" } ], "name": "SwapOrderStatus", "nameLocation": "1594:15:54", "scope": 47922, "visibility": "public" }, { "id": 46588, "nodeType": "EnumDefinition", "src": "1943:71:54", "nodes": [], "canonicalName": "OrderLib.ConstraintMode", "members": [ { "id": 46585, "name": "Time", "nameLocation": "1973:4:54", "nodeType": "EnumValue", "src": "1973:4:54" }, { "id": 46586, "name": "Line", "nameLocation": "1987:4:54", "nodeType": "EnumValue", "src": "1987:4:54" }, { "id": 46587, "name": "Barrier", "nameLocation": "2001:7:54", "nodeType": "EnumValue", "src": "2001:7:54" } ], "name": "ConstraintMode", "nameLocation": "1948:14:54" }, { "id": 46594, "nodeType": "StructDefinition", "src": "2020:162:54", "nodes": [], "canonicalName": "OrderLib.Constraint", "members": [ { "constant": false, "id": 46591, "mutability": "mutable", "name": "mode", "nameLocation": "2063:4:54", "nodeType": "VariableDeclaration", "scope": 46594, "src": "2048:19:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" }, "typeName": { "id": 46590, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46589, "name": "ConstraintMode", "nameLocations": [ "2048:14:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46588, "src": "2048:14:54" }, "referencedDeclaration": 46588, "src": "2048:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "visibility": "internal" }, { "constant": false, "id": 46593, "mutability": "mutable", "name": "constraint", "nameLocation": "2103:10:54", "nodeType": "VariableDeclaration", "scope": 46594, "src": "2097:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" }, "typeName": { "id": 46592, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2097:5:54", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "name": "Constraint", "nameLocation": "2027:10:54", "scope": 47922, "visibility": "public" }, { "id": 46605, "nodeType": "StructDefinition", "src": "2188:180:54", "nodes": [], "canonicalName": "OrderLib.LineConstraint", "members": [ { "constant": false, "id": 46596, "mutability": "mutable", "name": "isAbove", "nameLocation": "2225:7:54", "nodeType": "VariableDeclaration", "scope": 46605, "src": "2220:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46595, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2220:4:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46598, "mutability": "mutable", "name": "isRatio", "nameLocation": "2247:7:54", "nodeType": "VariableDeclaration", "scope": 46605, "src": "2242:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46597, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2242:4:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46600, "mutability": "mutable", "name": "time", "nameLocation": "2271:4:54", "nodeType": "VariableDeclaration", "scope": 46605, "src": "2264:11:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 46599, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2264:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" }, { "constant": false, "id": 46602, "mutability": "mutable", "name": "valueSqrtX96", "nameLocation": "2293:12:54", "nodeType": "VariableDeclaration", "scope": 46605, "src": "2285:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 46601, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "2285:7:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" }, { "constant": false, "id": 46604, "mutability": "mutable", "name": "slopeSqrtX96", "nameLocation": "2322:12:54", "nodeType": "VariableDeclaration", "scope": 46605, "src": "2315:19:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int160", "typeString": "int160" }, "typeName": { "id": 46603, "name": "int160", "nodeType": "ElementaryTypeName", "src": "2315:6:54", "typeDescriptions": { "typeIdentifier": "t_int160", "typeString": "int160" } }, "visibility": "internal" } ], "name": "LineConstraint", "nameLocation": "2195:14:54", "scope": 47922, "visibility": "public" }, { "id": 46608, "nodeType": "EnumDefinition", "src": "2374:144:54", "nodes": [], "canonicalName": "OrderLib.TimeMode", "members": [ { "id": 46606, "name": "Timestamp", "nameLocation": "2398:9:54", "nodeType": "EnumValue", "src": "2398:9:54" }, { "id": 46607, "name": "SinceOrderStart", "nameLocation": "2439:15:54", "nodeType": "EnumValue", "src": "2439:15:54" } ], "name": "TimeMode", "nameLocation": "2379:8:54" }, { "id": 46614, "nodeType": "StructDefinition", "src": "2524:63:54", "nodes": [], "canonicalName": "OrderLib.Time", "members": [ { "constant": false, "id": 46611, "mutability": "mutable", "name": "mode", "nameLocation": "2555:4:54", "nodeType": "VariableDeclaration", "scope": 46614, "src": "2546:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" }, "typeName": { "id": 46610, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46609, "name": "TimeMode", "nameLocations": [ "2546:8:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46608, "src": "2546:8:54" }, "referencedDeclaration": 46608, "src": "2546:8:54", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" } }, "visibility": "internal" }, { "constant": false, "id": 46613, "mutability": "mutable", "name": "time", "nameLocation": "2576:4:54", "nodeType": "VariableDeclaration", "scope": 46614, "src": "2569:11:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 46612, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2569:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" } ], "name": "Time", "nameLocation": "2531:4:54", "scope": 47922, "visibility": "public" }, { "id": 46617, "nodeType": "VariableDeclaration", "src": "2593:32:54", "nodes": [], "constant": true, "mutability": "constant", "name": "DISTANT_PAST", "nameLocation": "2609:12:54", "scope": 47922, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 46615, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2593:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": { "hexValue": "30", "id": 46616, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2624:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "internal" }, { "id": 46624, "nodeType": "VariableDeclaration", "src": "2631:49:54", "nodes": [], "constant": true, "mutability": "constant", "name": "DISTANT_FUTURE", "nameLocation": "2647:14:54", "scope": 47922, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 46618, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2631:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": { "expression": { "arguments": [ { "id": 46621, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2669:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint32_$", "typeString": "type(uint32)" }, "typeName": { "id": 46620, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2669:6:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint32_$", "typeString": "type(uint32)" } ], "id": 46619, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "2664:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46622, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2664:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint32", "typeString": "type(uint32)" } }, "id": 46623, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2677:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "2664:16:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" }, { "id": 46631, "nodeType": "StructDefinition", "src": "2687:73:54", "nodes": [], "canonicalName": "OrderLib.TimeConstraint", "members": [ { "constant": false, "id": 46627, "mutability": "mutable", "name": "earliest", "nameLocation": "2724:8:54", "nodeType": "VariableDeclaration", "scope": 46631, "src": "2719:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_storage_ptr", "typeString": "struct OrderLib.Time" }, "typeName": { "id": 46626, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46625, "name": "Time", "nameLocations": [ "2719:4:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46614, "src": "2719:4:54" }, "referencedDeclaration": 46614, "src": "2719:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_storage_ptr", "typeString": "struct OrderLib.Time" } }, "visibility": "internal" }, { "constant": false, "id": 46630, "mutability": "mutable", "name": "latest", "nameLocation": "2747:6:54", "nodeType": "VariableDeclaration", "scope": 46631, "src": "2742:11:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_storage_ptr", "typeString": "struct OrderLib.Time" }, "typeName": { "id": 46629, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46628, "name": "Time", "nameLocations": [ "2742:4:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46614, "src": "2742:4:54" }, "referencedDeclaration": 46614, "src": "2742:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_storage_ptr", "typeString": "struct OrderLib.Time" } }, "visibility": "internal" } ], "name": "TimeConstraint", "nameLocation": "2694:14:54", "scope": 47922, "visibility": "public" }, { "id": 46638, "nodeType": "StructDefinition", "src": "2766:174:54", "nodes": [], "canonicalName": "OrderLib.Tranche", "members": [ { "constant": false, "id": 46633, "mutability": "mutable", "name": "fraction", "nameLocation": "2798:8:54", "nodeType": "VariableDeclaration", "scope": 46638, "src": "2791:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" }, "typeName": { "id": 46632, "name": "uint16", "nodeType": "ElementaryTypeName", "src": "2791:6:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "visibility": "internal" }, { "constant": false, "id": 46637, "mutability": "mutable", "name": "constraints", "nameLocation": "2922:11:54", "nodeType": "VariableDeclaration", "scope": 46638, "src": "2909:24:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.Constraint[]" }, "typeName": { "baseType": { "id": 46635, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46634, "name": "Constraint", "nameLocations": [ "2909:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46594, "src": "2909:10:54" }, "referencedDeclaration": 46594, "src": "2909:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint" } }, "id": 46636, "nodeType": "ArrayTypeName", "src": "2909:12:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.Constraint[]" } }, "visibility": "internal" } ], "name": "Tranche", "nameLocation": "2773:7:54", "scope": 47922, "visibility": "public" }, { "id": 46641, "nodeType": "StructDefinition", "src": "2946:61:54", "nodes": [], "canonicalName": "OrderLib.PriceProof", "members": [ { "constant": false, "id": 46640, "mutability": "mutable", "name": "proof", "nameLocation": "2995:5:54", "nodeType": "VariableDeclaration", "scope": 46641, "src": "2990:10:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46639, "name": "uint", "nodeType": "ElementaryTypeName", "src": "2990:4:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "name": "PriceProof", "nameLocation": "2953:10:54", "scope": 47922, "visibility": "public" }, { "id": 46645, "nodeType": "EnumDefinition", "src": "3013:97:54", "nodes": [], "canonicalName": "OrderLib.OcoMode", "members": [ { "id": 46642, "name": "NO_OCO", "nameLocation": "3036:6:54", "nodeType": "EnumValue", "src": "3036:6:54" }, { "id": 46643, "name": "CANCEL_ON_PARTIAL_FILL", "nameLocation": "3052:22:54", "nodeType": "EnumValue", "src": "3052:22:54" }, { "id": 46644, "name": "CANCEL_ON_COMPLETION", "nameLocation": "3084:20:54", "nodeType": "EnumValue", "src": "3084:20:54" } ], "name": "OcoMode", "nameLocation": "3018:7:54" }, { "id": 46653, "nodeType": "StructDefinition", "src": "3116:167:54", "nodes": [], "canonicalName": "OrderLib.OcoGroup", "members": [ { "constant": false, "id": 46648, "mutability": "mutable", "name": "mode", "nameLocation": "3150:4:54", "nodeType": "VariableDeclaration", "scope": 46653, "src": "3142:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "typeName": { "id": 46647, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46646, "name": "OcoMode", "nameLocations": [ "3142:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46645, "src": "3142:7:54" }, "referencedDeclaration": 46645, "src": "3142:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "visibility": "internal" }, { "constant": false, "id": 46650, "mutability": "mutable", "name": "startIndex", "nameLocation": "3171:10:54", "nodeType": "VariableDeclaration", "scope": 46653, "src": "3164:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46649, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "3164:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 46652, "mutability": "mutable", "name": "num", "nameLocation": "3233:3:54", "nodeType": "VariableDeclaration", "scope": 46653, "src": "3227:9:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 46651, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "3227:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" } ], "name": "OcoGroup", "nameLocation": "3123:8:54", "scope": 47922, "visibility": "public" }, { "id": 46688, "nodeType": "FunctionDefinition", "src": "3289:226:54", "nodes": [], "body": { "id": 46687, "nodeType": "Block", "src": "3368:147:54", "nodes": [], "statements": [ { "assignments": [ 46666 ], "declarations": [ { "constant": false, "id": 46666, "mutability": "mutable", "name": "orders", "nameLocation": "3397:6:54", "nodeType": "VariableDeclaration", "scope": 46687, "src": "3378:25:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder[]" }, "typeName": { "baseType": { "id": 46664, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46663, "name": "SwapOrder", "nameLocations": [ "3378:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "3378:9:54" }, "referencedDeclaration": 46563, "src": "3378:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "id": 46665, "nodeType": "ArrayTypeName", "src": "3378:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.SwapOrder[]" } }, "visibility": "internal" } ], "id": 46673, "initialValue": { "arguments": [ { "hexValue": "31", "id": 46671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3422:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" } ], "id": 46670, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "3406:15:54", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr_$", "typeString": "function (uint256) pure returns (struct OrderLib.SwapOrder memory[] memory)" }, "typeName": { "baseType": { "id": 46668, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46667, "name": "SwapOrder", "nameLocations": [ "3410:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "3410:9:54" }, "referencedDeclaration": 46563, "src": "3410:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "id": 46669, "nodeType": "ArrayTypeName", "src": "3410:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.SwapOrder[]" } } }, "id": 46672, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3406:18:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "nodeType": "VariableDeclarationStatement", "src": "3378:46:54" }, { "expression": { "id": 46678, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "id": 46674, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46666, "src": "3434:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 46676, "indexExpression": { "hexValue": "30", "id": 46675, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3441:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "3434:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 46677, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46659, "src": "3446:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "src": "3434:17:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46679, "nodeType": "ExpressionStatement", "src": "3434:17:54" }, { "expression": { "arguments": [ { "id": 46681, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46656, "src": "3481:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, { "id": 46682, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46666, "src": "3486:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, { "expression": { "id": 46683, "name": "OcoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46645, "src": "3493:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_OcoMode_$46645_$", "typeString": "type(enum OrderLib.OcoMode)" } }, "id": 46684, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3501:6:54", "memberName": "NO_OCO", "nodeType": "MemberAccess", "referencedDeclaration": 46642, "src": "3493:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" }, { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" }, { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } ], "id": 46680, "name": "_placeOrders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47021, "src": "3468:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46509_storage_ptr_$_t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr_$_t_enum$_OcoMode_$46645_$returns$__$", "typeString": "function (struct OrderLib.OrdersInfo storage pointer,struct OrderLib.SwapOrder memory[] memory,enum OrderLib.OcoMode)" } }, "id": 46685, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3468:40:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "functionReturnParameters": 46661, "id": 46686, "nodeType": "Return", "src": "3461:47:54" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_placeOrder", "nameLocation": "3298:11:54", "parameters": { "id": 46660, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46656, "mutability": "mutable", "name": "self", "nameLocation": "3329:4:54", "nodeType": "VariableDeclaration", "scope": 46688, "src": "3310:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 46655, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46654, "name": "OrdersInfo", "nameLocations": [ "3310:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "3310:10:54" }, "referencedDeclaration": 46509, "src": "3310:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 46659, "mutability": "mutable", "name": "order", "nameLocation": "3352:5:54", "nodeType": "VariableDeclaration", "scope": 46688, "src": "3335:22:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder" }, "typeName": { "id": 46658, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46657, "name": "SwapOrder", "nameLocations": [ "3335:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "3335:9:54" }, "referencedDeclaration": 46563, "src": "3335:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "visibility": "internal" } ], "src": "3309:49:54" }, "returnParameters": { "id": 46661, "nodeType": "ParameterList", "parameters": [], "src": "3368:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 47021, "nodeType": "FunctionDefinition", "src": "3521:2345:54", "nodes": [], "body": { "id": 47020, "nodeType": "Block", "src": "3621:2245:54", "nodes": [], "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 46709, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 46702, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46695, "src": "3639:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 46703, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3646:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "3639:13:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "arguments": [ { "id": 46706, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3660:5:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)" }, "typeName": { "id": 46705, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "3660:5:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)" } ], "id": 46704, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "3655:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46707, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3655:11:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint8", "typeString": "type(uint8)" } }, "id": 46708, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3667:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "3655:15:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "3639:31:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 46701, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3631:7:54", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 46710, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3631:40:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46711, "nodeType": "ExpressionStatement", "src": "3631:40:54" }, { "assignments": [ 46713 ], "declarations": [ { "constant": false, "id": 46713, "mutability": "mutable", "name": "startIndex", "nameLocation": "3688:10:54", "nodeType": "VariableDeclaration", "scope": 47020, "src": "3681:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46712, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "3681:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "id": 46720, "initialValue": { "arguments": [ { "expression": { "expression": { "id": 46716, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "3708:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46717, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3713:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "3708:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 46718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3720:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "3708:18:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 46715, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3701:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" }, "typeName": { "id": 46714, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "3701:6:54", "typeDescriptions": {} } }, "id": 46719, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3701:26:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "VariableDeclarationStatement", "src": "3681:46:54" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "id": 46728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46722, "name": "startIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46713, "src": "3745:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "arguments": [ { "id": 46725, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3763:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" }, "typeName": { "id": 46724, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "3763:6:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" } ], "id": 46723, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "3758:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46726, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3758:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint64", "typeString": "type(uint64)" } }, "id": 46727, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3771:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "3758:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "3745:29:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 46721, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3737:7:54", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 46729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3737:38:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46730, "nodeType": "ExpressionStatement", "src": "3737:38:54" }, { "assignments": [ 46732 ], "declarations": [ { "constant": false, "id": 46732, "mutability": "mutable", "name": "ocoGroup", "nameLocation": "3792:8:54", "nodeType": "VariableDeclaration", "scope": 47020, "src": "3785:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 46731, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "3785:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "id": 46733, "nodeType": "VariableDeclarationStatement", "src": "3785:15:54" }, { "condition": { "commonType": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "id": 46737, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46734, "name": "ocoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46698, "src": "3814:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 46735, "name": "OcoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46645, "src": "3825:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_OcoMode_$46645_$", "typeString": "type(enum OrderLib.OcoMode)" } }, "id": 46736, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3833:6:54", "memberName": "NO_OCO", "nodeType": "MemberAccess", "referencedDeclaration": 46642, "src": "3825:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "src": "3814:25:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 46750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "id": 46745, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46742, "name": "ocoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46698, "src": "3897:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 46743, "name": "OcoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46645, "src": "3908:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_OcoMode_$46645_$", "typeString": "type(enum OrderLib.OcoMode)" } }, "id": 46744, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3916:22:54", "memberName": "CANCEL_ON_PARTIAL_FILL", "nodeType": "MemberAccess", "referencedDeclaration": 46643, "src": "3908:30:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "src": "3897:41:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "commonType": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "id": 46749, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46746, "name": "ocoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46698, "src": "3942:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 46747, "name": "OcoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46645, "src": "3953:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_OcoMode_$46645_$", "typeString": "type(enum OrderLib.OcoMode)" } }, "id": 46748, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3961:20:54", "memberName": "CANCEL_ON_COMPLETION", "nodeType": "MemberAccess", "referencedDeclaration": 46644, "src": "3953:28:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "src": "3942:39:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "3897:84:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "expression": { "arguments": [ { "hexValue": "4f434f4d", "id": 46778, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4167:6:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_2eb81c856a45b2d8dfdf9563a01f2db302d1dc3f241f3c03ee9214c7d6c11a30", "typeString": "literal_string \"OCOM\"" }, "value": "OCOM" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_2eb81c856a45b2d8dfdf9563a01f2db302d1dc3f241f3c03ee9214c7d6c11a30", "typeString": "literal_string \"OCOM\"" } ], "id": 46777, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "4160:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 46779, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4160:14:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46780, "nodeType": "ExpressionStatement", "src": "4160:14:54" }, "id": 46781, "nodeType": "IfStatement", "src": "3892:282:54", "trueBody": { "id": 46776, "nodeType": "Block", "src": "3983:151:54", "statements": [ { "expression": { "id": 46758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 46751, "name": "ocoGroup", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46732, "src": "3997:8:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "expression": { "expression": { "id": 46754, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "4015:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46755, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4020:9:54", "memberName": "ocoGroups", "nodeType": "MemberAccess", "referencedDeclaration": 46508, "src": "4015:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage", "typeString": "struct OrderLib.OcoGroup storage ref[] storage ref" } }, "id": 46756, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4030:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "4015:21:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 46753, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4008:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint64_$", "typeString": "type(uint64)" }, "typeName": { "id": 46752, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "4008:6:54", "typeDescriptions": {} } }, "id": 46757, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4008:29:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "3997:40:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 46759, "nodeType": "ExpressionStatement", "src": "3997:40:54" }, { "expression": { "arguments": [ { "arguments": [ { "id": 46766, "name": "ocoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46698, "src": "4080:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, { "id": 46767, "name": "startIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46713, "src": "4089:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, { "arguments": [ { "expression": { "id": 46770, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46695, "src": "4107:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 46771, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4114:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "4107:13:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 46769, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4101:5:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)" }, "typeName": { "id": 46768, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "4101:5:54", "typeDescriptions": {} } }, "id": 46772, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4101:20:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, { "typeIdentifier": "t_uint64", "typeString": "uint64" }, { "typeIdentifier": "t_uint8", "typeString": "uint8" } ], "id": 46765, "name": "OcoGroup", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46653, "src": "4071:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_OcoGroup_$46653_storage_ptr_$", "typeString": "type(struct OrderLib.OcoGroup storage pointer)" } }, "id": 46773, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4071:51:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_memory_ptr", "typeString": "struct OrderLib.OcoGroup memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OcoGroup_$46653_memory_ptr", "typeString": "struct OrderLib.OcoGroup memory" } ], "expression": { "expression": { "id": 46760, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "4051:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46763, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4056:9:54", "memberName": "ocoGroups", "nodeType": "MemberAccess", "referencedDeclaration": 46508, "src": "4051:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage", "typeString": "struct OrderLib.OcoGroup storage ref[] storage ref" } }, "id": 46764, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4066:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "4051:19:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage_ptr_$_t_struct$_OcoGroup_$46653_storage_$returns$__$attached_to$_t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage_ptr_$", "typeString": "function (struct OrderLib.OcoGroup storage ref[] storage pointer,struct OrderLib.OcoGroup storage ref)" } }, "id": 46774, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4051:72:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46775, "nodeType": "ExpressionStatement", "src": "4051:72:54" } ] } }, "id": 46782, "nodeType": "IfStatement", "src": "3810:364:54", "trueBody": { "expression": { "id": 46740, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 46738, "name": "ocoGroup", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46732, "src": "3854:8:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 46739, "name": "NO_OCO_INDEX", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46498, "src": "3865:12:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "3854:23:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 46741, "nodeType": "ExpressionStatement", "src": "3854:23:54" } }, { "body": { "id": 47009, "nodeType": "Block", "src": "4227:1567:54", "statements": [ { "assignments": [ 46796 ], "declarations": [ { "constant": false, "id": 46796, "mutability": "mutable", "name": "order", "nameLocation": "4258:5:54", "nodeType": "VariableDeclaration", "scope": 47009, "src": "4241:22:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder" }, "typeName": { "id": 46795, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46794, "name": "SwapOrder", "nameLocations": [ "4241:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "4241:9:54" }, "referencedDeclaration": 46563, "src": "4241:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "visibility": "internal" } ], "id": 46800, "initialValue": { "baseExpression": { "id": 46797, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46695, "src": "4266:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 46799, "indexExpression": { "id": 46798, "name": "o", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46784, "src": "4273:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "4266:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "nodeType": "VariableDeclarationStatement", "src": "4241:34:54" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" }, "id": 46807, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 46802, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4297:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46803, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4303:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "4297:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_memory_ptr", "typeString": "struct OrderLib.Route memory" } }, "id": 46804, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4309:8:54", "memberName": "exchange", "nodeType": "MemberAccess", "referencedDeclaration": 46540, "src": "4297:20:54", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 46805, "name": "Exchange", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46537, "src": "4321:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_Exchange_$46537_$", "typeString": "type(enum OrderLib.Exchange)" } }, "id": 46806, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "4330:9:54", "memberName": "UniswapV3", "nodeType": "MemberAccess", "referencedDeclaration": 46536, "src": "4321:18:54", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" } }, "src": "4297:42:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5552", "id": 46808, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4341:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fc995e85d3e6aa06929b40b15dc4705a5382027f8659f6dfc9bd5e450e440295", "typeString": "literal_string \"UR\"" }, "value": "UR" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fc995e85d3e6aa06929b40b15dc4705a5382027f8659f6dfc9bd5e450e440295", "typeString": "literal_string \"UR\"" } ], "id": 46801, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4289:7:54", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 46809, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4289:57:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46810, "nodeType": "ExpressionStatement", "src": "4289:57:54" }, { "assignments": [ 46812 ], "declarations": [ { "constant": false, "id": 46812, "mutability": "mutable", "name": "orderIndex", "nameLocation": "4565:10:54", "nodeType": "VariableDeclaration", "scope": 47009, "src": "4560:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46811, "name": "uint", "nodeType": "ElementaryTypeName", "src": "4560:4:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 46816, "initialValue": { "expression": { "expression": { "id": 46813, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "4578:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46814, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4583:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "4578:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 46815, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4590:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "4578:18:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4560:36:54" }, { "expression": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "expression": { "id": 46817, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "4610:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46820, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4615:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "4610:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 46821, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4622:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "4610:16:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage_ptr_$returns$_t_struct$_SwapOrderStatus_$46584_storage_$attached_to$_t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage_ptr_$", "typeString": "function (struct OrderLib.SwapOrderStatus storage ref[] storage pointer) returns (struct OrderLib.SwapOrderStatus storage ref)" } }, "id": 46822, "isConstant": false, "isLValue": true, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4610:18:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref" } }, "id": 46823, "nodeType": "ExpressionStatement", "src": "4610:18:54" }, { "assignments": [ 46826 ], "declarations": [ { "constant": false, "id": 46826, "mutability": "mutable", "name": "status", "nameLocation": "4666:6:54", "nodeType": "VariableDeclaration", "scope": 47009, "src": "4642:30:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" }, "typeName": { "id": 46825, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46824, "name": "SwapOrderStatus", "nameLocations": [ "4642:15:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46584, "src": "4642:15:54" }, "referencedDeclaration": 46584, "src": "4642:15:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" } }, "visibility": "internal" } ], "id": 46831, "initialValue": { "baseExpression": { "expression": { "id": 46827, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46691, "src": "4675:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 46828, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4680:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "4675:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 46830, "indexExpression": { "id": 46829, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46812, "src": "4687:10:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "4675:23:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "4642:56:54" }, { "expression": { "id": 46839, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46832, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4712:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46835, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4719:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4712:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46836, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4725:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "4712:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46837, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4734:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46838, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4740:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "4734:12:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4712:34:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 46840, "nodeType": "ExpressionStatement", "src": "4712:34:54" }, { "expression": { "id": 46848, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46841, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4760:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46844, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4767:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4760:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46845, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4773:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "4760:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46846, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4789:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46847, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4795:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "4789:19:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "4760:48:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 46849, "nodeType": "ExpressionStatement", "src": "4760:48:54" }, { "expression": { "id": 46857, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46850, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4822:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46853, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4829:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4822:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46854, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4835:7:54", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 46545, "src": "4822:20:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46855, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4845:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46856, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4851:7:54", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 46545, "src": "4845:13:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "4822:36:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 46858, "nodeType": "ExpressionStatement", "src": "4822:36:54" }, { "expression": { "id": 46866, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46859, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4872:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46862, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4879:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4872:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46863, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4885:8:54", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 46547, "src": "4872:21:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46864, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4896:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46865, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4902:8:54", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 46547, "src": "4896:14:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "4872:38:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 46867, "nodeType": "ExpressionStatement", "src": "4872:38:54" }, { "expression": { "id": 46875, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46868, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4924:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46871, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4931:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4924:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46872, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4937:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "4924:18:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46873, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4945:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46874, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4951:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "4945:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_memory_ptr", "typeString": "struct OrderLib.Route memory" } }, "src": "4924:32:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "id": 46876, "nodeType": "ExpressionStatement", "src": "4924:32:54" }, { "expression": { "id": 46884, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46877, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "4970:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46880, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4977:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "4970:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46881, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "4983:10:54", "memberName": "chainOrder", "nodeType": "MemberAccess", "referencedDeclaration": 46558, "src": "4970:23:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46882, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "4996:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46883, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5002:10:54", "memberName": "chainOrder", "nodeType": "MemberAccess", "referencedDeclaration": 46558, "src": "4996:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "4970:42:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 46885, "nodeType": "ExpressionStatement", "src": "4970:42:54" }, { "expression": { "id": 46893, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "expression": { "id": 46886, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5026:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46889, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5033:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "5026:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46890, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "5039:21:54", "memberName": "outputDirectlyToOwner", "nodeType": "MemberAccess", "referencedDeclaration": 46556, "src": "5026:34:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46891, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "5063:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46892, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5069:21:54", "memberName": "outputDirectlyToOwner", "nodeType": "MemberAccess", "referencedDeclaration": 46556, "src": "5063:27:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "5026:64:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 46894, "nodeType": "ExpressionStatement", "src": "5026:64:54" }, { "body": { "id": 46984, "nodeType": "Block", "src": "5150:494:54", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "expression": { "expression": { "id": 46907, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5168:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46911, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5175:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "5168:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46912, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5181:8:54", "memberName": "tranches", "nodeType": "MemberAccess", "referencedDeclaration": 46562, "src": "5168:21:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage", "typeString": "struct OrderLib.Tranche storage ref[] storage ref" } }, "id": 46913, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5190:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "5168:26:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage_ptr_$returns$_t_struct$_Tranche_$46638_storage_$attached_to$_t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage_ptr_$", "typeString": "function (struct OrderLib.Tranche storage ref[] storage pointer) returns (struct OrderLib.Tranche storage ref)" } }, "id": 46914, "isConstant": false, "isLValue": true, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5168:28:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage", "typeString": "struct OrderLib.Tranche storage ref" } }, "id": 46915, "nodeType": "ExpressionStatement", "src": "5168:28:54" }, { "assignments": [ 46920 ], "declarations": [ { "constant": false, "id": 46920, "mutability": "mutable", "name": "ot", "nameLocation": "5238:2:54", "nodeType": "VariableDeclaration", "scope": 46984, "src": "5214:26:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_memory_ptr", "typeString": "struct OrderLib.Tranche" }, "typeName": { "id": 46919, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46918, "name": "OrderLib.Tranche", "nameLocations": [ "5214:8:54", "5223:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46638, "src": "5214:16:54" }, "referencedDeclaration": 46638, "src": "5214:16:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" } }, "visibility": "internal" } ], "id": 46925, "initialValue": { "baseExpression": { "expression": { "id": 46921, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "5243:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46922, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5249:8:54", "memberName": "tranches", "nodeType": "MemberAccess", "referencedDeclaration": 46562, "src": "5243:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.Tranche memory[] memory" } }, "id": 46924, "indexExpression": { "id": 46923, "name": "t", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46896, "src": "5258:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "5243:17:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_memory_ptr", "typeString": "struct OrderLib.Tranche memory" } }, "nodeType": "VariableDeclarationStatement", "src": "5214:46:54" }, { "assignments": [ 46930 ], "declarations": [ { "constant": false, "id": 46930, "mutability": "mutable", "name": "st", "nameLocation": "5320:2:54", "nodeType": "VariableDeclaration", "scope": 46984, "src": "5295:27:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" }, "typeName": { "id": 46929, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46928, "name": "OrderLib.Tranche", "nameLocations": [ "5295:8:54", "5304:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46638, "src": "5295:16:54" }, "referencedDeclaration": 46638, "src": "5295:16:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" } }, "visibility": "internal" } ], "id": 46936, "initialValue": { "baseExpression": { "expression": { "expression": { "id": 46931, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5325:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46932, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5332:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "5325:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 46933, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5338:8:54", "memberName": "tranches", "nodeType": "MemberAccess", "referencedDeclaration": 46562, "src": "5325:21:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage", "typeString": "struct OrderLib.Tranche storage ref[] storage ref" } }, "id": 46935, "indexExpression": { "id": 46934, "name": "t", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46896, "src": "5347:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "5325:24:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage", "typeString": "struct OrderLib.Tranche storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "5295:54:54" }, { "expression": { "id": 46942, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 46937, "name": "st", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46930, "src": "5385:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 46939, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "5388:8:54", "memberName": "fraction", "nodeType": "MemberAccess", "referencedDeclaration": 46633, "src": "5385:11:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46940, "name": "ot", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46920, "src": "5399:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_memory_ptr", "typeString": "struct OrderLib.Tranche memory" } }, "id": 46941, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5402:8:54", "memberName": "fraction", "nodeType": "MemberAccess", "referencedDeclaration": 46633, "src": "5399:11:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "src": "5385:25:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "id": 46943, "nodeType": "ExpressionStatement", "src": "5385:25:54" }, { "body": { "expression": { "arguments": [ { "baseExpression": { "expression": { "id": 46961, "name": "ot", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46920, "src": "5514:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_memory_ptr", "typeString": "struct OrderLib.Tranche memory" } }, "id": 46962, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5517:11:54", "memberName": "constraints", "nodeType": "MemberAccess", "referencedDeclaration": 46637, "src": "5514:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.Constraint memory[] memory" } }, "id": 46964, "indexExpression": { "id": 46963, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46945, "src": "5529:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "5514:17:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_memory_ptr", "typeString": "struct OrderLib.Constraint memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_Constraint_$46594_memory_ptr", "typeString": "struct OrderLib.Constraint memory" } ], "expression": { "expression": { "id": 46956, "name": "st", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46930, "src": "5494:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 46959, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5497:11:54", "memberName": "constraints", "nodeType": "MemberAccess", "referencedDeclaration": 46637, "src": "5494:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage", "typeString": "struct OrderLib.Constraint storage ref[] storage ref" } }, "id": 46960, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5509:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "5494:19:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage_ptr_$_t_struct$_Constraint_$46594_storage_$returns$__$attached_to$_t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage_ptr_$", "typeString": "function (struct OrderLib.Constraint storage ref[] storage pointer,struct OrderLib.Constraint storage ref)" } }, "id": 46965, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5494:38:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46966, "nodeType": "ExpressionStatement", "src": "5494:38:54" }, "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 46952, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46948, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46945, "src": "5443:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "expression": { "id": 46949, "name": "ot", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46920, "src": "5445:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_memory_ptr", "typeString": "struct OrderLib.Tranche memory" } }, "id": 46950, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5448:11:54", "memberName": "constraints", "nodeType": "MemberAccess", "referencedDeclaration": 46637, "src": "5445:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.Constraint memory[] memory" } }, "id": 46951, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5460:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "5445:21:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5443:23:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 46967, "initializationExpression": { "assignments": [ 46945 ], "declarations": [ { "constant": false, "id": 46945, "mutability": "mutable", "name": "c", "nameLocation": "5438:1:54", "nodeType": "VariableDeclaration", "scope": 46967, "src": "5433:6:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46944, "name": "uint", "nodeType": "ElementaryTypeName", "src": "5433:4:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 46947, "initialValue": { "hexValue": "30", "id": 46946, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5440:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "5433:8:54" }, "isSimpleCounterLoop": true, "loopExpression": { "expression": { "id": 46954, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "5468:3:54", "subExpression": { "id": 46953, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46945, "src": "5468:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 46955, "nodeType": "ExpressionStatement", "src": "5468:3:54" }, "nodeType": "ForStatement", "src": "5428:104:54" }, { "expression": { "arguments": [ { "hexValue": "30", "id": 46973, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5578:1:54", "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": { "expression": { "id": 46968, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5550:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46971, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5557:15:54", "memberName": "trancheFilledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46580, "src": "5550:22:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 46972, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5573:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "5550:27:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint256_$dyn_storage_ptr_$_t_uint256_$returns$__$attached_to$_t_array$_t_uint256_$dyn_storage_ptr_$", "typeString": "function (uint256[] storage pointer,uint256)" } }, "id": 46974, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5550:30:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46975, "nodeType": "ExpressionStatement", "src": "5550:30:54" }, { "expression": { "arguments": [ { "hexValue": "30", "id": 46981, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5627:1:54", "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": { "expression": { "id": 46976, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5598:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46979, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5605:16:54", "memberName": "trancheFilledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46583, "src": "5598:23:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 46980, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5622:4:54", "memberName": "push", "nodeType": "MemberAccess", "src": "5598:28:54", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint256_$dyn_storage_ptr_$_t_uint256_$returns$__$attached_to$_t_array$_t_uint256_$dyn_storage_ptr_$", "typeString": "function (uint256[] storage pointer,uint256)" } }, "id": 46982, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5598:31:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46983, "nodeType": "ExpressionStatement", "src": "5598:31:54" } ] }, "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 46903, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46899, "name": "t", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46896, "src": "5119:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "expression": { "id": 46900, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46796, "src": "5121:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory" } }, "id": 46901, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5127:8:54", "memberName": "tranches", "nodeType": "MemberAccess", "referencedDeclaration": 46562, "src": "5121:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.Tranche memory[] memory" } }, "id": 46902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5136:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "5121:21:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5119:23:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 46985, "initializationExpression": { "assignments": [ 46896 ], "declarations": [ { "constant": false, "id": 46896, "mutability": "mutable", "name": "t", "nameLocation": "5114:1:54", "nodeType": "VariableDeclaration", "scope": 46985, "src": "5109:6:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46895, "name": "uint", "nodeType": "ElementaryTypeName", "src": "5109:4:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 46898, "initialValue": { "hexValue": "30", "id": 46897, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5116:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "5109:8:54" }, "isSimpleCounterLoop": true, "loopExpression": { "expression": { "id": 46905, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "5144:3:54", "subExpression": { "id": 46904, "name": "t", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46896, "src": "5144:1:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 46906, "nodeType": "ExpressionStatement", "src": "5144:3:54" }, "nodeType": "ForStatement", "src": "5104:540:54" }, { "expression": { "id": 46991, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 46986, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5657:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46988, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "5664:5:54", "memberName": "state", "nodeType": "MemberAccess", "referencedDeclaration": 46569, "src": "5657:12:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 46989, "name": "SwapOrderState", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46534, "src": "5672:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46534_$", "typeString": "type(enum OrderLib.SwapOrderState)" } }, "id": 46990, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5687:4:54", "memberName": "Open", "nodeType": "MemberAccess", "referencedDeclaration": 46530, "src": "5672:19:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "src": "5657:34:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "id": 46992, "nodeType": "ExpressionStatement", "src": "5657:34:54" }, { "expression": { "id": 47001, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 46993, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5705:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 46995, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "5712:5:54", "memberName": "start", "nodeType": "MemberAccess", "referencedDeclaration": 46571, "src": "5705:12:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "expression": { "id": 46998, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "5727:5:54", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 46999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5733:9:54", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "5727:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 46997, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5720:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint32_$", "typeString": "type(uint32)" }, "typeName": { "id": 46996, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "5720:6:54", "typeDescriptions": {} } }, "id": 47000, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5720:23:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "src": "5705:38:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 47002, "nodeType": "ExpressionStatement", "src": "5705:38:54" }, { "expression": { "id": 47007, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 47003, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46826, "src": "5757:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47005, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "5764:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "5757:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 47006, "name": "ocoGroup", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46732, "src": "5775:8:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "5757:26:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 47008, "nodeType": "ExpressionStatement", "src": "5757:26:54" } ] }, "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 46790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46787, "name": "o", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46784, "src": "4202:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "id": 46788, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46695, "src": "4206:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 46789, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4213:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "4206:13:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4202:17:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47010, "initializationExpression": { "assignments": [ 46784 ], "declarations": [ { "constant": false, "id": 46784, "mutability": "mutable", "name": "o", "nameLocation": "4195:1:54", "nodeType": "VariableDeclaration", "scope": 47010, "src": "4189:7:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 46783, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "4189:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" } ], "id": 46786, "initialValue": { "hexValue": "30", "id": 46785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4199:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "4189:11:54" }, "isSimpleCounterLoop": false, "loopExpression": { "expression": { "id": 46792, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "4221:3:54", "subExpression": { "id": 46791, "name": "o", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46784, "src": "4221:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 46793, "nodeType": "ExpressionStatement", "src": "4221:3:54" }, "nodeType": "ForStatement", "src": "4184:1610:54" }, { "eventCall": { "arguments": [ { "id": 47012, "name": "startIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46713, "src": "5827:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, { "arguments": [ { "expression": { "id": 47015, "name": "orders", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46695, "src": "5844:6:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder memory[] memory" } }, "id": 47016, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5851:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "5844:13:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 47014, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5838:5:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)" }, "typeName": { "id": 47013, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "5838:5:54", "typeDescriptions": {} } }, "id": 47017, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5838:20:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint64", "typeString": "uint64" }, { "typeIdentifier": "t_uint8", "typeString": "uint8" } ], "id": 47011, "name": "DexorderSwapPlaced", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46515, "src": "5808:18:54", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint8_$returns$__$", "typeString": "function (uint64,uint8)" } }, "id": 47018, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5808:51:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47019, "nodeType": "EmitStatement", "src": "5803:56:54" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_placeOrders", "nameLocation": "3530:12:54", "parameters": { "id": 46699, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46691, "mutability": "mutable", "name": "self", "nameLocation": "3562:4:54", "nodeType": "VariableDeclaration", "scope": 47021, "src": "3543:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 46690, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46689, "name": "OrdersInfo", "nameLocations": [ "3543:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "3543:10:54" }, "referencedDeclaration": 46509, "src": "3543:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 46695, "mutability": "mutable", "name": "orders", "nameLocation": "3587:6:54", "nodeType": "VariableDeclaration", "scope": 47021, "src": "3568:25:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_memory_ptr_$dyn_memory_ptr", "typeString": "struct OrderLib.SwapOrder[]" }, "typeName": { "baseType": { "id": 46693, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46692, "name": "SwapOrder", "nameLocations": [ "3568:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "3568:9:54" }, "referencedDeclaration": 46563, "src": "3568:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "id": 46694, "nodeType": "ArrayTypeName", "src": "3568:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrder_$46563_storage_$dyn_storage_ptr", "typeString": "struct OrderLib.SwapOrder[]" } }, "visibility": "internal" }, { "constant": false, "id": 46698, "mutability": "mutable", "name": "ocoMode", "nameLocation": "3603:7:54", "nodeType": "VariableDeclaration", "scope": 47021, "src": "3595:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "typeName": { "id": 46697, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 46696, "name": "OcoMode", "nameLocations": [ "3595:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46645, "src": "3595:7:54" }, "referencedDeclaration": 46645, "src": "3595:7:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "visibility": "internal" } ], "src": "3542:69:54" }, "returnParameters": { "id": 46700, "nodeType": "ParameterList", "parameters": [], "src": "3621:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 47688, "nodeType": "FunctionDefinition", "src": "6139:5574:54", "nodes": [], "body": { "id": 47687, "nodeType": "Block", "src": "6264:5449:54", "nodes": [], "statements": [ { "expression": { "arguments": [ { "hexValue": "65786563757465", "id": 47039, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6287:9:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c640060cdb34fcc260f41eac7474ee1d7c80b7e3607daff9ac67c7ea2ebb1c44", "typeString": "literal_string \"execute\"" }, "value": "execute" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_c640060cdb34fcc260f41eac7474ee1d7c80b7e3607daff9ac67c7ea2ebb1c44", "typeString": "literal_string \"execute\"" } ], "expression": { "id": 47036, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "6274:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47038, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6283:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "6274:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47040, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6274:23:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47041, "nodeType": "ExpressionStatement", "src": "6274:23:54" }, { "expression": { "arguments": [ { "arguments": [ { "id": 47047, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "6328:4:54", "typeDescriptions": { "typeIdentifier": "t_contract$_OrderLib_$47922", "typeString": "library OrderLib" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_OrderLib_$47922", "typeString": "library OrderLib" } ], "id": 47046, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6320:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 47045, "name": "address", "nodeType": "ElementaryTypeName", "src": "6320:7:54", "typeDescriptions": {} } }, "id": 47048, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6320:13:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 47042, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "6307:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47044, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6316:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "6307:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 47049, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6307:27:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47050, "nodeType": "ExpressionStatement", "src": "6307:27:54" }, { "expression": { "arguments": [ { "arguments": [ { "id": 47056, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47028, "src": "6362:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint64", "typeString": "uint64" } ], "id": 47055, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6357:4:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 47054, "name": "uint", "nodeType": "ElementaryTypeName", "src": "6357:4:54", "typeDescriptions": {} } }, "id": 47057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6357:16:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47051, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "6344:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47053, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6353:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "6344:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47058, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6344:30:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47059, "nodeType": "ExpressionStatement", "src": "6344:30:54" }, { "expression": { "arguments": [ { "arguments": [ { "id": 47065, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "6402:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint8", "typeString": "uint8" } ], "id": 47064, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6397:4:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 47063, "name": "uint", "nodeType": "ElementaryTypeName", "src": "6397:4:54", "typeDescriptions": {} } }, "id": 47066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6397:18:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47060, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "6384:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6393:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "6384:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47067, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6384:32:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47068, "nodeType": "ExpressionStatement", "src": "6384:32:54" }, { "assignments": [ 47071 ], "declarations": [ { "constant": false, "id": 47071, "mutability": "mutable", "name": "status", "nameLocation": "6450:6:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "6426:30:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" }, "typeName": { "id": 47070, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47069, "name": "SwapOrderStatus", "nameLocations": [ "6426:15:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46584, "src": "6426:15:54" }, "referencedDeclaration": 46584, "src": "6426:15:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" } }, "visibility": "internal" } ], "id": 47076, "initialValue": { "baseExpression": { "expression": { "id": 47072, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47024, "src": "6459:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 47073, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6464:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "6459:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 47075, "indexExpression": { "id": 47074, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47028, "src": "6471:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "6459:23:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "6426:56:54" }, { "condition": { "commonType": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" }, "id": 47081, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47077, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "6496:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47078, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6503:5:54", "memberName": "state", "nodeType": "MemberAccess", "referencedDeclaration": 46569, "src": "6496:12:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "expression": { "id": 47079, "name": "SwapOrderState", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46534, "src": "6512:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46534_$", "typeString": "type(enum OrderLib.SwapOrderState)" } }, "id": 47080, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "6527:4:54", "memberName": "Open", "nodeType": "MemberAccess", "referencedDeclaration": 46530, "src": "6512:19:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "src": "6496:35:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47086, "nodeType": "IfStatement", "src": "6492:65:54", "trueBody": { "expression": { "arguments": [ { "hexValue": "4e4f", "id": 47083, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6552:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", "typeString": "literal_string \"NO\"" }, "value": "NO" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", "typeString": "literal_string \"NO\"" } ], "id": 47082, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "6545:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47084, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6545:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47085, "nodeType": "ExpressionStatement", "src": "6545:12:54" } }, { "assignments": [ 47089 ], "declarations": [ { "constant": false, "id": 47089, "mutability": "mutable", "name": "tranche", "nameLocation": "6595:7:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "6579:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" }, "typeName": { "id": 47088, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47087, "name": "Tranche", "nameLocations": [ "6579:7:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46638, "src": "6579:7:54" }, "referencedDeclaration": 46638, "src": "6579:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche" } }, "visibility": "internal" } ], "id": 47095, "initialValue": { "baseExpression": { "expression": { "expression": { "id": 47090, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "6605:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47091, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6612:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "6605:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47092, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6618:8:54", "memberName": "tranches", "nodeType": "MemberAccess", "referencedDeclaration": 46562, "src": "6605:21:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Tranche_$46638_storage_$dyn_storage", "typeString": "struct OrderLib.Tranche storage ref[] storage ref" } }, "id": 47094, "indexExpression": { "id": 47093, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "6627:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "6605:35:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage", "typeString": "struct OrderLib.Tranche storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "6579:61:54" }, { "assignments": [ 47097 ], "declarations": [ { "constant": false, "id": 47097, "mutability": "mutable", "name": "sqrtPriceX96", "nameLocation": "6658:12:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "6650:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 47096, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "6650:7:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" } ], "id": 47099, "initialValue": { "hexValue": "30", "id": 47098, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6673:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "6650:24:54" }, { "assignments": [ 47101 ], "declarations": [ { "constant": false, "id": 47101, "mutability": "mutable", "name": "sqrtPriceLimitX96", "nameLocation": "6692:17:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "6684:25:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 47100, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "6684:7:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" } ], "id": 47103, "initialValue": { "hexValue": "30", "id": 47102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6712:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "6684:29:54" }, { "assignments": [ 47105 ], "declarations": [ { "constant": false, "id": 47105, "mutability": "mutable", "name": "pool", "nameLocation": "6812:4:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "6804:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 47104, "name": "address", "nodeType": "ElementaryTypeName", "src": "6804:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 47120, "initialValue": { "arguments": [ { "expression": { "expression": { "id": 47109, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "6854:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47110, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6861:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "6854:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47111, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6867:7:54", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 46545, "src": "6854:20:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "expression": { "id": 47112, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "6876:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47113, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6883:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "6876:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47114, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6889:8:54", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 46547, "src": "6876:21:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "expression": { "expression": { "id": 47115, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "6899:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47116, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6906:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "6899:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47117, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6912:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "6899:18:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "id": 47118, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6918:3:54", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 46542, "src": "6899:22:54", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" } ], "expression": { "expression": { "id": 47106, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46264, "src": "6819:9:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46264_$", "typeString": "type(library Constants)" } }, "id": 47107, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "6829:16:54", "memberName": "uniswapV3Factory", "nodeType": "MemberAccess", "referencedDeclaration": 46248, "src": "6819:26:54", "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV3Factory_$43872", "typeString": "contract IUniswapV3Factory" } }, "id": 47108, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6846:7:54", "memberName": "getPool", "nodeType": "MemberAccess", "referencedDeclaration": 43845, "src": "6819:34:54", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$_t_uint24_$returns$_t_address_$", "typeString": "function (address,address,uint24) view external returns (address)" } }, "id": 47119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6819:103:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "6804:118:54" }, { "body": { "id": 47404, "nodeType": "Block", "src": "6987:2592:54", "statements": [ { "assignments": [ 47135 ], "declarations": [ { "constant": false, "id": 47135, "mutability": "mutable", "name": "constraint", "nameLocation": "7020:10:54", "nodeType": "VariableDeclaration", "scope": 47404, "src": "7001:29:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint" }, "typeName": { "id": 47134, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47133, "name": "Constraint", "nameLocations": [ "7001:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46594, "src": "7001:10:54" }, "referencedDeclaration": 46594, "src": "7001:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint" } }, "visibility": "internal" } ], "id": 47140, "initialValue": { "baseExpression": { "expression": { "id": 47136, "name": "tranche", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47089, "src": "7033:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 47137, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7041:11:54", "memberName": "constraints", "nodeType": "MemberAccess", "referencedDeclaration": 46637, "src": "7033:19:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage", "typeString": "struct OrderLib.Constraint storage ref[] storage ref" } }, "id": 47139, "indexExpression": { "id": 47138, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47122, "src": "7053:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "7033:22:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage", "typeString": "struct OrderLib.Constraint storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "7001:54:54" }, { "condition": { "commonType": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" }, "id": 47145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47141, "name": "constraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47135, "src": "7073:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint storage pointer" } }, "id": 47142, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7084:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46591, "src": "7073:15:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47143, "name": "ConstraintMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46588, "src": "7092:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46588_$", "typeString": "type(enum OrderLib.ConstraintMode)" } }, "id": 47144, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7107:4:54", "memberName": "Time", "nodeType": "MemberAccess", "referencedDeclaration": 46585, "src": "7092:19:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "src": "7073:38:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "commonType": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" }, "id": 47224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47220, "name": "constraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47135, "src": "7711:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint storage pointer" } }, "id": 47221, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7722:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46591, "src": "7711:15:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47222, "name": "ConstraintMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46588, "src": "7730:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46588_$", "typeString": "type(enum OrderLib.ConstraintMode)" } }, "id": 47223, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7745:4:54", "memberName": "Line", "nodeType": "MemberAccess", "referencedDeclaration": 46586, "src": "7730:19:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "src": "7711:38:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "commonType": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" }, "id": 47385, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47381, "name": "constraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47135, "src": "9322:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint storage pointer" } }, "id": 47382, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9333:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46591, "src": "9322:15:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47383, "name": "ConstraintMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46588, "src": "9341:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46588_$", "typeString": "type(enum OrderLib.ConstraintMode)" } }, "id": 47384, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "9356:7:54", "memberName": "Barrier", "nodeType": "MemberAccess", "referencedDeclaration": 46587, "src": "9341:22:54", "typeDescriptions": { "typeIdentifier": "t_enum$_ConstraintMode_$46588", "typeString": "enum OrderLib.ConstraintMode" } }, "src": "9322:41:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "expression": { "arguments": [ { "hexValue": "5543", "id": 47398, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9544:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_024b0b255bf8d6869d7d1e61f2cc997345035476bfbd200addff7e9f7171b527", "typeString": "literal_string \"UC\"" }, "value": "UC" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_024b0b255bf8d6869d7d1e61f2cc997345035476bfbd200addff7e9f7171b527", "typeString": "literal_string \"UC\"" } ], "id": 47397, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "9537:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47399, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9537:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47400, "nodeType": "ExpressionStatement", "src": "9537:12:54" }, "id": 47401, "nodeType": "IfStatement", "src": "9318:231:54", "trueBody": { "id": 47396, "nodeType": "Block", "src": "9365:116:54", "statements": [ { "expression": { "arguments": [ { "hexValue": "6261727269657220636f6e73747261696e74", "id": 47389, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9396:20:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_99c32faa0638856195555bce19fff4b9fb7a419babf5a23a7b7308a4027bf622", "typeString": "literal_string \"barrier constraint\"" }, "value": "barrier constraint" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_99c32faa0638856195555bce19fff4b9fb7a419babf5a23a7b7308a4027bf622", "typeString": "literal_string \"barrier constraint\"" } ], "expression": { "id": 47386, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9383:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9392:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "9383:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47390, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9383:34:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47391, "nodeType": "ExpressionStatement", "src": "9383:34:54" }, { "expression": { "arguments": [ { "hexValue": "4e49", "id": 47393, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9442:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_e817963341ac54b6c6630a42fcd594b50ae6e47bc5952aa5478cb70078a54ca0", "typeString": "literal_string \"NI\"" }, "value": "NI" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_e817963341ac54b6c6630a42fcd594b50ae6e47bc5952aa5478cb70078a54ca0", "typeString": "literal_string \"NI\"" } ], "id": 47392, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "9435:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47394, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9435:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47395, "nodeType": "ExpressionStatement", "src": "9435:12:54" } ] } }, "id": 47402, "nodeType": "IfStatement", "src": "7707:1842:54", "trueBody": { "id": 47380, "nodeType": "Block", "src": "7751:1549:54", "statements": [ { "expression": { "arguments": [ { "hexValue": "6c696e6520636f6e73747261696e74", "id": 47228, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7782:17:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f6954304d3cfd4174f0a7906fa52351514040d43891b8971ae57f551df2d1855", "typeString": "literal_string \"line constraint\"" }, "value": "line constraint" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_f6954304d3cfd4174f0a7906fa52351514040d43891b8971ae57f551df2d1855", "typeString": "literal_string \"line constraint\"" } ], "expression": { "id": 47225, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "7769:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47227, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7778:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "7769:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47229, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7769:31:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47230, "nodeType": "ExpressionStatement", "src": "7769:31:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "id": 47233, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47231, "name": "sqrtPriceX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47097, "src": "7822:12:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 47232, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7838:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "7822:17:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47243, "nodeType": "IfStatement", "src": "7818:95:54", "trueBody": { "expression": { "id": 47241, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "components": [ { "id": 47234, "name": "sqrtPriceX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47097, "src": "7863:12:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, null, null, null, null, null, null ], "id": 47235, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "7862:20:54", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint160_$__$__$__$__$__$__$", "typeString": "tuple(uint160,,,,,,)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "arguments": [ { "id": 47237, "name": "pool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47105, "src": "7900:4:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 47236, "name": "IUniswapV3Pool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43894, "src": "7885:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV3Pool_$43894_$", "typeString": "type(contract IUniswapV3Pool)" } }, "id": 47238, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7885:20:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV3Pool_$43894", "typeString": "contract IUniswapV3Pool" } }, "id": 47239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7906:5:54", "memberName": "slot0", "nodeType": "MemberAccess", "referencedDeclaration": 44241, "src": "7885:26:54", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint160_$_t_int24_$_t_uint16_$_t_uint16_$_t_uint16_$_t_uint8_$_t_bool_$", "typeString": "function () view external returns (uint160,int24,uint16,uint16,uint16,uint8,bool)" } }, "id": 47240, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7885:28:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint160_$_t_int24_$_t_uint16_$_t_uint16_$_t_uint16_$_t_uint8_$_t_bool_$", "typeString": "tuple(uint160,int24,uint16,uint16,uint16,uint8,bool)" } }, "src": "7862:51:54", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47242, "nodeType": "ExpressionStatement", "src": "7862:51:54" } }, { "assignments": [ 47246 ], "declarations": [ { "constant": false, "id": 47246, "mutability": "mutable", "name": "lc", "nameLocation": "7953:2:54", "nodeType": "VariableDeclaration", "scope": 47380, "src": "7931:24:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint" }, "typeName": { "id": 47245, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47244, "name": "LineConstraint", "nameLocations": [ "7931:14:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46605, "src": "7931:14:54" }, "referencedDeclaration": 46605, "src": "7931:14:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_storage_ptr", "typeString": "struct OrderLib.LineConstraint" } }, "visibility": "internal" } ], "id": 47254, "initialValue": { "arguments": [ { "expression": { "id": 47249, "name": "constraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47135, "src": "7969:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint storage pointer" } }, "id": 47250, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7980:10:54", "memberName": "constraint", "nodeType": "MemberAccess", "referencedDeclaration": 46593, "src": "7969:21:54", "typeDescriptions": { "typeIdentifier": "t_bytes_storage", "typeString": "bytes storage ref" } }, { "components": [ { "id": 47251, "name": "LineConstraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46605, "src": "7993:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_LineConstraint_$46605_storage_ptr_$", "typeString": "type(struct OrderLib.LineConstraint storage pointer)" } } ], "id": 47252, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7992:16:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_LineConstraint_$46605_storage_ptr_$", "typeString": "type(struct OrderLib.LineConstraint storage pointer)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_storage", "typeString": "bytes storage ref" }, { "typeIdentifier": "t_type$_t_struct$_LineConstraint_$46605_storage_ptr_$", "typeString": "type(struct OrderLib.LineConstraint storage pointer)" } ], "expression": { "id": 47247, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7958:3:54", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 47248, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7962:6:54", "memberName": "decode", "nodeType": "MemberAccess", "src": "7958:10:54", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 47253, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7958:51:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "nodeType": "VariableDeclarationStatement", "src": "7931:78:54" }, { "assignments": [ 47256 ], "declarations": [ { "constant": false, "id": 47256, "mutability": "mutable", "name": "price", "nameLocation": "8035:5:54", "nodeType": "VariableDeclaration", "scope": 47380, "src": "8027:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47255, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8027:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47258, "initialValue": { "id": 47257, "name": "sqrtPriceX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47097, "src": "8043:12:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "VariableDeclarationStatement", "src": "8027:28:54" }, { "condition": { "expression": { "id": 47259, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8077:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47260, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8080:7:54", "memberName": "isRatio", "nodeType": "MemberAccess", "referencedDeclaration": 46598, "src": "8077:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47265, "nodeType": "IfStatement", "src": "8073:68:54", "trueBody": { "expression": { "arguments": [ { "hexValue": "726174696f206e6f7420696d706c656d656e746564", "id": 47262, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8117:23:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_15c0dc2be392d69de3ca755113086960e9e78d2da6972e0a3d4410e6abaf9773", "typeString": "literal_string \"ratio not implemented\"" }, "value": "ratio not implemented" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_15c0dc2be392d69de3ca755113086960e9e78d2da6972e0a3d4410e6abaf9773", "typeString": "literal_string \"ratio not implemented\"" } ], "id": 47261, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "8110:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47263, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8110:31:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47264, "nodeType": "ExpressionStatement", "src": "8110:31:54" } }, { "assignments": [ 47267 ], "declarations": [ { "constant": false, "id": 47267, "mutability": "mutable", "name": "limit256", "nameLocation": "8307:8:54", "nodeType": "VariableDeclaration", "scope": 47380, "src": "8300:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 47266, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8300:6:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" } ], "id": 47276, "initialValue": { "arguments": [ { "arguments": [ { "expression": { "id": 47272, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8333:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47273, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8336:12:54", "memberName": "valueSqrtX96", "nodeType": "MemberAccess", "referencedDeclaration": 46602, "src": "8333:15:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "id": 47271, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8325:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 47270, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8325:7:54", "typeDescriptions": {} } }, "id": 47274, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8325:24:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 47269, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8318:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { "id": 47268, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8318:6:54", "typeDescriptions": {} } }, "id": 47275, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8318:32:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "VariableDeclarationStatement", "src": "8300:50:54" }, { "condition": { "commonType": { "typeIdentifier": "t_int160", "typeString": "int160" }, "id": 47280, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47277, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8372:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47278, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8375:12:54", "memberName": "slopeSqrtX96", "nodeType": "MemberAccess", "referencedDeclaration": 46604, "src": "8372:15:54", "typeDescriptions": { "typeIdentifier": "t_int160", "typeString": "int160" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "hexValue": "30", "id": 47279, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8391:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "8372:20:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47308, "nodeType": "IfStatement", "src": "8368:269:54", "trueBody": { "id": 47307, "nodeType": "Block", "src": "8395:242:54", "statements": [ { "expression": { "id": 47297, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 47281, "name": "limit256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47267, "src": "8470:8:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 47296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 47292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47284, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "8489:5:54", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 47285, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8495:9:54", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "8489:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "expression": { "id": 47286, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8507:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47287, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8510:4:54", "memberName": "time", "nodeType": "MemberAccess", "referencedDeclaration": 46600, "src": "8507:7:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "src": "8489:25:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 47283, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8482:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { "id": 47282, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8482:6:54", "typeDescriptions": {} } }, "id": 47289, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8482:33:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "expression": { "id": 47290, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8518:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47291, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8521:12:54", "memberName": "slopeSqrtX96", "nodeType": "MemberAccess", "referencedDeclaration": 46604, "src": "8518:15:54", "typeDescriptions": { "typeIdentifier": "t_int160", "typeString": "int160" } }, "src": "8482:51:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "commonType": { "typeIdentifier": "t_rational_79228162514264337593543950336_by_1", "typeString": "int_const 79228162514264337593543950336" }, "id": 47295, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 47293, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8536:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "hexValue": "3936", "id": 47294, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8539:2:54", "typeDescriptions": { "typeIdentifier": "t_rational_96_by_1", "typeString": "int_const 96" }, "value": "96" }, "src": "8536:5:54", "typeDescriptions": { "typeIdentifier": "t_rational_79228162514264337593543950336_by_1", "typeString": "int_const 79228162514264337593543950336" } }, "src": "8482:59:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "src": "8470:71:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "id": 47298, "nodeType": "ExpressionStatement", "src": "8470:71:54" }, { "condition": { "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 47301, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47299, "name": "limit256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47267, "src": "8567:8:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "hexValue": "30", "id": 47300, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8578:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "8567:12:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47306, "nodeType": "IfStatement", "src": "8563:55:54", "trueBody": { "expression": { "id": 47304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 47302, "name": "limit256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47267, "src": "8606:8:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "30", "id": 47303, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8617:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "8606:12:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "id": 47305, "nodeType": "ExpressionStatement", "src": "8606:12:54" } } ] } }, { "expression": { "arguments": [ { "id": 47312, "name": "limit256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47267, "src": "8667:8:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_int256", "typeString": "int256" } ], "expression": { "id": 47309, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "8654:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47311, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8663:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22153, "src": "8654:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$__$", "typeString": "function (int256) pure" } }, "id": 47313, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8654:22:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47314, "nodeType": "ExpressionStatement", "src": "8654:22:54" }, { "expression": { "arguments": [ { "id": 47318, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47256, "src": "8707:5:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47315, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "8694:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8703:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "8694:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8694:19:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47320, "nodeType": "ExpressionStatement", "src": "8694:19:54" }, { "expression": { "arguments": [ { "expression": { "id": 47324, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8744:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47325, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8747:7:54", "memberName": "isAbove", "nodeType": "MemberAccess", "referencedDeclaration": 46596, "src": "8744:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "expression": { "id": 47321, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "8731:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8740:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22181, "src": "8731:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 47326, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8731:24:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47327, "nodeType": "ExpressionStatement", "src": "8731:24:54" }, { "assignments": [ 47329 ], "declarations": [ { "constant": false, "id": 47329, "mutability": "mutable", "name": "limit", "nameLocation": "8781:5:54", "nodeType": "VariableDeclaration", "scope": 47380, "src": "8773:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 47328, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "8773:7:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" } ], "id": 47337, "initialValue": { "arguments": [ { "arguments": [ { "id": 47334, "name": "limit256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47267, "src": "8805:8:54", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_int256", "typeString": "int256" } ], "id": 47333, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8797:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 47332, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8797:7:54", "typeDescriptions": {} } }, "id": 47335, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8797:17:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 47331, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8789:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)" }, "typeName": { "id": 47330, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "8789:7:54", "typeDescriptions": {} } }, "id": 47336, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8789:26:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "VariableDeclarationStatement", "src": "8773:42:54" }, { "condition": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47351, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47343, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47338, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8955:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47339, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8958:7:54", "memberName": "isAbove", "nodeType": "MemberAccess", "referencedDeclaration": 46596, "src": "8955:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47342, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47340, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47256, "src": "8969:5:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "id": 47341, "name": "limit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47329, "src": "8978:5:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "src": "8969:14:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "8955:28:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47350, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47346, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "8987:11:54", "subExpression": { "expression": { "id": 47344, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "8988:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47345, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "8991:7:54", "memberName": "isAbove", "nodeType": "MemberAccess", "referencedDeclaration": 46596, "src": "8988:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47349, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47347, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47256, "src": "9002:5:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "id": 47348, "name": "limit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47329, "src": "9011:5:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "src": "9002:14:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "8987:29:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "8955:61:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47356, "nodeType": "IfStatement", "src": "8951:99:54", "trueBody": { "expression": { "arguments": [ { "hexValue": "4c", "id": 47353, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9046:3:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8", "typeString": "literal_string \"L\"" }, "value": "L" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8", "typeString": "literal_string \"L\"" } ], "id": 47352, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "9039:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47354, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9039:11:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47355, "nodeType": "ExpressionStatement", "src": "9039:11:54" } }, { "condition": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47374, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47366, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "id": 47359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47357, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "9072:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 47358, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9093:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "9072:22:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47365, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47360, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "9118:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47361, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9121:7:54", "memberName": "isAbove", "nodeType": "MemberAccess", "referencedDeclaration": 46596, "src": "9118:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "commonType": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "id": 47364, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47362, "name": "limit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47329, "src": "9132:5:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "id": 47363, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "9140:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "src": "9132:25:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "9118:39:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "9072:85:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47373, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47369, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "9181:11:54", "subExpression": { "expression": { "id": 47367, "name": "lc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47246, "src": "9182:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_LineConstraint_$46605_memory_ptr", "typeString": "struct OrderLib.LineConstraint memory" } }, "id": 47368, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9185:7:54", "memberName": "isAbove", "nodeType": "MemberAccess", "referencedDeclaration": 46596, "src": "9182:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "commonType": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "id": 47372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47370, "name": "limit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47329, "src": "9196:5:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "id": 47371, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "9204:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "src": "9196:25:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "9181:40:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "9072:149:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47379, "nodeType": "IfStatement", "src": "9068:217:54", "trueBody": { "expression": { "id": 47377, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 47375, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "9260:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 47376, "name": "limit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47329, "src": "9280:5:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "src": "9260:25:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "id": 47378, "nodeType": "ExpressionStatement", "src": "9260:25:54" } } ] } }, "id": 47403, "nodeType": "IfStatement", "src": "7069:2480:54", "trueBody": { "id": 47219, "nodeType": "Block", "src": "7113:576:54", "statements": [ { "expression": { "arguments": [ { "hexValue": "74696d6520636f6e73747261696e74", "id": 47149, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7144:17:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_cb624006b18f98731622ac649702586c0fee37cd03cc82c8790f14a4cb32b8b2", "typeString": "literal_string \"time constraint\"" }, "value": "time constraint" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_cb624006b18f98731622ac649702586c0fee37cd03cc82c8790f14a4cb32b8b2", "typeString": "literal_string \"time constraint\"" } ], "expression": { "id": 47146, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "7131:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47148, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7140:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "7131:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47150, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7131:31:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47151, "nodeType": "ExpressionStatement", "src": "7131:31:54" }, { "assignments": [ 47154 ], "declarations": [ { "constant": false, "id": 47154, "mutability": "mutable", "name": "tc", "nameLocation": "7202:2:54", "nodeType": "VariableDeclaration", "scope": 47219, "src": "7180:24:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint" }, "typeName": { "id": 47153, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47152, "name": "TimeConstraint", "nameLocations": [ "7180:14:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46631, "src": "7180:14:54" }, "referencedDeclaration": 46631, "src": "7180:14:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_storage_ptr", "typeString": "struct OrderLib.TimeConstraint" } }, "visibility": "internal" } ], "id": 47162, "initialValue": { "arguments": [ { "expression": { "id": 47157, "name": "constraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47135, "src": "7218:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Constraint_$46594_storage_ptr", "typeString": "struct OrderLib.Constraint storage pointer" } }, "id": 47158, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7229:10:54", "memberName": "constraint", "nodeType": "MemberAccess", "referencedDeclaration": 46593, "src": "7218:21:54", "typeDescriptions": { "typeIdentifier": "t_bytes_storage", "typeString": "bytes storage ref" } }, { "components": [ { "id": 47159, "name": "TimeConstraint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46631, "src": "7242:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_TimeConstraint_$46631_storage_ptr_$", "typeString": "type(struct OrderLib.TimeConstraint storage pointer)" } } ], "id": 47160, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7241:16:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_TimeConstraint_$46631_storage_ptr_$", "typeString": "type(struct OrderLib.TimeConstraint storage pointer)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_storage", "typeString": "bytes storage ref" }, { "typeIdentifier": "t_type$_t_struct$_TimeConstraint_$46631_storage_ptr_$", "typeString": "type(struct OrderLib.TimeConstraint storage pointer)" } ], "expression": { "id": 47155, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7207:3:54", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 47156, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7211:6:54", "memberName": "decode", "nodeType": "MemberAccess", "src": "7207:10:54", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 47161, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7207:51:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "nodeType": "VariableDeclarationStatement", "src": "7180:78:54" }, { "assignments": [ 47164 ], "declarations": [ { "constant": false, "id": 47164, "mutability": "mutable", "name": "time", "nameLocation": "7283:4:54", "nodeType": "VariableDeclaration", "scope": 47219, "src": "7276:11:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 47163, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "7276:6:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" } ], "id": 47181, "initialValue": { "condition": { "commonType": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" }, "id": 47170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 47165, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7290:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47166, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7293:8:54", "memberName": "earliest", "nodeType": "MemberAccess", "referencedDeclaration": 46627, "src": "7290:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47167, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7302:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46611, "src": "7290:16:54", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47168, "name": "TimeMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46608, "src": "7310:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_TimeMode_$46608_$", "typeString": "type(enum OrderLib.TimeMode)" } }, "id": 47169, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7319:9:54", "memberName": "Timestamp", "nodeType": "MemberAccess", "referencedDeclaration": 46606, "src": "7310:18:54", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" } }, "src": "7290:38:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "commonType": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "id": 47179, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47174, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "7350:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47175, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7357:5:54", "memberName": "start", "nodeType": "MemberAccess", "referencedDeclaration": 46571, "src": "7350:12:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "expression": { "expression": { "id": 47176, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7365:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47177, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7368:8:54", "memberName": "earliest", "nodeType": "MemberAccess", "referencedDeclaration": 46627, "src": "7365:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47178, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7377:4:54", "memberName": "time", "nodeType": "MemberAccess", "referencedDeclaration": 46613, "src": "7365:16:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "src": "7350:31:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 47180, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "7290:91:54", "trueExpression": { "expression": { "expression": { "id": 47171, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7331:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47172, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7334:8:54", "memberName": "earliest", "nodeType": "MemberAccess", "referencedDeclaration": 46627, "src": "7331:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47173, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7343:4:54", "memberName": "time", "nodeType": "MemberAccess", "referencedDeclaration": 46613, "src": "7331:16:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "VariableDeclarationStatement", "src": "7276:105:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47182, "name": "time", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47164, "src": "7403:4:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "expression": { "id": 47183, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "7410:5:54", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 47184, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7416:9:54", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "7410:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7403:22:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47190, "nodeType": "IfStatement", "src": "7399:60:54", "trueBody": { "expression": { "arguments": [ { "hexValue": "5445", "id": 47187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7454:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_809eadd384c03f5829be839c2c0e14a55b669e767ac53275d6b518250bfd6f0e", "typeString": "literal_string \"TE\"" }, "value": "TE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_809eadd384c03f5829be839c2c0e14a55b669e767ac53275d6b518250bfd6f0e", "typeString": "literal_string \"TE\"" } ], "id": 47186, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "7447:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47188, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7447:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47189, "nodeType": "ExpressionStatement", "src": "7447:12:54" } }, { "expression": { "id": 47208, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 47191, "name": "time", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47164, "src": "7491:4:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "condition": { "commonType": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" }, "id": 47197, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 47192, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7498:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47193, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7501:6:54", "memberName": "latest", "nodeType": "MemberAccess", "referencedDeclaration": 46630, "src": "7498:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47194, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7508:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46611, "src": "7498:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47195, "name": "TimeMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46608, "src": "7516:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_TimeMode_$46608_$", "typeString": "type(enum OrderLib.TimeMode)" } }, "id": 47196, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7525:9:54", "memberName": "Timestamp", "nodeType": "MemberAccess", "referencedDeclaration": 46606, "src": "7516:18:54", "typeDescriptions": { "typeIdentifier": "t_enum$_TimeMode_$46608", "typeString": "enum OrderLib.TimeMode" } }, "src": "7498:36:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "commonType": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "id": 47206, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47201, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "7554:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47202, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7561:5:54", "memberName": "start", "nodeType": "MemberAccess", "referencedDeclaration": 46571, "src": "7554:12:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "expression": { "expression": { "id": 47203, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7569:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47204, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7572:6:54", "memberName": "latest", "nodeType": "MemberAccess", "referencedDeclaration": 46630, "src": "7569:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47205, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7579:4:54", "memberName": "time", "nodeType": "MemberAccess", "referencedDeclaration": 46613, "src": "7569:14:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "src": "7554:29:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 47207, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "7498:85:54", "trueExpression": { "expression": { "expression": { "id": 47198, "name": "tc", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47154, "src": "7537:2:54", "typeDescriptions": { "typeIdentifier": "t_struct$_TimeConstraint_$46631_memory_ptr", "typeString": "struct OrderLib.TimeConstraint memory" } }, "id": 47199, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7540:6:54", "memberName": "latest", "nodeType": "MemberAccess", "referencedDeclaration": 46630, "src": "7537:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Time_$46614_memory_ptr", "typeString": "struct OrderLib.Time memory" } }, "id": 47200, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7547:4:54", "memberName": "time", "nodeType": "MemberAccess", "referencedDeclaration": 46613, "src": "7537:14:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "src": "7491:92:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 47209, "nodeType": "ExpressionStatement", "src": "7491:92:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47210, "name": "time", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47164, "src": "7605:4:54", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "id": 47211, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "7612:5:54", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 47212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7618:9:54", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "7612:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7605:22:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47218, "nodeType": "IfStatement", "src": "7601:60:54", "trueBody": { "expression": { "arguments": [ { "hexValue": "544c", "id": 47215, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7656:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_3567944353348b16bf66cdba2fda2fed4000cf1d7dbf8f174db37bbe48607b29", "typeString": "literal_string \"TL\"" }, "value": "TL" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_3567944353348b16bf66cdba2fda2fed4000cf1d7dbf8f174db37bbe48607b29", "typeString": "literal_string \"TL\"" } ], "id": 47214, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "7649:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47216, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7649:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47217, "nodeType": "ExpressionStatement", "src": "7649:12:54" } } ] } } ] }, "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47129, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47125, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47122, "src": "6950:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "expression": { "id": 47126, "name": "tranche", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47089, "src": "6954:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 47127, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "6962:11:54", "memberName": "constraints", "nodeType": "MemberAccess", "referencedDeclaration": 46637, "src": "6954:19:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Constraint_$46594_storage_$dyn_storage", "typeString": "struct OrderLib.Constraint storage ref[] storage ref" } }, "id": 47128, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6974:6:54", "memberName": "length", "nodeType": "MemberAccess", "src": "6954:26:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6950:30:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47405, "initializationExpression": { "assignments": [ 47122 ], "declarations": [ { "constant": false, "id": 47122, "mutability": "mutable", "name": "c", "nameLocation": "6943:1:54", "nodeType": "VariableDeclaration", "scope": 47405, "src": "6937:7:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 47121, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "6937:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" } ], "id": 47124, "initialValue": { "hexValue": "30", "id": 47123, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6947:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "6937:11:54" }, "isSimpleCounterLoop": false, "loopExpression": { "expression": { "id": 47131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "6982:3:54", "subExpression": { "id": 47130, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47122, "src": "6982:1:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 47132, "nodeType": "ExpressionStatement", "src": "6982:3:54" }, "nodeType": "ForStatement", "src": "6932:2647:54" }, { "expression": { "arguments": [ { "hexValue": "636f6d707574696e6720616d6f756e74", "id": 47409, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9601:18:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_51ca0b53ddf2e58b9708bb1c8db7590660e9c40dfeea3ebd323729fd38d68d01", "typeString": "literal_string \"computing amount\"" }, "value": "computing amount" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_51ca0b53ddf2e58b9708bb1c8db7590660e9c40dfeea3ebd323729fd38d68d01", "typeString": "literal_string \"computing amount\"" } ], "expression": { "id": 47406, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9588:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47408, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9597:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "9588:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47410, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9588:32:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47411, "nodeType": "ExpressionStatement", "src": "9588:32:54" }, { "expression": { "arguments": [ { "expression": { "expression": { "id": 47415, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9643:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47416, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9650:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "9643:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47417, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9656:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "9643:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47412, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9630:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9639:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9630:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47418, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9630:33:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47419, "nodeType": "ExpressionStatement", "src": "9630:33:54" }, { "expression": { "arguments": [ { "expression": { "id": 47423, "name": "tranche", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47089, "src": "9686:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 47424, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9694:8:54", "memberName": "fraction", "nodeType": "MemberAccess", "referencedDeclaration": 46633, "src": "9686:16:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint16", "typeString": "uint16" } ], "expression": { "id": 47420, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9673:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9682:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9673:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47425, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9673:30:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47426, "nodeType": "ExpressionStatement", "src": "9673:30:54" }, { "expression": { "arguments": [ { "expression": { "expression": { "id": 47430, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9726:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47431, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9733:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "9726:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47432, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9739:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "9726:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "expression": { "id": 47427, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9713:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47429, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9722:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22181, "src": "9713:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 47433, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9713:40:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47434, "nodeType": "ExpressionStatement", "src": "9713:40:54" }, { "expression": { "arguments": [ { "expression": { "id": 47438, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9776:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47439, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9783:8:54", "memberName": "filledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46575, "src": "9776:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47435, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9763:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47437, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9772:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9763:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47440, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9763:29:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47441, "nodeType": "ExpressionStatement", "src": "9763:29:54" }, { "expression": { "arguments": [ { "expression": { "id": 47445, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9815:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47446, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9822:9:54", "memberName": "filledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46577, "src": "9815:16:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47442, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9802:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47444, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9811:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9802:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9802:30:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47448, "nodeType": "ExpressionStatement", "src": "9802:30:54" }, { "expression": { "arguments": [ { "baseExpression": { "expression": { "id": 47452, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9855:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47453, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9862:15:54", "memberName": "trancheFilledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46580, "src": "9855:22:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47455, "indexExpression": { "id": 47454, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "9878:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "9855:36:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47449, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9842:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47451, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9851:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9842:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47456, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9842:50:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47457, "nodeType": "ExpressionStatement", "src": "9842:50:54" }, { "expression": { "arguments": [ { "baseExpression": { "expression": { "id": 47461, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9915:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47462, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9922:16:54", "memberName": "trancheFilledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46583, "src": "9915:23:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47464, "indexExpression": { "id": 47463, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "9939:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "9915:37:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47458, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "9902:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9911:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "9902:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47465, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9902:51:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47466, "nodeType": "ExpressionStatement", "src": "9902:51:54" }, { "assignments": [ 47468 ], "declarations": [ { "constant": false, "id": 47468, "mutability": "mutable", "name": "amount", "nameLocation": "9971:6:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "9963:14:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47467, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9963:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47495, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47494, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 47469, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "9980:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47470, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9987:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "9980:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47471, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "9993:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "9980:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "expression": { "id": 47472, "name": "tranche", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47089, "src": "10002:7:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Tranche_$46638_storage_ptr", "typeString": "struct OrderLib.Tranche storage pointer" } }, "id": 47473, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10010:8:54", "memberName": "fraction", "nodeType": "MemberAccess", "referencedDeclaration": 46633, "src": "10002:16:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "src": "9980:38:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "expression": { "arguments": [ { "id": 47477, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10026:6:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint16_$", "typeString": "type(uint16)" }, "typeName": { "id": 47476, "name": "uint16", "nodeType": "ElementaryTypeName", "src": "10026:6:54", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint16_$", "typeString": "type(uint16)" } ], "id": 47475, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "10021:4:54", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 47478, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10021:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint16", "typeString": "type(uint16)" } }, "id": 47479, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10034:3:54", "memberName": "max", "nodeType": "MemberAccess", "src": "10021:16:54", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, "src": "9980:57:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "components": [ { "condition": { "expression": { "expression": { "id": 47481, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10100:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47482, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10107:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10100:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47483, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10113:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "10100:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "baseExpression": { "expression": { "id": 47488, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10168:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47489, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10175:16:54", "memberName": "trancheFilledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46583, "src": "10168:23:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47491, "indexExpression": { "id": 47490, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "10192:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "10168:37:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47492, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "10100:105:54", "trueExpression": { "baseExpression": { "expression": { "id": 47484, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10129:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47485, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10136:15:54", "memberName": "trancheFilledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46580, "src": "10129:22:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47487, "indexExpression": { "id": 47486, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "10152:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "10129:36:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47493, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10099:107:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9980:226:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "9963:243:54" }, { "expression": { "arguments": [ { "hexValue": "616d6f756e74", "id": 47499, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10252:8:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_89c4783cb6cc307f98e95f2d5d5d8647bdb3d4bdd087209374f187b38e098895", "typeString": "literal_string \"amount\"" }, "value": "amount" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_89c4783cb6cc307f98e95f2d5d5d8647bdb3d4bdd087209374f187b38e098895", "typeString": "literal_string \"amount\"" } ], "expression": { "id": 47496, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10239:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47498, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10248:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "10239:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10239:22:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47501, "nodeType": "ExpressionStatement", "src": "10239:22:54" }, { "expression": { "arguments": [ { "id": 47505, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "10284:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47502, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10271:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47504, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10280:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "10271:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47506, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10271:20:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47507, "nodeType": "ExpressionStatement", "src": "10271:20:54" }, { "expression": { "arguments": [ { "hexValue": "6c696d6974", "id": 47511, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10314:7:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_7fc4c77395fcdec81e476481a08f1375d8dae0ef9d902795df834781daa81fb0", "typeString": "literal_string \"limit\"" }, "value": "limit" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_7fc4c77395fcdec81e476481a08f1375d8dae0ef9d902795df834781daa81fb0", "typeString": "literal_string \"limit\"" } ], "expression": { "id": 47508, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10301:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47510, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10310:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "10301:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47512, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10301:21:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47513, "nodeType": "ExpressionStatement", "src": "10301:21:54" }, { "expression": { "arguments": [ { "id": 47517, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "10345:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 47514, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10332:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47516, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10341:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "10332:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47518, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10332:31:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47519, "nodeType": "ExpressionStatement", "src": "10332:31:54" }, { "expression": { "arguments": [ { "hexValue": "7072696365", "id": 47523, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10386:7:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_282bd803c09c6b34a4d86ee95434129ea89232e91fab09f9e5dc6fe984fa9a6f", "typeString": "literal_string \"price\"" }, "value": "price" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_282bd803c09c6b34a4d86ee95434129ea89232e91fab09f9e5dc6fe984fa9a6f", "typeString": "literal_string \"price\"" } ], "expression": { "id": 47520, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10373:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10382:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "10373:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47524, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10373:21:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47525, "nodeType": "ExpressionStatement", "src": "10373:21:54" }, { "expression": { "arguments": [ { "id": 47529, "name": "sqrtPriceX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47097, "src": "10417:12:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 47526, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10404:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47528, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10413:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "10404:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10404:26:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47531, "nodeType": "ExpressionStatement", "src": "10404:26:54" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47545, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "condition": { "expression": { "expression": { "id": 47533, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10484:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47534, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10491:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10484:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47535, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10497:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "10484:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "expression": { "id": 47538, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10531:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47539, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10538:9:54", "memberName": "filledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46577, "src": "10531:16:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47540, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "10484:63:54", "trueExpression": { "expression": { "id": 47536, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10513:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47537, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10520:8:54", "memberName": "filledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46575, "src": "10513:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47541, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10483:65:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "expression": { "expression": { "id": 47542, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10552:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47543, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10559:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10552:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47544, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10565:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "10552:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10483:88:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4f56455246494c4c", "id": 47546, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10573:10:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_59f2828083e82ce17876acefad5a239113153be3542a8226c61be20c8c7e3fe5", "typeString": "literal_string \"OVERFILL\"" }, "value": "OVERFILL" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_59f2828083e82ce17876acefad5a239113153be3542a8226c61be20c8c7e3fe5", "typeString": "literal_string \"OVERFILL\"" } ], "id": 47532, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "10474:7:54", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 47547, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10474:111:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47548, "nodeType": "ExpressionStatement", "src": "10474:111:54" }, { "assignments": [ 47550 ], "declarations": [ { "constant": false, "id": 47550, "mutability": "mutable", "name": "remaining", "nameLocation": "10603:9:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "10595:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47549, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10595:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47564, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 47551, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10615:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47552, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10622:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10615:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47553, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10628:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "10615:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "components": [ { "condition": { "expression": { "expression": { "id": 47554, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10638:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47555, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10645:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10638:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47556, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10651:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "10638:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "expression": { "id": 47559, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10685:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47560, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10692:9:54", "memberName": "filledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46577, "src": "10685:16:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47561, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "10638:63:54", "trueExpression": { "expression": { "id": 47557, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10667:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47558, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10674:8:54", "memberName": "filledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46575, "src": "10667:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47562, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10637:65:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10615:87:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10595:107:54" }, { "expression": { "arguments": [ { "hexValue": "72656d61696e696e67", "id": 47568, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10725:11:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_e6d09b71759c924026f2006fa173772a54e6cd329e2f4083e6b5742463843116", "typeString": "literal_string \"remaining\"" }, "value": "remaining" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_e6d09b71759c924026f2006fa173772a54e6cd329e2f4083e6b5742463843116", "typeString": "literal_string \"remaining\"" } ], "expression": { "id": 47565, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10712:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10721:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "10712:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47569, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10712:25:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47570, "nodeType": "ExpressionStatement", "src": "10712:25:54" }, { "expression": { "arguments": [ { "id": 47574, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47550, "src": "10760:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47571, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10747:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47573, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10756:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "10747:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47575, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10747:23:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47576, "nodeType": "ExpressionStatement", "src": "10747:23:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47577, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "10784:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "id": 47578, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47550, "src": "10793:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10784:18:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47584, "nodeType": "IfStatement", "src": "10780:109:54", "trueBody": { "expression": { "id": 47582, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 47580, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "10871:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 47581, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47550, "src": "10880:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10871:18:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47583, "nodeType": "ExpressionStatement", "src": "10871:18:54" } }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47588, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47586, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "10908:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 47587, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10917:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "10908:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5446", "id": 47589, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10920:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_cebb2b2e317200ffcf39e4291b6400d95f06e73adfd258bd495d227b7d846ff0", "typeString": "literal_string \"TF\"" }, "value": "TF" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_cebb2b2e317200ffcf39e4291b6400d95f06e73adfd258bd495d227b7d846ff0", "typeString": "literal_string \"TF\"" } ], "id": 47585, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "10899:7:54", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 47590, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10899:27:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47591, "nodeType": "ExpressionStatement", "src": "10899:27:54" }, { "expression": { "arguments": [ { "id": 47595, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "10949:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47592, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "10936:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47594, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10945:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "10936:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47596, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10936:20:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47597, "nodeType": "ExpressionStatement", "src": "10936:20:54" }, { "assignments": [ 47599 ], "declarations": [ { "constant": false, "id": 47599, "mutability": "mutable", "name": "recipient", "nameLocation": "10974:9:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "10966:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 47598, "name": "address", "nodeType": "ElementaryTypeName", "src": "10966:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 47609, "initialValue": { "condition": { "expression": { "expression": { "id": 47600, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "10986:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47601, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10993:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "10986:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47602, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "10999:21:54", "memberName": "outputDirectlyToOwner", "nodeType": "MemberAccess", "referencedDeclaration": 46556, "src": "10986:34:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "arguments": [ { "id": 47606, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "11039:4:54", "typeDescriptions": { "typeIdentifier": "t_contract$_OrderLib_$47922", "typeString": "library OrderLib" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_OrderLib_$47922", "typeString": "library OrderLib" } ], "id": 47605, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11031:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 47604, "name": "address", "nodeType": "ElementaryTypeName", "src": "11031:7:54", "typeDescriptions": {} } }, "id": 47607, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11031:13:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 47608, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "10986:58:54", "trueExpression": { "id": 47603, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47026, "src": "11023:5:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "10966:78:54" }, { "expression": { "arguments": [ { "id": 47613, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47599, "src": "11067:9:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 47610, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "11054:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47612, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11063:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "11054:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 47614, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11054:23:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47615, "nodeType": "ExpressionStatement", "src": "11054:23:54" }, { "assignments": [ 47617 ], "declarations": [ { "constant": false, "id": 47617, "mutability": "mutable", "name": "amountIn", "nameLocation": "11095:8:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "11087:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47616, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11087:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47618, "nodeType": "VariableDeclarationStatement", "src": "11087:16:54" }, { "assignments": [ 47620 ], "declarations": [ { "constant": false, "id": 47620, "mutability": "mutable", "name": "amountOut", "nameLocation": "11121:9:54", "nodeType": "VariableDeclaration", "scope": 47687, "src": "11113:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47619, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11113:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47621, "nodeType": "VariableDeclarationStatement", "src": "11113:17:54" }, { "condition": { "commonType": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" }, "id": 47628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "expression": { "id": 47622, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11144:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47623, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11151:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "11144:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47624, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11157:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "11144:18:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "id": 47625, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11163:8:54", "memberName": "exchange", "nodeType": "MemberAccess", "referencedDeclaration": 46540, "src": "11144:27:54", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47626, "name": "Exchange", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46537, "src": "11175:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_Exchange_$46537_$", "typeString": "type(enum OrderLib.Exchange)" } }, "id": 47627, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11184:9:54", "memberName": "UniswapV3", "nodeType": "MemberAccess", "referencedDeclaration": 46536, "src": "11175:18:54", "typeDescriptions": { "typeIdentifier": "t_enum$_Exchange_$46537", "typeString": "enum OrderLib.Exchange" } }, "src": "11144:49:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "expression": { "arguments": [ { "hexValue": "5552", "id": 47643, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11371:4:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fc995e85d3e6aa06929b40b15dc4705a5382027f8659f6dfc9bd5e450e440295", "typeString": "literal_string \"UR\"" }, "value": "UR" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_fc995e85d3e6aa06929b40b15dc4705a5382027f8659f6dfc9bd5e450e440295", "typeString": "literal_string \"UR\"" } ], "id": 47642, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "11364:6:54", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47644, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11364:12:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47645, "nodeType": "ExpressionStatement", "src": "11364:12:54" }, "id": 47646, "nodeType": "IfStatement", "src": "11140:236:54", "trueBody": { "expression": { "id": 47640, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "components": [ { "id": 47629, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47617, "src": "11209:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47630, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47620, "src": "11219:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47631, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "11208:21:54", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 47633, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47599, "src": "11250:9:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 47634, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11261:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47635, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11268:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "11261:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, { "id": 47636, "name": "pool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47105, "src": "11275:4:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 47637, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47468, "src": "11281:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47638, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47101, "src": "11289:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "id": 47632, "name": "_do_execute_univ3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47771, "src": "11232:17:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_struct$_SwapOrder_$46563_storage_ptr_$_t_address_$_t_uint256_$_t_uint160_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (address,struct OrderLib.SwapOrder storage pointer,address,uint256,uint160) returns (uint256,uint256)" } }, "id": 47639, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11232:75:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "src": "11208:99:54", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47641, "nodeType": "ExpressionStatement", "src": "11208:99:54" } }, { "expression": { "id": 47651, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 47647, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11403:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47649, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "11410:8:54", "memberName": "filledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46575, "src": "11403:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "id": 47650, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47617, "src": "11422:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "11403:27:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47652, "nodeType": "ExpressionStatement", "src": "11403:27:54" }, { "expression": { "id": 47657, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 47653, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11440:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47655, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "11447:9:54", "memberName": "filledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46577, "src": "11440:16:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "id": 47656, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47620, "src": "11460:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "11440:29:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47658, "nodeType": "ExpressionStatement", "src": "11440:29:54" }, { "expression": { "id": 47665, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "expression": { "id": 47659, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11479:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47662, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11486:15:54", "memberName": "trancheFilledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46580, "src": "11479:22:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47663, "indexExpression": { "id": 47661, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "11502:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "11479:36:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "id": 47664, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47617, "src": "11519:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "11479:48:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47666, "nodeType": "ExpressionStatement", "src": "11479:48:54" }, { "expression": { "id": 47673, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "expression": { "id": 47667, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11537:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47670, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "11544:16:54", "memberName": "trancheFilledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46583, "src": "11537:23:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[] storage ref" } }, "id": 47671, "indexExpression": { "id": 47669, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "11561:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "11537:37:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "id": 47672, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47620, "src": "11578:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "11537:50:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47674, "nodeType": "ExpressionStatement", "src": "11537:50:54" }, { "eventCall": { "arguments": [ { "id": 47676, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47028, "src": "11621:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, { "id": 47677, "name": "trancheIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47030, "src": "11633:12:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { "id": 47678, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47617, "src": "11647:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47679, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47620, "src": "11657:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint64", "typeString": "uint64" }, { "typeIdentifier": "t_uint8", "typeString": "uint8" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 47675, "name": "DexorderSwapFilled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46525, "src": "11602:18:54", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (uint64,uint8,uint256,uint256)" } }, "id": 47680, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11602:65:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47681, "nodeType": "EmitStatement", "src": "11597:70:54" }, { "expression": { "arguments": [ { "id": 47683, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47024, "src": "11693:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, { "id": 47684, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47071, "src": "11699:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" }, { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } ], "id": 47682, "name": "_checkCompleted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47841, "src": "11677:15:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46509_storage_ptr_$_t_struct$_SwapOrderStatus_$46584_storage_ptr_$returns$__$", "typeString": "function (struct OrderLib.OrdersInfo storage pointer,struct OrderLib.SwapOrderStatus storage pointer)" } }, "id": 47685, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11677:29:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47686, "nodeType": "ExpressionStatement", "src": "11677:29:54" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "execute", "nameLocation": "6148:7:54", "parameters": { "id": 47034, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47024, "mutability": "mutable", "name": "self", "nameLocation": "6175:4:54", "nodeType": "VariableDeclaration", "scope": 47688, "src": "6156:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 47023, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47022, "name": "OrdersInfo", "nameLocations": [ "6156:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "6156:10:54" }, "referencedDeclaration": 46509, "src": "6156:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 47026, "mutability": "mutable", "name": "owner", "nameLocation": "6189:5:54", "nodeType": "VariableDeclaration", "scope": 47688, "src": "6181:13:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 47025, "name": "address", "nodeType": "ElementaryTypeName", "src": "6181:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 47028, "mutability": "mutable", "name": "orderIndex", "nameLocation": "6203:10:54", "nodeType": "VariableDeclaration", "scope": 47688, "src": "6196:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 47027, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "6196:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" }, { "constant": false, "id": 47030, "mutability": "mutable", "name": "trancheIndex", "nameLocation": "6221:12:54", "nodeType": "VariableDeclaration", "scope": 47688, "src": "6215:18:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 47029, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "6215:5:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" }, { "constant": false, "id": 47033, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 47688, "src": "6235:17:54", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_PriceProof_$46641_memory_ptr", "typeString": "struct OrderLib.PriceProof" }, "typeName": { "id": 47032, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47031, "name": "PriceProof", "nameLocations": [ "6235:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46641, "src": "6235:10:54" }, "referencedDeclaration": 46641, "src": "6235:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_PriceProof_$46641_storage_ptr", "typeString": "struct OrderLib.PriceProof" } }, "visibility": "internal" } ], "src": "6155:99:54" }, "returnParameters": { "id": 47035, "nodeType": "ParameterList", "parameters": [], "src": "6264:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 47771, "nodeType": "FunctionDefinition", "src": "11720:909:54", "nodes": [], "body": { "id": 47770, "nodeType": "Block", "src": "11911:718:54", "nodes": [], "statements": [ { "expression": { "arguments": [ { "hexValue": "7072696365206c696d6974", "id": 47709, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12076:13:54", "typeDescriptions": { "typeIdentifier": "t_stringliteral_55733f5c15f30fc958c76e70468c10d28c927c81b21661c7c64bdc4b48103bd1", "typeString": "literal_string \"price limit\"" }, "value": "price limit" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_55733f5c15f30fc958c76e70468c10d28c927c81b21661c7c64bdc4b48103bd1", "typeString": "literal_string \"price limit\"" } ], "expression": { "id": 47706, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "12063:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12072:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "12063:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 47710, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12063:27:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47711, "nodeType": "ExpressionStatement", "src": "12063:27:54" }, { "expression": { "arguments": [ { "arguments": [ { "id": 47717, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47699, "src": "12118:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "id": 47716, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "12113:4:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 47715, "name": "uint", "nodeType": "ElementaryTypeName", "src": "12113:4:54", "typeDescriptions": {} } }, "id": 47718, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12113:23:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 47712, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "12100:8:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 47714, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12109:3:54", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "12100:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 47719, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12100:37:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47720, "nodeType": "ExpressionStatement", "src": "12100:37:54" }, { "condition": { "expression": { "id": 47721, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12151:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47722, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12157:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "12151:19:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 47768, "nodeType": "Block", "src": "12404:219:54", "statements": [ { "expression": { "id": 47766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "components": [ { "id": 47746, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47702, "src": "12419:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47747, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47704, "src": "12429:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47748, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "12418:21:54", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "arguments": [ { "id": 47753, "name": "pool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47695, "src": "12520:4:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 47754, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12526:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47755, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12532:7:54", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 46545, "src": "12526:13:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 47756, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12541:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47757, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12547:8:54", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 46547, "src": "12541:14:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 47758, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47690, "src": "12557:9:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "expression": { "id": 47759, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12568:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47760, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12574:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "12568:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "id": 47761, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12580:3:54", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 46542, "src": "12568:15:54", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "id": 47762, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47697, "src": "12585:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47763, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47699, "src": "12593:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 47751, "name": "UniswapSwapper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48847, "src": "12473:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48847_$", "typeString": "type(library UniswapSwapper)" } }, "id": 47752, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12488:10:54", "memberName": "SwapParams", "nodeType": "MemberAccess", "referencedDeclaration": 48342, "src": "12473:25:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_SwapParams_$48342_storage_ptr_$", "typeString": "type(struct UniswapSwapper.SwapParams storage pointer)" } }, "id": 47764, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12473:138:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } ], "expression": { "id": 47749, "name": "UniswapSwapper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48847, "src": "12442:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48847_$", "typeString": "type(library UniswapSwapper)" } }, "id": 47750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12457:15:54", "memberName": "swapExactOutput", "nodeType": "MemberAccess", "referencedDeclaration": 48793, "src": "12442:30:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapParams_$48342_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (struct UniswapSwapper.SwapParams memory) returns (uint256,uint256)" } }, "id": 47765, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12442:170:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "src": "12418:194:54", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47767, "nodeType": "ExpressionStatement", "src": "12418:194:54" } ] }, "id": 47769, "nodeType": "IfStatement", "src": "12147:476:54", "trueBody": { "id": 47745, "nodeType": "Block", "src": "12172:218:54", "statements": [ { "expression": { "id": 47743, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "components": [ { "id": 47723, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47702, "src": "12187:8:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47724, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47704, "src": "12197:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47725, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "12186:21:54", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "arguments": [ { "id": 47730, "name": "pool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47695, "src": "12287:4:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 47731, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12293:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47732, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12299:7:54", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 46545, "src": "12293:13:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 47733, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12308:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47734, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12314:8:54", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 46547, "src": "12308:14:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 47735, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47690, "src": "12324:9:54", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "expression": { "id": 47736, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47693, "src": "12335:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder storage pointer" } }, "id": 47737, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12341:5:54", "memberName": "route", "nodeType": "MemberAccess", "referencedDeclaration": 46550, "src": "12335:11:54", "typeDescriptions": { "typeIdentifier": "t_struct$_Route_$46543_storage", "typeString": "struct OrderLib.Route storage ref" } }, "id": 47738, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12347:3:54", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 46542, "src": "12335:15:54", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "id": 47739, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47697, "src": "12352:6:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 47740, "name": "sqrtPriceLimitX96", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47699, "src": "12360:17:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 47728, "name": "UniswapSwapper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48847, "src": "12240:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48847_$", "typeString": "type(library UniswapSwapper)" } }, "id": 47729, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12255:10:54", "memberName": "SwapParams", "nodeType": "MemberAccess", "referencedDeclaration": 48342, "src": "12240:25:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_SwapParams_$48342_storage_ptr_$", "typeString": "type(struct UniswapSwapper.SwapParams storage pointer)" } }, "id": 47741, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12240:138:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } ], "expression": { "id": 47726, "name": "UniswapSwapper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48847, "src": "12210:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48847_$", "typeString": "type(library UniswapSwapper)" } }, "id": 47727, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12225:14:54", "memberName": "swapExactInput", "nodeType": "MemberAccess", "referencedDeclaration": 48532, "src": "12210:29:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapParams_$48342_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (struct UniswapSwapper.SwapParams memory) returns (uint256,uint256)" } }, "id": 47742, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12210:169:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "src": "12186:193:54", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47744, "nodeType": "ExpressionStatement", "src": "12186:193:54" } ] } } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_do_execute_univ3", "nameLocation": "11729:17:54", "parameters": { "id": 47700, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47690, "mutability": "mutable", "name": "recipient", "nameLocation": "11756:9:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11748:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 47689, "name": "address", "nodeType": "ElementaryTypeName", "src": "11748:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 47693, "mutability": "mutable", "name": "order", "nameLocation": "11785:5:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11767:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" }, "typeName": { "id": 47692, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47691, "name": "SwapOrder", "nameLocations": [ "11767:9:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46563, "src": "11767:9:54" }, "referencedDeclaration": 46563, "src": "11767:9:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage_ptr", "typeString": "struct OrderLib.SwapOrder" } }, "visibility": "internal" }, { "constant": false, "id": 47695, "mutability": "mutable", "name": "pool", "nameLocation": "11800:4:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11792:12:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 47694, "name": "address", "nodeType": "ElementaryTypeName", "src": "11792:7:54", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 47697, "mutability": "mutable", "name": "amount", "nameLocation": "11814:6:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11806:14:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47696, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11806:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 47699, "mutability": "mutable", "name": "sqrtPriceLimitX96", "nameLocation": "11830:17:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11822:25:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 47698, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "11822:7:54", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" } ], "src": "11746:102:54" }, "returnParameters": { "id": 47705, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47702, "mutability": "mutable", "name": "amountIn", "nameLocation": "11878:8:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11870:16:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47701, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11870:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 47704, "mutability": "mutable", "name": "amountOut", "nameLocation": "11896:9:54", "nodeType": "VariableDeclaration", "scope": 47771, "src": "11888:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47703, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11888:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "11869:37:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "private" }, { "id": 47841, "nodeType": "FunctionDefinition", "src": "12635:706:54", "nodes": [], "body": { "id": 47840, "nodeType": "Block", "src": "12726:615:54", "nodes": [], "statements": [ { "assignments": [ 47781 ], "declarations": [ { "constant": false, "id": 47781, "mutability": "mutable", "name": "remaining", "nameLocation": "12744:9:54", "nodeType": "VariableDeclaration", "scope": 47840, "src": "12736:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 47780, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12736:7:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 47795, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 47782, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "12756:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47783, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12763:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "12756:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47784, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12769:6:54", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 46552, "src": "12756:19:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "components": [ { "condition": { "expression": { "expression": { "id": 47785, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "12779:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47786, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12786:5:54", "memberName": "order", "nodeType": "MemberAccess", "referencedDeclaration": 46566, "src": "12779:12:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrder_$46563_storage", "typeString": "struct OrderLib.SwapOrder storage ref" } }, "id": 47787, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12792:13:54", "memberName": "amountIsInput", "nodeType": "MemberAccess", "referencedDeclaration": 46554, "src": "12779:26:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "expression": { "id": 47790, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "12826:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47791, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12833:9:54", "memberName": "filledOut", "nodeType": "MemberAccess", "referencedDeclaration": 46577, "src": "12826:16:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 47792, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "12779:63:54", "trueExpression": { "expression": { "id": 47788, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "12808:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47789, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "12815:8:54", "memberName": "filledIn", "nodeType": "MemberAccess", "referencedDeclaration": 46575, "src": "12808:15:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 47793, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "12778:65:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "12756:87:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "12736:107:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 47798, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47796, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47781, "src": "12857:9:54", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 47797, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "12870:1:54", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "12857:14:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 47831, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "id": 47821, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47818, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "13181:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47819, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13188:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "13181:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "id": 47820, "name": "NO_OCO_INDEX", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46498, "src": "13200:12:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "13181:31:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "commonType": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" }, "id": 47830, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "baseExpression": { "expression": { "id": 47822, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47774, "src": "13216:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 47823, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13221:9:54", "memberName": "ocoGroups", "nodeType": "MemberAccess", "referencedDeclaration": 46508, "src": "13216:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage", "typeString": "struct OrderLib.OcoGroup storage ref[] storage ref" } }, "id": 47826, "indexExpression": { "expression": { "id": 47824, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "13231:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47825, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13238:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "13231:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "13216:31:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage", "typeString": "struct OrderLib.OcoGroup storage ref" } }, "id": 47827, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13248:4:54", "memberName": "mode", "nodeType": "MemberAccess", "referencedDeclaration": 46648, "src": "13216:36:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47828, "name": "OcoMode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46645, "src": "13256:7:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_OcoMode_$46645_$", "typeString": "type(enum OrderLib.OcoMode)" } }, "id": 47829, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13264:22:54", "memberName": "CANCEL_ON_PARTIAL_FILL", "nodeType": "MemberAccess", "referencedDeclaration": 46643, "src": "13256:30:54", "typeDescriptions": { "typeIdentifier": "t_enum$_OcoMode_$46645", "typeString": "enum OrderLib.OcoMode" } }, "src": "13216:70:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "13181:105:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47838, "nodeType": "IfStatement", "src": "13177:157:54", "trueBody": { "expression": { "arguments": [ { "id": 47833, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47774, "src": "13312:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, { "expression": { "id": 47834, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "13318:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47835, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13325:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "13318:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" }, { "typeIdentifier": "t_uint64", "typeString": "uint64" } ], "id": 47832, "name": "_cancelOco", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47883, "src": "13301:10:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46509_storage_ptr_$_t_uint64_$returns$__$", "typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)" } }, "id": 47836, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13301:33:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47837, "nodeType": "ExpressionStatement", "src": "13301:33:54" } }, "id": 47839, "nodeType": "IfStatement", "src": "12853:481:54", "trueBody": { "id": 47817, "nodeType": "Block", "src": "12875:288:54", "statements": [ { "expression": { "id": 47804, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "id": 47799, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "12910:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47801, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "12917:5:54", "memberName": "state", "nodeType": "MemberAccess", "referencedDeclaration": 46569, "src": "12910:12:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 47802, "name": "SwapOrderState", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46534, "src": "12925:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46534_$", "typeString": "type(enum OrderLib.SwapOrderState)" } }, "id": 47803, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "12940:6:54", "memberName": "Filled", "nodeType": "MemberAccess", "referencedDeclaration": 46532, "src": "12925:21:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "src": "12910:36:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "id": 47805, "nodeType": "ExpressionStatement", "src": "12910:36:54" }, { "condition": { "commonType": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "id": 47809, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47806, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "13070:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47807, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13077:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "13070:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "id": 47808, "name": "NO_OCO_INDEX", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46498, "src": "13089:12:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "13070:31:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47816, "nodeType": "IfStatement", "src": "13066:86:54", "trueBody": { "expression": { "arguments": [ { "id": 47811, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47774, "src": "13130:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, { "expression": { "id": 47812, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47777, "src": "13136:6:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus storage pointer" } }, "id": 47813, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13143:8:54", "memberName": "ocoGroup", "nodeType": "MemberAccess", "referencedDeclaration": 46573, "src": "13136:15:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" }, { "typeIdentifier": "t_uint64", "typeString": "uint64" } ], "id": 47810, "name": "_cancelOco", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47883, "src": "13119:10:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46509_storage_ptr_$_t_uint64_$returns$__$", "typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)" } }, "id": 47814, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13119:33:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47815, "nodeType": "ExpressionStatement", "src": "13119:33:54" } } ] } } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_checkCompleted", "nameLocation": "12644:15:54", "parameters": { "id": 47778, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47774, "mutability": "mutable", "name": "self", "nameLocation": "12679:4:54", "nodeType": "VariableDeclaration", "scope": 47841, "src": "12660:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 47773, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47772, "name": "OrdersInfo", "nameLocations": [ "12660:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "12660:10:54" }, "referencedDeclaration": 46509, "src": "12660:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 47777, "mutability": "mutable", "name": "status", "nameLocation": "12709:6:54", "nodeType": "VariableDeclaration", "scope": 47841, "src": "12685:30:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" }, "typeName": { "id": 47776, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47775, "name": "SwapOrderStatus", "nameLocations": [ "12685:15:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46584, "src": "12685:15:54" }, "referencedDeclaration": 46584, "src": "12685:15:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage_ptr", "typeString": "struct OrderLib.SwapOrderStatus" } }, "visibility": "internal" } ], "src": "12659:57:54" }, "returnParameters": { "id": 47779, "nodeType": "ParameterList", "parameters": [], "src": "12726:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 47883, "nodeType": "FunctionDefinition", "src": "13347:286:54", "nodes": [], "body": { "id": 47882, "nodeType": "Block", "src": "13418:215:54", "nodes": [], "statements": [ { "assignments": [ 47851 ], "declarations": [ { "constant": false, "id": 47851, "mutability": "mutable", "name": "group", "nameLocation": "13445:5:54", "nodeType": "VariableDeclaration", "scope": 47882, "src": "13428:22:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup" }, "typeName": { "id": 47850, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47849, "name": "OcoGroup", "nameLocations": [ "13428:8:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46653, "src": "13428:8:54" }, "referencedDeclaration": 46653, "src": "13428:8:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup" } }, "visibility": "internal" } ], "id": 47856, "initialValue": { "baseExpression": { "expression": { "id": 47852, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47844, "src": "13453:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 47853, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13458:9:54", "memberName": "ocoGroups", "nodeType": "MemberAccess", "referencedDeclaration": 46508, "src": "13453:14:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_OcoGroup_$46653_storage_$dyn_storage", "typeString": "struct OrderLib.OcoGroup storage ref[] storage ref" } }, "id": 47855, "indexExpression": { "id": 47854, "name": "ocoIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47846, "src": "13468:8:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "13453:24:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage", "typeString": "struct OrderLib.OcoGroup storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "13428:49:54" }, { "assignments": [ 47858 ], "declarations": [ { "constant": false, "id": 47858, "mutability": "mutable", "name": "endIndex", "nameLocation": "13494:8:54", "nodeType": "VariableDeclaration", "scope": 47882, "src": "13487:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 47857, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "13487:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "id": 47864, "initialValue": { "commonType": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "id": 47863, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 47859, "name": "group", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47851, "src": "13505:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup storage pointer" } }, "id": 47860, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13511:10:54", "memberName": "startIndex", "nodeType": "MemberAccess", "referencedDeclaration": 46650, "src": "13505:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "expression": { "id": 47861, "name": "group", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47851, "src": "13524:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup storage pointer" } }, "id": 47862, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13530:3:54", "memberName": "num", "nodeType": "MemberAccess", "referencedDeclaration": 46652, "src": "13524:9:54", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "13505:28:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "VariableDeclarationStatement", "src": "13487:46:54" }, { "body": { "expression": { "arguments": [ { "id": 47877, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47844, "src": "13618:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, { "id": 47878, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47866, "src": "13624:1:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" }, { "typeIdentifier": "t_uint64", "typeString": "uint64" } ], "id": 47876, "name": "_cancelOrder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47921, "src": "13605:12:54", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46509_storage_ptr_$_t_uint64_$returns$__$", "typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)" } }, "id": 47879, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13605:21:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47880, "nodeType": "ExpressionStatement", "src": "13605:21:54" }, "condition": { "commonType": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "id": 47872, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47870, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47866, "src": "13575:1:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "id": 47871, "name": "endIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47858, "src": "13577:8:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "src": "13575:10:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47881, "initializationExpression": { "assignments": [ 47866 ], "declarations": [ { "constant": false, "id": 47866, "mutability": "mutable", "name": "i", "nameLocation": "13555:1:54", "nodeType": "VariableDeclaration", "scope": 47881, "src": "13548:8:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 47865, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "13548:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "id": 47869, "initialValue": { "expression": { "id": 47867, "name": "group", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47851, "src": "13557:5:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OcoGroup_$46653_storage_ptr", "typeString": "struct OrderLib.OcoGroup storage pointer" } }, "id": 47868, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13563:10:54", "memberName": "startIndex", "nodeType": "MemberAccess", "referencedDeclaration": 46650, "src": "13557:16:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "nodeType": "VariableDeclarationStatement", "src": "13548:25:54" }, "isSimpleCounterLoop": true, "loopExpression": { "expression": { "id": 47874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "13587:3:54", "subExpression": { "id": 47873, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47866, "src": "13587:1:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 47875, "nodeType": "ExpressionStatement", "src": "13587:3:54" }, "nodeType": "ForStatement", "src": "13543:83:54" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_cancelOco", "nameLocation": "13356:10:54", "parameters": { "id": 47847, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47844, "mutability": "mutable", "name": "self", "nameLocation": "13386:4:54", "nodeType": "VariableDeclaration", "scope": 47883, "src": "13367:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 47843, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47842, "name": "OrdersInfo", "nameLocations": [ "13367:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "13367:10:54" }, "referencedDeclaration": 46509, "src": "13367:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 47846, "mutability": "mutable", "name": "ocoIndex", "nameLocation": "13399:8:54", "nodeType": "VariableDeclaration", "scope": 47883, "src": "13392:15:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 47845, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "13392:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "src": "13366:42:54" }, "returnParameters": { "id": 47848, "nodeType": "ParameterList", "parameters": [], "src": "13418:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 47921, "nodeType": "FunctionDefinition", "src": "13639:319:54", "nodes": [], "body": { "id": 47920, "nodeType": "Block", "src": "13714:244:54", "nodes": [], "statements": [ { "assignments": [ 47893 ], "declarations": [ { "constant": false, "id": 47893, "mutability": "mutable", "name": "state", "nameLocation": "13739:5:54", "nodeType": "VariableDeclaration", "scope": 47920, "src": "13724:20:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" }, "typeName": { "id": 47892, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47891, "name": "SwapOrderState", "nameLocations": [ "13724:14:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46534, "src": "13724:14:54" }, "referencedDeclaration": 46534, "src": "13724:14:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "visibility": "internal" } ], "id": 47899, "initialValue": { "expression": { "baseExpression": { "expression": { "id": 47894, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47886, "src": "13747:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 47895, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13752:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "13747:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 47897, "indexExpression": { "id": 47896, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47888, "src": "13759:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "13747:23:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref" } }, "id": 47898, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13771:5:54", "memberName": "state", "nodeType": "MemberAccess", "referencedDeclaration": 46569, "src": "13747:29:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "VariableDeclarationStatement", "src": "13724:52:54" }, { "condition": { "commonType": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" }, "id": 47903, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 47900, "name": "state", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47893, "src": "13790:5:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "id": 47901, "name": "SwapOrderState", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46534, "src": "13799:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46534_$", "typeString": "type(enum OrderLib.SwapOrderState)" } }, "id": 47902, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13814:4:54", "memberName": "Open", "nodeType": "MemberAccess", "referencedDeclaration": 46530, "src": "13799:19:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "src": "13790:28:54", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 47919, "nodeType": "IfStatement", "src": "13786:166:54", "trueBody": { "id": 47918, "nodeType": "Block", "src": "13821:131:54", "statements": [ { "expression": { "id": 47912, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "baseExpression": { "expression": { "id": 47904, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47886, "src": "13835:4:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo storage pointer" } }, "id": 47907, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "13840:6:54", "memberName": "orders", "nodeType": "MemberAccess", "referencedDeclaration": 46504, "src": "13835:11:54", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46584_storage_$dyn_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref" } }, "id": 47908, "indexExpression": { "id": 47906, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47888, "src": "13847:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "13835:23:54", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapOrderStatus_$46584_storage", "typeString": "struct OrderLib.SwapOrderStatus storage ref" } }, "id": 47909, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "13859:5:54", "memberName": "state", "nodeType": "MemberAccess", "referencedDeclaration": 46569, "src": "13835:29:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 47910, "name": "SwapOrderState", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46534, "src": "13867:14:54", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46534_$", "typeString": "type(enum OrderLib.SwapOrderState)" } }, "id": 47911, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13882:8:54", "memberName": "Canceled", "nodeType": "MemberAccess", "referencedDeclaration": 46531, "src": "13867:23:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "src": "13835:55:54", "typeDescriptions": { "typeIdentifier": "t_enum$_SwapOrderState_$46534", "typeString": "enum OrderLib.SwapOrderState" } }, "id": 47913, "nodeType": "ExpressionStatement", "src": "13835:55:54" }, { "eventCall": { "arguments": [ { "id": 47915, "name": "orderIndex", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 47888, "src": "13930:10:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint64", "typeString": "uint64" } ], "id": 47914, "name": "DexorderSwapCanceled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46529, "src": "13909:20:54", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$", "typeString": "function (uint64)" } }, "id": 47916, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13909:32:54", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 47917, "nodeType": "EmitStatement", "src": "13904:37:54" } ] } } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "_cancelOrder", "nameLocation": "13648:12:54", "parameters": { "id": 47889, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 47886, "mutability": "mutable", "name": "self", "nameLocation": "13680:4:54", "nodeType": "VariableDeclaration", "scope": 47921, "src": "13661:23:54", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" }, "typeName": { "id": 47885, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 47884, "name": "OrdersInfo", "nameLocations": [ "13661:10:54" ], "nodeType": "IdentifierPath", "referencedDeclaration": 46509, "src": "13661:10:54" }, "referencedDeclaration": 46509, "src": "13661:10:54", "typeDescriptions": { "typeIdentifier": "t_struct$_OrdersInfo_$46509_storage_ptr", "typeString": "struct OrderLib.OrdersInfo" } }, "visibility": "internal" }, { "constant": false, "id": 47888, "mutability": "mutable", "name": "orderIndex", "nameLocation": "13693:10:54", "nodeType": "VariableDeclaration", "scope": 47921, "src": "13686:17:54", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" }, "typeName": { "id": 47887, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "13686:6:54", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "visibility": "internal" } ], "src": "13660:44:54" }, "returnParameters": { "id": 47890, "nodeType": "ParameterList", "parameters": [], "src": "13714:0:54" }, "scope": 47922, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" } ], "abstract": false, "baseContracts": [], "canonicalName": "OrderLib", "contractDependencies": [], "contractKind": "library", "fullyImplemented": true, "linearizedBaseContracts": [ 47922 ], "name": "OrderLib", "nameLocation": "253:8:54", "scope": 47923, "usedErrors": [], "usedEvents": [ 46515, 46525, 46529 ] } ], "license": "UNLICENSED" }, "id": 54 }