Files
contract/deployment/alpha/out/OrderLib.sol/OrderLib.json
2023-11-21 00:15:38 -04:00

18931 lines
882 KiB
JSON

{
"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": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f8ce6a8ce630aeccbfa5335ae60d2947e9d64d7fab189ecb754f11079c0d4cb464736f6c63430008160033",
"sourceMap": "245:13715:54:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;245:13715:54;;;;;;;;;;;;;;;;;",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f8ce6a8ce630aeccbfa5335ae60d2947e9d64d7fab189ecb754f11079c0d4cb464736f6c63430008160033",
"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\":\"0x0dfa2216f60ff43f051a140d565171d67dc461b61dd7c486668c6f085d9405c3\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://015f74b4f9193c43cd67d59dcf9f2c5338995eee0d7cd0feb4d4ab908e3492be\",\"dweb:/ipfs/QmUaawZvDZi2ERKNE34xGkQvBjoKhdddCTduPxWZZGf1pu\"]},\"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": "0x0dfa2216f60ff43f051a140d565171d67dc461b61dd7c486668c6f085d9405c3",
"urls": [
"bzz-raw://015f74b4f9193c43cd67d59dcf9f2c5338995eee0d7cd0feb4d4ab908e3492be",
"dweb:/ipfs/QmUaawZvDZi2ERKNE34xGkQvBjoKhdddCTduPxWZZGf1pu"
],
"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": 47920,
"exportedSymbols": {
"Constants": [
46261
],
"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": [
47919
],
"PoolAddress": [
45892
],
"TransferHelper": [
46063
],
"UniswapSwapper": [
48844
],
"console2": [
29653
]
},
"nodeType": "SourceUnit",
"src": "66:13895:54",
"nodes": [
{
"id": 46477,
"nodeType": "PragmaDirective",
"src": "66:24:54",
"nodes": [],
"literals": [
"solidity",
">=",
"0.8",
".0"
]
},
{
"id": 46478,
"nodeType": "PragmaDirective",
"src": "91:19:54",
"nodes": [],
"literals": [
"abicoder",
"v2"
]
},
{
"id": 46479,
"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": 47920,
"sourceUnit": 43895,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 46480,
"nodeType": "ImportDirective",
"src": "179:30:54",
"nodes": [],
"absolutePath": "src/UniswapSwapper.sol",
"file": "./UniswapSwapper.sol",
"nameLocation": "-1:-1:-1",
"scope": 47920,
"sourceUnit": 48845,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 46481,
"nodeType": "ImportDirective",
"src": "210:32:54",
"nodes": [],
"absolutePath": "lib/forge-std/src/console2.sol",
"file": "forge-std/console2.sol",
"nameLocation": "-1:-1:-1",
"scope": 47920,
"sourceUnit": 29654,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 47919,
"nodeType": "ContractDefinition",
"src": "245:13715:54",
"nodes": [
{
"id": 46488,
"nodeType": "VariableDeclaration",
"src": "314:52:54",
"nodes": [],
"constant": true,
"mutability": "constant",
"name": "NO_CHAIN",
"nameLocation": "339:8:54",
"scope": 47919,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46482,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "314:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"value": {
"expression": {
"arguments": [
{
"id": 46485,
"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": 46484,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "355:6:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
}
],
"id": 46483,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "350:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 46486,
"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": 46487,
"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": 46495,
"nodeType": "VariableDeclaration",
"src": "372:56:54",
"nodes": [],
"constant": true,
"mutability": "constant",
"name": "NO_OCO_INDEX",
"nameLocation": "397:12:54",
"scope": 47919,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46489,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "372:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"value": {
"expression": {
"arguments": [
{
"id": 46492,
"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": 46491,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "417:6:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
}
],
"id": 46490,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "412:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 46493,
"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": 46494,
"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": 46506,
"nodeType": "StructDefinition",
"src": "435:217:54",
"nodes": [],
"canonicalName": "OrderLib.OrdersInfo",
"members": [
{
"constant": false,
"id": 46497,
"mutability": "mutable",
"name": "_ignored",
"nameLocation": "468:8:54",
"nodeType": "VariableDeclaration",
"scope": 46506,
"src": "463:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46496,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "463:4:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46501,
"mutability": "mutable",
"name": "orders",
"nameLocation": "609:6:54",
"nodeType": "VariableDeclaration",
"scope": 46506,
"src": "591:24:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus[]"
},
"typeName": {
"baseType": {
"id": 46499,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46498,
"name": "SwapOrderStatus",
"nameLocations": [
"591:15:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46581,
"src": "591:15:54"
},
"referencedDeclaration": 46581,
"src": "591:15:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
}
},
"id": 46500,
"nodeType": "ArrayTypeName",
"src": "591:17:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46505,
"mutability": "mutable",
"name": "ocoGroups",
"nameLocation": "636:9:54",
"nodeType": "VariableDeclaration",
"scope": 46506,
"src": "625:20:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.OcoGroup[]"
},
"typeName": {
"baseType": {
"id": 46503,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46502,
"name": "OcoGroup",
"nameLocations": [
"625:8:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46650,
"src": "625:8:54"
},
"referencedDeclaration": 46650,
"src": "625:8:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup"
}
},
"id": 46504,
"nodeType": "ArrayTypeName",
"src": "625:10:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.OcoGroup[]"
}
},
"visibility": "internal"
}
],
"name": "OrdersInfo",
"nameLocation": "442:10:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46512,
"nodeType": "EventDefinition",
"src": "658:67:54",
"nodes": [],
"anonymous": false,
"eventSelector": "704790b72d78f27fe222b5e80adb23b845160c560b9e927c2c87b75adc9c2e2b",
"name": "DexorderSwapPlaced",
"nameLocation": "664:18:54",
"parameters": {
"id": 46511,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46508,
"indexed": false,
"mutability": "mutable",
"name": "startOrderIndex",
"nameLocation": "691:15:54",
"nodeType": "VariableDeclaration",
"scope": 46512,
"src": "684:22:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46507,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "684:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46510,
"indexed": false,
"mutability": "mutable",
"name": "numOrders",
"nameLocation": "714:9:54",
"nodeType": "VariableDeclaration",
"scope": 46512,
"src": "708:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 46509,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "708:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "683:41:54"
}
},
{
"id": 46522,
"nodeType": "EventDefinition",
"src": "731:102:54",
"nodes": [],
"anonymous": false,
"eventSelector": "8b9a867d3ae2675d02744a1ce6d50e404d9af21941871223000c679e01911af8",
"name": "DexorderSwapFilled",
"nameLocation": "737:18:54",
"parameters": {
"id": 46521,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46514,
"indexed": false,
"mutability": "mutable",
"name": "orderIndex",
"nameLocation": "764:10:54",
"nodeType": "VariableDeclaration",
"scope": 46522,
"src": "757:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46513,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "757:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46516,
"indexed": false,
"mutability": "mutable",
"name": "trancheIndex",
"nameLocation": "782:12:54",
"nodeType": "VariableDeclaration",
"scope": 46522,
"src": "776:18:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 46515,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "776:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46518,
"indexed": false,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "804:8:54",
"nodeType": "VariableDeclaration",
"scope": 46522,
"src": "796:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46517,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "796:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46520,
"indexed": false,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "822:9:54",
"nodeType": "VariableDeclaration",
"scope": 46522,
"src": "814:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46519,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "814:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "756:76:54"
}
},
{
"id": 46526,
"nodeType": "EventDefinition",
"src": "839:47:54",
"nodes": [],
"anonymous": false,
"eventSelector": "74a075ee230588b5c76ea493a6d21b086384f29139b7227b9c6329e66106dc48",
"name": "DexorderSwapCanceled",
"nameLocation": "845:20:54",
"parameters": {
"id": 46525,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46524,
"indexed": false,
"mutability": "mutable",
"name": "orderIndex",
"nameLocation": "874:10:54",
"nodeType": "VariableDeclaration",
"scope": 46526,
"src": "867:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46523,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "867:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "866:19:54"
}
},
{
"id": 46531,
"nodeType": "EnumDefinition",
"src": "892:158:54",
"nodes": [],
"canonicalName": "OrderLib.SwapOrderState",
"members": [
{
"id": 46527,
"name": "Open",
"nameLocation": "922:4:54",
"nodeType": "EnumValue",
"src": "922:4:54"
},
{
"id": 46528,
"name": "Canceled",
"nameLocation": "928:8:54",
"nodeType": "EnumValue",
"src": "928:8:54"
},
{
"id": 46529,
"name": "Filled",
"nameLocation": "938:6:54",
"nodeType": "EnumValue",
"src": "938:6:54"
},
{
"id": 46530,
"name": "Expired",
"nameLocation": "946:7:54",
"nodeType": "EnumValue",
"src": "946:7:54"
}
],
"name": "SwapOrderState",
"nameLocation": "897:14:54"
},
{
"id": 46534,
"nodeType": "EnumDefinition",
"src": "1056:58:54",
"nodes": [],
"canonicalName": "OrderLib.Exchange",
"members": [
{
"id": 46532,
"name": "UniswapV2",
"nameLocation": "1080:9:54",
"nodeType": "EnumValue",
"src": "1080:9:54"
},
{
"id": 46533,
"name": "UniswapV3",
"nameLocation": "1099:9:54",
"nodeType": "EnumValue",
"src": "1099:9:54"
}
],
"name": "Exchange",
"nameLocation": "1061:8:54"
},
{
"id": 46540,
"nodeType": "StructDefinition",
"src": "1120:67:54",
"nodes": [],
"canonicalName": "OrderLib.Route",
"members": [
{
"constant": false,
"id": 46537,
"mutability": "mutable",
"name": "exchange",
"nameLocation": "1152:8:54",
"nodeType": "VariableDeclaration",
"scope": 46540,
"src": "1143:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
},
"typeName": {
"id": 46536,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46535,
"name": "Exchange",
"nameLocations": [
"1143:8:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46534,
"src": "1143:8:54"
},
"referencedDeclaration": 46534,
"src": "1143:8:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46539,
"mutability": "mutable",
"name": "fee",
"nameLocation": "1177:3:54",
"nodeType": "VariableDeclaration",
"scope": 46540,
"src": "1170:10:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 46538,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "1170:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
}
],
"name": "Route",
"nameLocation": "1127:5:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46560,
"nodeType": "StructDefinition",
"src": "1193:388:54",
"nodes": [],
"canonicalName": "OrderLib.SwapOrder",
"members": [
{
"constant": false,
"id": 46542,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "1228:7:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1220:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46541,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1220:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46544,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "1253:8:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1245:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46543,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1245:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46547,
"mutability": "mutable",
"name": "route",
"nameLocation": "1277:5:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1271:11:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage_ptr",
"typeString": "struct OrderLib.Route"
},
"typeName": {
"id": 46546,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46545,
"name": "Route",
"nameLocations": [
"1271:5:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46540,
"src": "1271:5:54"
},
"referencedDeclaration": 46540,
"src": "1271:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage_ptr",
"typeString": "struct OrderLib.Route"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46549,
"mutability": "mutable",
"name": "amount",
"nameLocation": "1300:6:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1292:14:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1292:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46551,
"mutability": "mutable",
"name": "amountIsInput",
"nameLocation": "1321:13:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1316:18:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46550,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1316:4:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46553,
"mutability": "mutable",
"name": "outputDirectlyToOwner",
"nameLocation": "1349:21:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1344:26:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46552,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1344:4:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46555,
"mutability": "mutable",
"name": "chainOrder",
"nameLocation": "1387:10:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1380:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46554,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "1380:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46559,
"mutability": "mutable",
"name": "tranches",
"nameLocation": "1566:8:54",
"nodeType": "VariableDeclaration",
"scope": 46560,
"src": "1556:18:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.Tranche[]"
},
"typeName": {
"baseType": {
"id": 46557,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46556,
"name": "Tranche",
"nameLocations": [
"1556:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46635,
"src": "1556:7:54"
},
"referencedDeclaration": 46635,
"src": "1556:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
}
},
"id": 46558,
"nodeType": "ArrayTypeName",
"src": "1556:9:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.Tranche[]"
}
},
"visibility": "internal"
}
],
"name": "SwapOrder",
"nameLocation": "1200:9:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46581,
"nodeType": "StructDefinition",
"src": "1587:350:54",
"nodes": [],
"canonicalName": "OrderLib.SwapOrderStatus",
"members": [
{
"constant": false,
"id": 46563,
"mutability": "mutable",
"name": "order",
"nameLocation": "1630:5:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1620:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
},
"typeName": {
"id": 46562,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46561,
"name": "SwapOrder",
"nameLocations": [
"1620:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "1620:9:54"
},
"referencedDeclaration": 46560,
"src": "1620:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46566,
"mutability": "mutable",
"name": "state",
"nameLocation": "1660:5:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1645:20:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
},
"typeName": {
"id": 46565,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46564,
"name": "SwapOrderState",
"nameLocations": [
"1645:14:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46531,
"src": "1645:14:54"
},
"referencedDeclaration": 46531,
"src": "1645:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46568,
"mutability": "mutable",
"name": "start",
"nameLocation": "1682:5:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1675:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 46567,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "1675:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46570,
"mutability": "mutable",
"name": "ocoGroup",
"nameLocation": "1704:8:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1697:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46569,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "1697:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46572,
"mutability": "mutable",
"name": "filledIn",
"nameLocation": "1730:8:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1722:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46571,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1722:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46574,
"mutability": "mutable",
"name": "filledOut",
"nameLocation": "1766:9:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1758:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46573,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1758:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46577,
"mutability": "mutable",
"name": "trancheFilledIn",
"nameLocation": "1804:15:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1794:25:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 46575,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1794:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46576,
"nodeType": "ArrayTypeName",
"src": "1794:9:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46580,
"mutability": "mutable",
"name": "trancheFilledOut",
"nameLocation": "1876:16:54",
"nodeType": "VariableDeclaration",
"scope": 46581,
"src": "1866:26: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": "1866:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46579,
"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": 47919,
"visibility": "public"
},
{
"id": 46585,
"nodeType": "EnumDefinition",
"src": "1943:71:54",
"nodes": [],
"canonicalName": "OrderLib.ConstraintMode",
"members": [
{
"id": 46582,
"name": "Time",
"nameLocation": "1973:4:54",
"nodeType": "EnumValue",
"src": "1973:4:54"
},
{
"id": 46583,
"name": "Line",
"nameLocation": "1987:4:54",
"nodeType": "EnumValue",
"src": "1987:4:54"
},
{
"id": 46584,
"name": "Barrier",
"nameLocation": "2001:7:54",
"nodeType": "EnumValue",
"src": "2001:7:54"
}
],
"name": "ConstraintMode",
"nameLocation": "1948:14:54"
},
{
"id": 46591,
"nodeType": "StructDefinition",
"src": "2020:162:54",
"nodes": [],
"canonicalName": "OrderLib.Constraint",
"members": [
{
"constant": false,
"id": 46588,
"mutability": "mutable",
"name": "mode",
"nameLocation": "2063:4:54",
"nodeType": "VariableDeclaration",
"scope": 46591,
"src": "2048:19:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
},
"typeName": {
"id": 46587,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46586,
"name": "ConstraintMode",
"nameLocations": [
"2048:14:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46585,
"src": "2048:14:54"
},
"referencedDeclaration": 46585,
"src": "2048:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46590,
"mutability": "mutable",
"name": "constraint",
"nameLocation": "2103:10:54",
"nodeType": "VariableDeclaration",
"scope": 46591,
"src": "2097:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 46589,
"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": 47919,
"visibility": "public"
},
{
"id": 46602,
"nodeType": "StructDefinition",
"src": "2188:180:54",
"nodes": [],
"canonicalName": "OrderLib.LineConstraint",
"members": [
{
"constant": false,
"id": 46593,
"mutability": "mutable",
"name": "isAbove",
"nameLocation": "2225:7:54",
"nodeType": "VariableDeclaration",
"scope": 46602,
"src": "2220:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46592,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2220:4:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46595,
"mutability": "mutable",
"name": "isRatio",
"nameLocation": "2247:7:54",
"nodeType": "VariableDeclaration",
"scope": 46602,
"src": "2242:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 46594,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2242:4:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46597,
"mutability": "mutable",
"name": "time",
"nameLocation": "2271:4:54",
"nodeType": "VariableDeclaration",
"scope": 46602,
"src": "2264:11:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 46596,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2264:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46599,
"mutability": "mutable",
"name": "valueSqrtX96",
"nameLocation": "2293:12:54",
"nodeType": "VariableDeclaration",
"scope": 46602,
"src": "2285:20:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 46598,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "2285:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46601,
"mutability": "mutable",
"name": "slopeSqrtX96",
"nameLocation": "2322:12:54",
"nodeType": "VariableDeclaration",
"scope": 46602,
"src": "2315:19:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
},
"typeName": {
"id": 46600,
"name": "int160",
"nodeType": "ElementaryTypeName",
"src": "2315:6:54",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"visibility": "internal"
}
],
"name": "LineConstraint",
"nameLocation": "2195:14:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46605,
"nodeType": "EnumDefinition",
"src": "2374:144:54",
"nodes": [],
"canonicalName": "OrderLib.TimeMode",
"members": [
{
"id": 46603,
"name": "Timestamp",
"nameLocation": "2398:9:54",
"nodeType": "EnumValue",
"src": "2398:9:54"
},
{
"id": 46604,
"name": "SinceOrderStart",
"nameLocation": "2439:15:54",
"nodeType": "EnumValue",
"src": "2439:15:54"
}
],
"name": "TimeMode",
"nameLocation": "2379:8:54"
},
{
"id": 46611,
"nodeType": "StructDefinition",
"src": "2524:63:54",
"nodes": [],
"canonicalName": "OrderLib.Time",
"members": [
{
"constant": false,
"id": 46608,
"mutability": "mutable",
"name": "mode",
"nameLocation": "2555:4:54",
"nodeType": "VariableDeclaration",
"scope": 46611,
"src": "2546:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
},
"typeName": {
"id": 46607,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46606,
"name": "TimeMode",
"nameLocations": [
"2546:8:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46605,
"src": "2546:8:54"
},
"referencedDeclaration": 46605,
"src": "2546:8:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46610,
"mutability": "mutable",
"name": "time",
"nameLocation": "2576:4:54",
"nodeType": "VariableDeclaration",
"scope": 46611,
"src": "2569:11:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 46609,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2569:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
}
],
"name": "Time",
"nameLocation": "2531:4:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46614,
"nodeType": "VariableDeclaration",
"src": "2593:32:54",
"nodes": [],
"constant": true,
"mutability": "constant",
"name": "DISTANT_PAST",
"nameLocation": "2609:12:54",
"scope": 47919,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 46612,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2593:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": {
"hexValue": "30",
"id": 46613,
"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": 46621,
"nodeType": "VariableDeclaration",
"src": "2631:49:54",
"nodes": [],
"constant": true,
"mutability": "constant",
"name": "DISTANT_FUTURE",
"nameLocation": "2647:14:54",
"scope": 47919,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 46615,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2631:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": {
"expression": {
"arguments": [
{
"id": 46618,
"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": 46617,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2669:6:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
}
],
"id": 46616,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "2664:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 46619,
"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": 46620,
"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": 46628,
"nodeType": "StructDefinition",
"src": "2687:73:54",
"nodes": [],
"canonicalName": "OrderLib.TimeConstraint",
"members": [
{
"constant": false,
"id": 46624,
"mutability": "mutable",
"name": "earliest",
"nameLocation": "2724:8:54",
"nodeType": "VariableDeclaration",
"scope": 46628,
"src": "2719:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_storage_ptr",
"typeString": "struct OrderLib.Time"
},
"typeName": {
"id": 46623,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46622,
"name": "Time",
"nameLocations": [
"2719:4:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46611,
"src": "2719:4:54"
},
"referencedDeclaration": 46611,
"src": "2719:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_storage_ptr",
"typeString": "struct OrderLib.Time"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46627,
"mutability": "mutable",
"name": "latest",
"nameLocation": "2747:6:54",
"nodeType": "VariableDeclaration",
"scope": 46628,
"src": "2742:11:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_storage_ptr",
"typeString": "struct OrderLib.Time"
},
"typeName": {
"id": 46626,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46625,
"name": "Time",
"nameLocations": [
"2742:4:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46611,
"src": "2742:4:54"
},
"referencedDeclaration": 46611,
"src": "2742:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_storage_ptr",
"typeString": "struct OrderLib.Time"
}
},
"visibility": "internal"
}
],
"name": "TimeConstraint",
"nameLocation": "2694:14:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46635,
"nodeType": "StructDefinition",
"src": "2766:174:54",
"nodes": [],
"canonicalName": "OrderLib.Tranche",
"members": [
{
"constant": false,
"id": 46630,
"mutability": "mutable",
"name": "fraction",
"nameLocation": "2798:8:54",
"nodeType": "VariableDeclaration",
"scope": 46635,
"src": "2791:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 46629,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "2791:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46634,
"mutability": "mutable",
"name": "constraints",
"nameLocation": "2922:11:54",
"nodeType": "VariableDeclaration",
"scope": 46635,
"src": "2909:24:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.Constraint[]"
},
"typeName": {
"baseType": {
"id": 46632,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46631,
"name": "Constraint",
"nameLocations": [
"2909:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46591,
"src": "2909:10:54"
},
"referencedDeclaration": 46591,
"src": "2909:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint"
}
},
"id": 46633,
"nodeType": "ArrayTypeName",
"src": "2909:12:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.Constraint[]"
}
},
"visibility": "internal"
}
],
"name": "Tranche",
"nameLocation": "2773:7:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46638,
"nodeType": "StructDefinition",
"src": "2946:61:54",
"nodes": [],
"canonicalName": "OrderLib.PriceProof",
"members": [
{
"constant": false,
"id": 46637,
"mutability": "mutable",
"name": "proof",
"nameLocation": "2995:5:54",
"nodeType": "VariableDeclaration",
"scope": 46638,
"src": "2990:10:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46636,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2990:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "PriceProof",
"nameLocation": "2953:10:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46642,
"nodeType": "EnumDefinition",
"src": "3013:97:54",
"nodes": [],
"canonicalName": "OrderLib.OcoMode",
"members": [
{
"id": 46639,
"name": "NO_OCO",
"nameLocation": "3036:6:54",
"nodeType": "EnumValue",
"src": "3036:6:54"
},
{
"id": 46640,
"name": "CANCEL_ON_PARTIAL_FILL",
"nameLocation": "3052:22:54",
"nodeType": "EnumValue",
"src": "3052:22:54"
},
{
"id": 46641,
"name": "CANCEL_ON_COMPLETION",
"nameLocation": "3084:20:54",
"nodeType": "EnumValue",
"src": "3084:20:54"
}
],
"name": "OcoMode",
"nameLocation": "3018:7:54"
},
{
"id": 46650,
"nodeType": "StructDefinition",
"src": "3116:167:54",
"nodes": [],
"canonicalName": "OrderLib.OcoGroup",
"members": [
{
"constant": false,
"id": 46645,
"mutability": "mutable",
"name": "mode",
"nameLocation": "3150:4:54",
"nodeType": "VariableDeclaration",
"scope": 46650,
"src": "3142:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"typeName": {
"id": 46644,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46643,
"name": "OcoMode",
"nameLocations": [
"3142:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46642,
"src": "3142:7:54"
},
"referencedDeclaration": 46642,
"src": "3142:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46647,
"mutability": "mutable",
"name": "startIndex",
"nameLocation": "3171:10:54",
"nodeType": "VariableDeclaration",
"scope": 46650,
"src": "3164:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46646,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3164:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46649,
"mutability": "mutable",
"name": "num",
"nameLocation": "3233:3:54",
"nodeType": "VariableDeclaration",
"scope": 46650,
"src": "3227:9:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 46648,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "3227:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"name": "OcoGroup",
"nameLocation": "3123:8:54",
"scope": 47919,
"visibility": "public"
},
{
"id": 46685,
"nodeType": "FunctionDefinition",
"src": "3289:226:54",
"nodes": [],
"body": {
"id": 46684,
"nodeType": "Block",
"src": "3368:147:54",
"nodes": [],
"statements": [
{
"assignments": [
46663
],
"declarations": [
{
"constant": false,
"id": 46663,
"mutability": "mutable",
"name": "orders",
"nameLocation": "3397:6:54",
"nodeType": "VariableDeclaration",
"scope": 46684,
"src": "3378:25:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder[]"
},
"typeName": {
"baseType": {
"id": 46661,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46660,
"name": "SwapOrder",
"nameLocations": [
"3378:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "3378:9:54"
},
"referencedDeclaration": 46560,
"src": "3378:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"id": 46662,
"nodeType": "ArrayTypeName",
"src": "3378:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.SwapOrder[]"
}
},
"visibility": "internal"
}
],
"id": 46670,
"initialValue": {
"arguments": [
{
"hexValue": "31",
"id": 46668,
"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": 46667,
"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_$46560_memory_ptr_$dyn_memory_ptr_$",
"typeString": "function (uint256) pure returns (struct OrderLib.SwapOrder memory[] memory)"
},
"typeName": {
"baseType": {
"id": 46665,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46664,
"name": "SwapOrder",
"nameLocations": [
"3410:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "3410:9:54"
},
"referencedDeclaration": 46560,
"src": "3410:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"id": 46666,
"nodeType": "ArrayTypeName",
"src": "3410:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.SwapOrder[]"
}
}
},
"id": 46669,
"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_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3378:46:54"
},
{
"expression": {
"id": 46675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 46671,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46663,
"src": "3434:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 46673,
"indexExpression": {
"hexValue": "30",
"id": 46672,
"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_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 46674,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46656,
"src": "3446:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"src": "3434:17:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46676,
"nodeType": "ExpressionStatement",
"src": "3434:17:54"
},
{
"expression": {
"arguments": [
{
"id": 46678,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46653,
"src": "3481:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
{
"id": 46679,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46663,
"src": "3486:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
{
"expression": {
"id": 46680,
"name": "OcoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46642,
"src": "3493:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_OcoMode_$46642_$",
"typeString": "type(enum OrderLib.OcoMode)"
}
},
"id": 46681,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3501:6:54",
"memberName": "NO_OCO",
"nodeType": "MemberAccess",
"referencedDeclaration": 46639,
"src": "3493:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
},
{
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
},
{
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
],
"id": 46677,
"name": "_placeOrders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47018,
"src": "3468:12:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46506_storage_ptr_$_t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr_$_t_enum$_OcoMode_$46642_$returns$__$",
"typeString": "function (struct OrderLib.OrdersInfo storage pointer,struct OrderLib.SwapOrder memory[] memory,enum OrderLib.OcoMode)"
}
},
"id": 46682,
"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": 46658,
"id": 46683,
"nodeType": "Return",
"src": "3461:47:54"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_placeOrder",
"nameLocation": "3298:11:54",
"parameters": {
"id": 46657,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46653,
"mutability": "mutable",
"name": "self",
"nameLocation": "3329:4:54",
"nodeType": "VariableDeclaration",
"scope": 46685,
"src": "3310:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 46652,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46651,
"name": "OrdersInfo",
"nameLocations": [
"3310:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "3310:10:54"
},
"referencedDeclaration": 46506,
"src": "3310:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46656,
"mutability": "mutable",
"name": "order",
"nameLocation": "3352:5:54",
"nodeType": "VariableDeclaration",
"scope": 46685,
"src": "3335:22:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder"
},
"typeName": {
"id": 46655,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46654,
"name": "SwapOrder",
"nameLocations": [
"3335:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "3335:9:54"
},
"referencedDeclaration": 46560,
"src": "3335:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"visibility": "internal"
}
],
"src": "3309:49:54"
},
"returnParameters": {
"id": 46658,
"nodeType": "ParameterList",
"parameters": [],
"src": "3368:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 47018,
"nodeType": "FunctionDefinition",
"src": "3521:2345:54",
"nodes": [],
"body": {
"id": 47017,
"nodeType": "Block",
"src": "3621:2245:54",
"nodes": [],
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 46706,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 46699,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46692,
"src": "3639:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 46700,
"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": 46703,
"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": 46702,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "3660:5:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
}
],
"id": 46701,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "3655:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 46704,
"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": 46705,
"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": 46698,
"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": 46707,
"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": 46708,
"nodeType": "ExpressionStatement",
"src": "3631:40:54"
},
{
"assignments": [
46710
],
"declarations": [
{
"constant": false,
"id": 46710,
"mutability": "mutable",
"name": "startIndex",
"nameLocation": "3688:10:54",
"nodeType": "VariableDeclaration",
"scope": 47017,
"src": "3681:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46709,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3681:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"id": 46717,
"initialValue": {
"arguments": [
{
"expression": {
"expression": {
"id": 46713,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "3708:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46714,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3713:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "3708:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 46715,
"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": 46712,
"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": 46711,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3701:6:54",
"typeDescriptions": {}
}
},
"id": 46716,
"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": 46725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46719,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46710,
"src": "3745:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 46722,
"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": 46721,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3763:6:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
}
],
"id": 46720,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "3758:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 46723,
"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": 46724,
"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": 46718,
"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": 46726,
"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": 46727,
"nodeType": "ExpressionStatement",
"src": "3737:38:54"
},
{
"assignments": [
46729
],
"declarations": [
{
"constant": false,
"id": 46729,
"mutability": "mutable",
"name": "ocoGroup",
"nameLocation": "3792:8:54",
"nodeType": "VariableDeclaration",
"scope": 47017,
"src": "3785:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 46728,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3785:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"id": 46730,
"nodeType": "VariableDeclarationStatement",
"src": "3785:15:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"id": 46734,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46731,
"name": "ocoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46695,
"src": "3814:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 46732,
"name": "OcoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46642,
"src": "3825:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_OcoMode_$46642_$",
"typeString": "type(enum OrderLib.OcoMode)"
}
},
"id": 46733,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3833:6:54",
"memberName": "NO_OCO",
"nodeType": "MemberAccess",
"referencedDeclaration": 46639,
"src": "3825:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"src": "3814:25:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 46747,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"id": 46742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46739,
"name": "ocoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46695,
"src": "3897:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 46740,
"name": "OcoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46642,
"src": "3908:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_OcoMode_$46642_$",
"typeString": "type(enum OrderLib.OcoMode)"
}
},
"id": 46741,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3916:22:54",
"memberName": "CANCEL_ON_PARTIAL_FILL",
"nodeType": "MemberAccess",
"referencedDeclaration": 46640,
"src": "3908:30:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"src": "3897:41:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"id": 46746,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46743,
"name": "ocoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46695,
"src": "3942:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 46744,
"name": "OcoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46642,
"src": "3953:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_OcoMode_$46642_$",
"typeString": "type(enum OrderLib.OcoMode)"
}
},
"id": 46745,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "3961:20:54",
"memberName": "CANCEL_ON_COMPLETION",
"nodeType": "MemberAccess",
"referencedDeclaration": 46641,
"src": "3953:28:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"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": 46775,
"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": 46774,
"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": 46776,
"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": 46777,
"nodeType": "ExpressionStatement",
"src": "4160:14:54"
},
"id": 46778,
"nodeType": "IfStatement",
"src": "3892:282:54",
"trueBody": {
"id": 46773,
"nodeType": "Block",
"src": "3983:151:54",
"statements": [
{
"expression": {
"id": 46755,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 46748,
"name": "ocoGroup",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46729,
"src": "3997:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"expression": {
"expression": {
"id": 46751,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "4015:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46752,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4020:9:54",
"memberName": "ocoGroups",
"nodeType": "MemberAccess",
"referencedDeclaration": 46505,
"src": "4015:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage",
"typeString": "struct OrderLib.OcoGroup storage ref[] storage ref"
}
},
"id": 46753,
"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": 46750,
"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": 46749,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "4008:6:54",
"typeDescriptions": {}
}
},
"id": 46754,
"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": 46756,
"nodeType": "ExpressionStatement",
"src": "3997:40:54"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 46763,
"name": "ocoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46695,
"src": "4080:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
{
"id": 46764,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46710,
"src": "4089:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
{
"arguments": [
{
"expression": {
"id": 46767,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46692,
"src": "4107:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 46768,
"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": 46766,
"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": 46765,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "4101:5:54",
"typeDescriptions": {}
}
},
"id": 46769,
"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_$46642",
"typeString": "enum OrderLib.OcoMode"
},
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 46762,
"name": "OcoGroup",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46650,
"src": "4071:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_OcoGroup_$46650_storage_ptr_$",
"typeString": "type(struct OrderLib.OcoGroup storage pointer)"
}
},
"id": 46770,
"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_$46650_memory_ptr",
"typeString": "struct OrderLib.OcoGroup memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OcoGroup_$46650_memory_ptr",
"typeString": "struct OrderLib.OcoGroup memory"
}
],
"expression": {
"expression": {
"id": 46757,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "4051:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46760,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4056:9:54",
"memberName": "ocoGroups",
"nodeType": "MemberAccess",
"referencedDeclaration": 46505,
"src": "4051:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage",
"typeString": "struct OrderLib.OcoGroup storage ref[] storage ref"
}
},
"id": 46761,
"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_$46650_storage_$dyn_storage_ptr_$_t_struct$_OcoGroup_$46650_storage_$returns$__$attached_to$_t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage_ptr_$",
"typeString": "function (struct OrderLib.OcoGroup storage ref[] storage pointer,struct OrderLib.OcoGroup storage ref)"
}
},
"id": 46771,
"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": 46772,
"nodeType": "ExpressionStatement",
"src": "4051:72:54"
}
]
}
},
"id": 46779,
"nodeType": "IfStatement",
"src": "3810:364:54",
"trueBody": {
"expression": {
"id": 46737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 46735,
"name": "ocoGroup",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46729,
"src": "3854:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 46736,
"name": "NO_OCO_INDEX",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46495,
"src": "3865:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "3854:23:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"id": 46738,
"nodeType": "ExpressionStatement",
"src": "3854:23:54"
}
},
{
"body": {
"id": 47006,
"nodeType": "Block",
"src": "4227:1567:54",
"statements": [
{
"assignments": [
46793
],
"declarations": [
{
"constant": false,
"id": 46793,
"mutability": "mutable",
"name": "order",
"nameLocation": "4258:5:54",
"nodeType": "VariableDeclaration",
"scope": 47006,
"src": "4241:22:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder"
},
"typeName": {
"id": 46792,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46791,
"name": "SwapOrder",
"nameLocations": [
"4241:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "4241:9:54"
},
"referencedDeclaration": 46560,
"src": "4241:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"visibility": "internal"
}
],
"id": 46797,
"initialValue": {
"baseExpression": {
"id": 46794,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46692,
"src": "4266:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 46796,
"indexExpression": {
"id": 46795,
"name": "o",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46781,
"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_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4241:34:54"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
},
"id": 46804,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 46799,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4297:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46800,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4303:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "4297:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_memory_ptr",
"typeString": "struct OrderLib.Route memory"
}
},
"id": 46801,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4309:8:54",
"memberName": "exchange",
"nodeType": "MemberAccess",
"referencedDeclaration": 46537,
"src": "4297:20:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 46802,
"name": "Exchange",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46534,
"src": "4321:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Exchange_$46534_$",
"typeString": "type(enum OrderLib.Exchange)"
}
},
"id": 46803,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "4330:9:54",
"memberName": "UniswapV3",
"nodeType": "MemberAccess",
"referencedDeclaration": 46533,
"src": "4321:18:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
}
},
"src": "4297:42:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5552",
"id": 46805,
"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": 46798,
"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": 46806,
"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": 46807,
"nodeType": "ExpressionStatement",
"src": "4289:57:54"
},
{
"assignments": [
46809
],
"declarations": [
{
"constant": false,
"id": 46809,
"mutability": "mutable",
"name": "orderIndex",
"nameLocation": "4565:10:54",
"nodeType": "VariableDeclaration",
"scope": 47006,
"src": "4560:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46808,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4560:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 46813,
"initialValue": {
"expression": {
"expression": {
"id": 46810,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "4578:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46811,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4583:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "4578:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 46812,
"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": 46814,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "4610:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46817,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4615:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "4610:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 46818,
"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_$46581_storage_$dyn_storage_ptr_$returns$_t_struct$_SwapOrderStatus_$46581_storage_$attached_to$_t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage_ptr_$",
"typeString": "function (struct OrderLib.SwapOrderStatus storage ref[] storage pointer) returns (struct OrderLib.SwapOrderStatus storage ref)"
}
},
"id": 46819,
"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_$46581_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref"
}
},
"id": 46820,
"nodeType": "ExpressionStatement",
"src": "4610:18:54"
},
{
"assignments": [
46823
],
"declarations": [
{
"constant": false,
"id": 46823,
"mutability": "mutable",
"name": "status",
"nameLocation": "4666:6:54",
"nodeType": "VariableDeclaration",
"scope": 47006,
"src": "4642:30:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
},
"typeName": {
"id": 46822,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46821,
"name": "SwapOrderStatus",
"nameLocations": [
"4642:15:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46581,
"src": "4642:15:54"
},
"referencedDeclaration": 46581,
"src": "4642:15:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
}
},
"visibility": "internal"
}
],
"id": 46828,
"initialValue": {
"baseExpression": {
"expression": {
"id": 46824,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46688,
"src": "4675:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 46825,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4680:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "4675:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 46827,
"indexExpression": {
"id": 46826,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46809,
"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_$46581_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4642:56:54"
},
{
"expression": {
"id": 46836,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46829,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4712:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46832,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4719:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4712:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46833,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4725:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "4712:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46834,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4734:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46835,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4740:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "4734:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4712:34:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46837,
"nodeType": "ExpressionStatement",
"src": "4712:34:54"
},
{
"expression": {
"id": 46845,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46838,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4760:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46841,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4767:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4760:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46842,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4773:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "4760:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46843,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4789:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46844,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4795:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "4789:19:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4760:48:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 46846,
"nodeType": "ExpressionStatement",
"src": "4760:48:54"
},
{
"expression": {
"id": 46854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46847,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4822:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46850,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4829:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4822:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46851,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4835:7:54",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46542,
"src": "4822:20:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46852,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4845:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46853,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4851:7:54",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46542,
"src": "4845:13:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4822:36:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 46855,
"nodeType": "ExpressionStatement",
"src": "4822:36:54"
},
{
"expression": {
"id": 46863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46856,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4872:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46859,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4879:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4872:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46860,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4885:8:54",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46544,
"src": "4872:21:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46861,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4896:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46862,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4902:8:54",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46544,
"src": "4896:14:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4872:38:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 46864,
"nodeType": "ExpressionStatement",
"src": "4872:38:54"
},
{
"expression": {
"id": 46872,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46865,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4924:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46868,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4931:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4924:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46869,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4937:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "4924:18:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46870,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4945:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46871,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4951:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "4945:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_memory_ptr",
"typeString": "struct OrderLib.Route memory"
}
},
"src": "4924:32:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"id": 46873,
"nodeType": "ExpressionStatement",
"src": "4924:32:54"
},
{
"expression": {
"id": 46881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46874,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "4970:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46877,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4977:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "4970:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46878,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "4983:10:54",
"memberName": "chainOrder",
"nodeType": "MemberAccess",
"referencedDeclaration": 46555,
"src": "4970:23:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46879,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "4996:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46880,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5002:10:54",
"memberName": "chainOrder",
"nodeType": "MemberAccess",
"referencedDeclaration": 46555,
"src": "4996:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "4970:42:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"id": 46882,
"nodeType": "ExpressionStatement",
"src": "4970:42:54"
},
{
"expression": {
"id": 46890,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"expression": {
"id": 46883,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5026:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46886,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5033:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "5026:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46887,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "5039:21:54",
"memberName": "outputDirectlyToOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 46553,
"src": "5026:34:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46888,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "5063:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46889,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5069:21:54",
"memberName": "outputDirectlyToOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 46553,
"src": "5063:27:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "5026:64:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 46891,
"nodeType": "ExpressionStatement",
"src": "5026:64:54"
},
{
"body": {
"id": 46981,
"nodeType": "Block",
"src": "5150:494:54",
"statements": [
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"expression": {
"expression": {
"id": 46904,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5168:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46908,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5175:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "5168:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46909,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5181:8:54",
"memberName": "tranches",
"nodeType": "MemberAccess",
"referencedDeclaration": 46559,
"src": "5168:21:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage",
"typeString": "struct OrderLib.Tranche storage ref[] storage ref"
}
},
"id": 46910,
"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_$46635_storage_$dyn_storage_ptr_$returns$_t_struct$_Tranche_$46635_storage_$attached_to$_t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage_ptr_$",
"typeString": "function (struct OrderLib.Tranche storage ref[] storage pointer) returns (struct OrderLib.Tranche storage ref)"
}
},
"id": 46911,
"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_$46635_storage",
"typeString": "struct OrderLib.Tranche storage ref"
}
},
"id": 46912,
"nodeType": "ExpressionStatement",
"src": "5168:28:54"
},
{
"assignments": [
46917
],
"declarations": [
{
"constant": false,
"id": 46917,
"mutability": "mutable",
"name": "ot",
"nameLocation": "5238:2:54",
"nodeType": "VariableDeclaration",
"scope": 46981,
"src": "5214:26:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_memory_ptr",
"typeString": "struct OrderLib.Tranche"
},
"typeName": {
"id": 46916,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46915,
"name": "OrderLib.Tranche",
"nameLocations": [
"5214:8:54",
"5223:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46635,
"src": "5214:16:54"
},
"referencedDeclaration": 46635,
"src": "5214:16:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
}
},
"visibility": "internal"
}
],
"id": 46922,
"initialValue": {
"baseExpression": {
"expression": {
"id": 46918,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "5243:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46919,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5249:8:54",
"memberName": "tranches",
"nodeType": "MemberAccess",
"referencedDeclaration": 46559,
"src": "5243:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.Tranche memory[] memory"
}
},
"id": 46921,
"indexExpression": {
"id": 46920,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46893,
"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_$46635_memory_ptr",
"typeString": "struct OrderLib.Tranche memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5214:46:54"
},
{
"assignments": [
46927
],
"declarations": [
{
"constant": false,
"id": 46927,
"mutability": "mutable",
"name": "st",
"nameLocation": "5320:2:54",
"nodeType": "VariableDeclaration",
"scope": 46981,
"src": "5295:27:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
},
"typeName": {
"id": 46926,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46925,
"name": "OrderLib.Tranche",
"nameLocations": [
"5295:8:54",
"5304:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46635,
"src": "5295:16:54"
},
"referencedDeclaration": 46635,
"src": "5295:16:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
}
},
"visibility": "internal"
}
],
"id": 46933,
"initialValue": {
"baseExpression": {
"expression": {
"expression": {
"id": 46928,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5325:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46929,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5332:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "5325:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 46930,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5338:8:54",
"memberName": "tranches",
"nodeType": "MemberAccess",
"referencedDeclaration": 46559,
"src": "5325:21:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage",
"typeString": "struct OrderLib.Tranche storage ref[] storage ref"
}
},
"id": 46932,
"indexExpression": {
"id": 46931,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46893,
"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_$46635_storage",
"typeString": "struct OrderLib.Tranche storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5295:54:54"
},
{
"expression": {
"id": 46939,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 46934,
"name": "st",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46927,
"src": "5385:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 46936,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "5388:8:54",
"memberName": "fraction",
"nodeType": "MemberAccess",
"referencedDeclaration": 46630,
"src": "5385:11:54",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46937,
"name": "ot",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46917,
"src": "5399:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_memory_ptr",
"typeString": "struct OrderLib.Tranche memory"
}
},
"id": 46938,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5402:8:54",
"memberName": "fraction",
"nodeType": "MemberAccess",
"referencedDeclaration": 46630,
"src": "5399:11:54",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "5385:25:54",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 46940,
"nodeType": "ExpressionStatement",
"src": "5385:25:54"
},
{
"body": {
"expression": {
"arguments": [
{
"baseExpression": {
"expression": {
"id": 46958,
"name": "ot",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46917,
"src": "5514:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_memory_ptr",
"typeString": "struct OrderLib.Tranche memory"
}
},
"id": 46959,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5517:11:54",
"memberName": "constraints",
"nodeType": "MemberAccess",
"referencedDeclaration": 46634,
"src": "5514:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.Constraint memory[] memory"
}
},
"id": 46961,
"indexExpression": {
"id": 46960,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46942,
"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_$46591_memory_ptr",
"typeString": "struct OrderLib.Constraint memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_Constraint_$46591_memory_ptr",
"typeString": "struct OrderLib.Constraint memory"
}
],
"expression": {
"expression": {
"id": 46953,
"name": "st",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46927,
"src": "5494:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 46956,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5497:11:54",
"memberName": "constraints",
"nodeType": "MemberAccess",
"referencedDeclaration": 46634,
"src": "5494:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage",
"typeString": "struct OrderLib.Constraint storage ref[] storage ref"
}
},
"id": 46957,
"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_$46591_storage_$dyn_storage_ptr_$_t_struct$_Constraint_$46591_storage_$returns$__$attached_to$_t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage_ptr_$",
"typeString": "function (struct OrderLib.Constraint storage ref[] storage pointer,struct OrderLib.Constraint storage ref)"
}
},
"id": 46962,
"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": 46963,
"nodeType": "ExpressionStatement",
"src": "5494:38:54"
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 46949,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46945,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46942,
"src": "5443:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"expression": {
"id": 46946,
"name": "ot",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46917,
"src": "5445:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_memory_ptr",
"typeString": "struct OrderLib.Tranche memory"
}
},
"id": 46947,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5448:11:54",
"memberName": "constraints",
"nodeType": "MemberAccess",
"referencedDeclaration": 46634,
"src": "5445:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.Constraint memory[] memory"
}
},
"id": 46948,
"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": 46964,
"initializationExpression": {
"assignments": [
46942
],
"declarations": [
{
"constant": false,
"id": 46942,
"mutability": "mutable",
"name": "c",
"nameLocation": "5438:1:54",
"nodeType": "VariableDeclaration",
"scope": 46964,
"src": "5433:6:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46941,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5433:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 46944,
"initialValue": {
"hexValue": "30",
"id": 46943,
"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": 46951,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "5468:3:54",
"subExpression": {
"id": 46950,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46942,
"src": "5468:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46952,
"nodeType": "ExpressionStatement",
"src": "5468:3:54"
},
"nodeType": "ForStatement",
"src": "5428:104:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 46970,
"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": 46965,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5550:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46968,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5557:15:54",
"memberName": "trancheFilledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46577,
"src": "5550:22:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 46969,
"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": 46971,
"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": 46972,
"nodeType": "ExpressionStatement",
"src": "5550:30:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 46978,
"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": 46973,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5598:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46976,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5605:16:54",
"memberName": "trancheFilledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46580,
"src": "5598:23:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 46977,
"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": 46979,
"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": 46980,
"nodeType": "ExpressionStatement",
"src": "5598:31:54"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 46900,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46896,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46893,
"src": "5119:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"expression": {
"id": 46897,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46793,
"src": "5121:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory"
}
},
"id": 46898,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5127:8:54",
"memberName": "tranches",
"nodeType": "MemberAccess",
"referencedDeclaration": 46559,
"src": "5121:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.Tranche memory[] memory"
}
},
"id": 46899,
"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": 46982,
"initializationExpression": {
"assignments": [
46893
],
"declarations": [
{
"constant": false,
"id": 46893,
"mutability": "mutable",
"name": "t",
"nameLocation": "5114:1:54",
"nodeType": "VariableDeclaration",
"scope": 46982,
"src": "5109:6:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 46892,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5109:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 46895,
"initialValue": {
"hexValue": "30",
"id": 46894,
"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": 46902,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "5144:3:54",
"subExpression": {
"id": 46901,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46893,
"src": "5144:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 46903,
"nodeType": "ExpressionStatement",
"src": "5144:3:54"
},
"nodeType": "ForStatement",
"src": "5104:540:54"
},
{
"expression": {
"id": 46988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 46983,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5657:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46985,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "5664:5:54",
"memberName": "state",
"nodeType": "MemberAccess",
"referencedDeclaration": 46566,
"src": "5657:12:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 46986,
"name": "SwapOrderState",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46531,
"src": "5672:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46531_$",
"typeString": "type(enum OrderLib.SwapOrderState)"
}
},
"id": 46987,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "5687:4:54",
"memberName": "Open",
"nodeType": "MemberAccess",
"referencedDeclaration": 46527,
"src": "5672:19:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"src": "5657:34:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"id": 46989,
"nodeType": "ExpressionStatement",
"src": "5657:34:54"
},
{
"expression": {
"id": 46998,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 46990,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5705:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 46992,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "5712:5:54",
"memberName": "start",
"nodeType": "MemberAccess",
"referencedDeclaration": 46568,
"src": "5705:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"expression": {
"id": 46995,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "5727:5:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 46996,
"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": 46994,
"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": 46993,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "5720:6:54",
"typeDescriptions": {}
}
},
"id": 46997,
"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": 46999,
"nodeType": "ExpressionStatement",
"src": "5705:38:54"
},
{
"expression": {
"id": 47004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 47000,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46823,
"src": "5757:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47002,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "5764:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"src": "5757:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 47003,
"name": "ocoGroup",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46729,
"src": "5775:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "5757:26:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"id": 47005,
"nodeType": "ExpressionStatement",
"src": "5757:26:54"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 46787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46784,
"name": "o",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46781,
"src": "4202:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"id": 46785,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46692,
"src": "4206:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 46786,
"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": 47007,
"initializationExpression": {
"assignments": [
46781
],
"declarations": [
{
"constant": false,
"id": 46781,
"mutability": "mutable",
"name": "o",
"nameLocation": "4195:1:54",
"nodeType": "VariableDeclaration",
"scope": 47007,
"src": "4189:7:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 46780,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "4189:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"id": 46783,
"initialValue": {
"hexValue": "30",
"id": 46782,
"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": 46789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "4221:3:54",
"subExpression": {
"id": 46788,
"name": "o",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46781,
"src": "4221:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 46790,
"nodeType": "ExpressionStatement",
"src": "4221:3:54"
},
"nodeType": "ForStatement",
"src": "4184:1610:54"
},
{
"eventCall": {
"arguments": [
{
"id": 47009,
"name": "startIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46710,
"src": "5827:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
{
"arguments": [
{
"expression": {
"id": 47012,
"name": "orders",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46692,
"src": "5844:6:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder memory[] memory"
}
},
"id": 47013,
"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": 47011,
"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": 47010,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "5838:5:54",
"typeDescriptions": {}
}
},
"id": 47014,
"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": 47008,
"name": "DexorderSwapPlaced",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46512,
"src": "5808:18:54",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint8_$returns$__$",
"typeString": "function (uint64,uint8)"
}
},
"id": 47015,
"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": 47016,
"nodeType": "EmitStatement",
"src": "5803:56:54"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_placeOrders",
"nameLocation": "3530:12:54",
"parameters": {
"id": 46696,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 46688,
"mutability": "mutable",
"name": "self",
"nameLocation": "3562:4:54",
"nodeType": "VariableDeclaration",
"scope": 47018,
"src": "3543:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 46687,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46686,
"name": "OrdersInfo",
"nameLocations": [
"3543:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "3543:10:54"
},
"referencedDeclaration": 46506,
"src": "3543:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46692,
"mutability": "mutable",
"name": "orders",
"nameLocation": "3587:6:54",
"nodeType": "VariableDeclaration",
"scope": 47018,
"src": "3568:25:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_memory_ptr_$dyn_memory_ptr",
"typeString": "struct OrderLib.SwapOrder[]"
},
"typeName": {
"baseType": {
"id": 46690,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46689,
"name": "SwapOrder",
"nameLocations": [
"3568:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "3568:9:54"
},
"referencedDeclaration": 46560,
"src": "3568:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"id": 46691,
"nodeType": "ArrayTypeName",
"src": "3568:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrder_$46560_storage_$dyn_storage_ptr",
"typeString": "struct OrderLib.SwapOrder[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 46695,
"mutability": "mutable",
"name": "ocoMode",
"nameLocation": "3603:7:54",
"nodeType": "VariableDeclaration",
"scope": 47018,
"src": "3595:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"typeName": {
"id": 46694,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 46693,
"name": "OcoMode",
"nameLocations": [
"3595:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46642,
"src": "3595:7:54"
},
"referencedDeclaration": 46642,
"src": "3595:7:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"visibility": "internal"
}
],
"src": "3542:69:54"
},
"returnParameters": {
"id": 46697,
"nodeType": "ParameterList",
"parameters": [],
"src": "3621:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 47685,
"nodeType": "FunctionDefinition",
"src": "6139:5574:54",
"nodes": [],
"body": {
"id": 47684,
"nodeType": "Block",
"src": "6264:5449:54",
"nodes": [],
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "65786563757465",
"id": 47036,
"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": 47033,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "6274:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47035,
"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": 47037,
"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": 47038,
"nodeType": "ExpressionStatement",
"src": "6274:23:54"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 47044,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "6328:4:54",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OrderLib_$47919",
"typeString": "library OrderLib"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_OrderLib_$47919",
"typeString": "library OrderLib"
}
],
"id": 47043,
"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": 47042,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6320:7:54",
"typeDescriptions": {}
}
},
"id": 47045,
"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": 47039,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "6307:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47041,
"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": 47046,
"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": 47047,
"nodeType": "ExpressionStatement",
"src": "6307:27:54"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 47053,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47025,
"src": "6362:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
],
"id": 47052,
"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": 47051,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6357:4:54",
"typeDescriptions": {}
}
},
"id": 47054,
"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": 47048,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "6344:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47050,
"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": 47055,
"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": 47056,
"nodeType": "ExpressionStatement",
"src": "6344:30:54"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 47062,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"src": "6402:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 47061,
"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": 47060,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6397:4:54",
"typeDescriptions": {}
}
},
"id": 47063,
"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": 47057,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "6384:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47059,
"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": 47064,
"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": 47065,
"nodeType": "ExpressionStatement",
"src": "6384:32:54"
},
{
"assignments": [
47068
],
"declarations": [
{
"constant": false,
"id": 47068,
"mutability": "mutable",
"name": "status",
"nameLocation": "6450:6:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "6426:30:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
},
"typeName": {
"id": 47067,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47066,
"name": "SwapOrderStatus",
"nameLocations": [
"6426:15:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46581,
"src": "6426:15:54"
},
"referencedDeclaration": 46581,
"src": "6426:15:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
}
},
"visibility": "internal"
}
],
"id": 47073,
"initialValue": {
"baseExpression": {
"expression": {
"id": 47069,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47021,
"src": "6459:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 47070,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6464:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "6459:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 47072,
"indexExpression": {
"id": 47071,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47025,
"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_$46581_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6426:56:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
},
"id": 47078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47074,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "6496:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47075,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6503:5:54",
"memberName": "state",
"nodeType": "MemberAccess",
"referencedDeclaration": 46566,
"src": "6496:12:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"expression": {
"id": 47076,
"name": "SwapOrderState",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46531,
"src": "6512:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46531_$",
"typeString": "type(enum OrderLib.SwapOrderState)"
}
},
"id": 47077,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "6527:4:54",
"memberName": "Open",
"nodeType": "MemberAccess",
"referencedDeclaration": 46527,
"src": "6512:19:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"src": "6496:35:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47083,
"nodeType": "IfStatement",
"src": "6492:65:54",
"trueBody": {
"expression": {
"arguments": [
{
"hexValue": "4e4f",
"id": 47080,
"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": 47079,
"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": 47081,
"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": 47082,
"nodeType": "ExpressionStatement",
"src": "6545:12:54"
}
},
{
"assignments": [
47086
],
"declarations": [
{
"constant": false,
"id": 47086,
"mutability": "mutable",
"name": "tranche",
"nameLocation": "6595:7:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "6579:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
},
"typeName": {
"id": 47085,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47084,
"name": "Tranche",
"nameLocations": [
"6579:7:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46635,
"src": "6579:7:54"
},
"referencedDeclaration": 46635,
"src": "6579:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche"
}
},
"visibility": "internal"
}
],
"id": 47092,
"initialValue": {
"baseExpression": {
"expression": {
"expression": {
"id": 47087,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "6605:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47088,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6612:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "6605:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47089,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6618:8:54",
"memberName": "tranches",
"nodeType": "MemberAccess",
"referencedDeclaration": 46559,
"src": "6605:21:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Tranche_$46635_storage_$dyn_storage",
"typeString": "struct OrderLib.Tranche storage ref[] storage ref"
}
},
"id": 47091,
"indexExpression": {
"id": 47090,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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_$46635_storage",
"typeString": "struct OrderLib.Tranche storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6579:61:54"
},
{
"assignments": [
47094
],
"declarations": [
{
"constant": false,
"id": 47094,
"mutability": "mutable",
"name": "sqrtPriceX96",
"nameLocation": "6658:12:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "6650:20:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 47093,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "6650:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"id": 47096,
"initialValue": {
"hexValue": "30",
"id": 47095,
"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": [
47098
],
"declarations": [
{
"constant": false,
"id": 47098,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "6692:17:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "6684:25:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 47097,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "6684:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"id": 47100,
"initialValue": {
"hexValue": "30",
"id": 47099,
"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": [
47102
],
"declarations": [
{
"constant": false,
"id": 47102,
"mutability": "mutable",
"name": "pool",
"nameLocation": "6812:4:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "6804:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47101,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6804:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 47117,
"initialValue": {
"arguments": [
{
"expression": {
"expression": {
"id": 47106,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "6854:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47107,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6861:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "6854:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47108,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6867:7:54",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46542,
"src": "6854:20:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"expression": {
"id": 47109,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "6876:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47110,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6883:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "6876:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47111,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6889:8:54",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46544,
"src": "6876:21:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"expression": {
"expression": {
"id": 47112,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "6899:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47113,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6906:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "6899:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47114,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6912:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "6899:18:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"id": 47115,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6918:3:54",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 46539,
"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": 47103,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46261,
"src": "6819:9:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46261_$",
"typeString": "type(library Constants)"
}
},
"id": 47104,
"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": 47105,
"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": 47116,
"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": 47401,
"nodeType": "Block",
"src": "6987:2592:54",
"statements": [
{
"assignments": [
47132
],
"declarations": [
{
"constant": false,
"id": 47132,
"mutability": "mutable",
"name": "constraint",
"nameLocation": "7020:10:54",
"nodeType": "VariableDeclaration",
"scope": 47401,
"src": "7001:29:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint"
},
"typeName": {
"id": 47131,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47130,
"name": "Constraint",
"nameLocations": [
"7001:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46591,
"src": "7001:10:54"
},
"referencedDeclaration": 46591,
"src": "7001:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint"
}
},
"visibility": "internal"
}
],
"id": 47137,
"initialValue": {
"baseExpression": {
"expression": {
"id": 47133,
"name": "tranche",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47086,
"src": "7033:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 47134,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7041:11:54",
"memberName": "constraints",
"nodeType": "MemberAccess",
"referencedDeclaration": 46634,
"src": "7033:19:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage",
"typeString": "struct OrderLib.Constraint storage ref[] storage ref"
}
},
"id": 47136,
"indexExpression": {
"id": 47135,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47119,
"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_$46591_storage",
"typeString": "struct OrderLib.Constraint storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7001:54:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
},
"id": 47142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47138,
"name": "constraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47132,
"src": "7073:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint storage pointer"
}
},
"id": 47139,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7084:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46588,
"src": "7073:15:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47140,
"name": "ConstraintMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46585,
"src": "7092:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46585_$",
"typeString": "type(enum OrderLib.ConstraintMode)"
}
},
"id": 47141,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7107:4:54",
"memberName": "Time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46582,
"src": "7092:19:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"src": "7073:38:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
},
"id": 47221,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47217,
"name": "constraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47132,
"src": "7711:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint storage pointer"
}
},
"id": 47218,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7722:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46588,
"src": "7711:15:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47219,
"name": "ConstraintMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46585,
"src": "7730:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46585_$",
"typeString": "type(enum OrderLib.ConstraintMode)"
}
},
"id": 47220,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7745:4:54",
"memberName": "Line",
"nodeType": "MemberAccess",
"referencedDeclaration": 46583,
"src": "7730:19:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"src": "7711:38:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
},
"id": 47382,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47378,
"name": "constraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47132,
"src": "9322:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint storage pointer"
}
},
"id": 47379,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9333:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46588,
"src": "9322:15:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47380,
"name": "ConstraintMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46585,
"src": "9341:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_ConstraintMode_$46585_$",
"typeString": "type(enum OrderLib.ConstraintMode)"
}
},
"id": 47381,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "9356:7:54",
"memberName": "Barrier",
"nodeType": "MemberAccess",
"referencedDeclaration": 46584,
"src": "9341:22:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ConstraintMode_$46585",
"typeString": "enum OrderLib.ConstraintMode"
}
},
"src": "9322:41:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"expression": {
"arguments": [
{
"hexValue": "5543",
"id": 47395,
"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": 47394,
"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": 47396,
"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": 47397,
"nodeType": "ExpressionStatement",
"src": "9537:12:54"
},
"id": 47398,
"nodeType": "IfStatement",
"src": "9318:231:54",
"trueBody": {
"id": 47393,
"nodeType": "Block",
"src": "9365:116:54",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "6261727269657220636f6e73747261696e74",
"id": 47386,
"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": 47383,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9383:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47385,
"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": 47387,
"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": 47388,
"nodeType": "ExpressionStatement",
"src": "9383:34:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "4e49",
"id": 47390,
"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": 47389,
"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": 47391,
"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": 47392,
"nodeType": "ExpressionStatement",
"src": "9435:12:54"
}
]
}
},
"id": 47399,
"nodeType": "IfStatement",
"src": "7707:1842:54",
"trueBody": {
"id": 47377,
"nodeType": "Block",
"src": "7751:1549:54",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "6c696e6520636f6e73747261696e74",
"id": 47225,
"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": 47222,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "7769:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47224,
"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": 47226,
"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": 47227,
"nodeType": "ExpressionStatement",
"src": "7769:31:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"id": 47230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47228,
"name": "sqrtPriceX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47094,
"src": "7822:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 47229,
"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": 47240,
"nodeType": "IfStatement",
"src": "7818:95:54",
"trueBody": {
"expression": {
"id": 47238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"components": [
{
"id": 47231,
"name": "sqrtPriceX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47094,
"src": "7863:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
null,
null,
null,
null,
null,
null
],
"id": 47232,
"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": 47234,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47102,
"src": "7900:4:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 47233,
"name": "IUniswapV3Pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 43894,
"src": "7885:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IUniswapV3Pool_$43894_$",
"typeString": "type(contract IUniswapV3Pool)"
}
},
"id": 47235,
"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": 47236,
"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": 47237,
"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": 47239,
"nodeType": "ExpressionStatement",
"src": "7862:51:54"
}
},
{
"assignments": [
47243
],
"declarations": [
{
"constant": false,
"id": 47243,
"mutability": "mutable",
"name": "lc",
"nameLocation": "7953:2:54",
"nodeType": "VariableDeclaration",
"scope": 47377,
"src": "7931:24:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint"
},
"typeName": {
"id": 47242,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47241,
"name": "LineConstraint",
"nameLocations": [
"7931:14:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46602,
"src": "7931:14:54"
},
"referencedDeclaration": 46602,
"src": "7931:14:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_storage_ptr",
"typeString": "struct OrderLib.LineConstraint"
}
},
"visibility": "internal"
}
],
"id": 47251,
"initialValue": {
"arguments": [
{
"expression": {
"id": 47246,
"name": "constraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47132,
"src": "7969:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint storage pointer"
}
},
"id": 47247,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7980:10:54",
"memberName": "constraint",
"nodeType": "MemberAccess",
"referencedDeclaration": 46590,
"src": "7969:21:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage",
"typeString": "bytes storage ref"
}
},
{
"components": [
{
"id": 47248,
"name": "LineConstraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46602,
"src": "7993:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_LineConstraint_$46602_storage_ptr_$",
"typeString": "type(struct OrderLib.LineConstraint storage pointer)"
}
}
],
"id": 47249,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7992:16:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_LineConstraint_$46602_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_$46602_storage_ptr_$",
"typeString": "type(struct OrderLib.LineConstraint storage pointer)"
}
],
"expression": {
"id": 47244,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "7958:3:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 47245,
"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": 47250,
"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_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7931:78:54"
},
{
"assignments": [
47253
],
"declarations": [
{
"constant": false,
"id": 47253,
"mutability": "mutable",
"name": "price",
"nameLocation": "8035:5:54",
"nodeType": "VariableDeclaration",
"scope": 47377,
"src": "8027:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47252,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8027:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47255,
"initialValue": {
"id": 47254,
"name": "sqrtPriceX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47094,
"src": "8043:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8027:28:54"
},
{
"condition": {
"expression": {
"id": 47256,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8077:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47257,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8080:7:54",
"memberName": "isRatio",
"nodeType": "MemberAccess",
"referencedDeclaration": 46595,
"src": "8077:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47262,
"nodeType": "IfStatement",
"src": "8073:68:54",
"trueBody": {
"expression": {
"arguments": [
{
"hexValue": "726174696f206e6f7420696d706c656d656e746564",
"id": 47259,
"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": 47258,
"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": 47260,
"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": 47261,
"nodeType": "ExpressionStatement",
"src": "8110:31:54"
}
},
{
"assignments": [
47264
],
"declarations": [
{
"constant": false,
"id": 47264,
"mutability": "mutable",
"name": "limit256",
"nameLocation": "8307:8:54",
"nodeType": "VariableDeclaration",
"scope": 47377,
"src": "8300:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 47263,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "8300:6:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"id": 47273,
"initialValue": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 47269,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8333:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47270,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8336:12:54",
"memberName": "valueSqrtX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 46599,
"src": "8333:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 47268,
"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": 47267,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8325:7:54",
"typeDescriptions": {}
}
},
"id": 47271,
"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": 47266,
"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": 47265,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "8318:6:54",
"typeDescriptions": {}
}
},
"id": 47272,
"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": 47277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47274,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8372:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47275,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8375:12:54",
"memberName": "slopeSqrtX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 46601,
"src": "8372:15:54",
"typeDescriptions": {
"typeIdentifier": "t_int160",
"typeString": "int160"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 47276,
"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": 47305,
"nodeType": "IfStatement",
"src": "8368:269:54",
"trueBody": {
"id": 47304,
"nodeType": "Block",
"src": "8395:242:54",
"statements": [
{
"expression": {
"id": 47294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 47278,
"name": "limit256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47264,
"src": "8470:8:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 47293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 47289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47281,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "8489:5:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 47282,
"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": 47283,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8507:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47284,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8510:4:54",
"memberName": "time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46597,
"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": 47280,
"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": 47279,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "8482:6:54",
"typeDescriptions": {}
}
},
"id": 47286,
"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": 47287,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8518:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47288,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8521:12:54",
"memberName": "slopeSqrtX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 46601,
"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": 47292,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 47290,
"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": 47291,
"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": 47295,
"nodeType": "ExpressionStatement",
"src": "8470:71:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 47298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47296,
"name": "limit256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47264,
"src": "8567:8:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"hexValue": "30",
"id": 47297,
"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": 47303,
"nodeType": "IfStatement",
"src": "8563:55:54",
"trueBody": {
"expression": {
"id": 47301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 47299,
"name": "limit256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47264,
"src": "8606:8:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "30",
"id": 47300,
"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": 47302,
"nodeType": "ExpressionStatement",
"src": "8606:12:54"
}
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 47309,
"name": "limit256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47264,
"src": "8667:8:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"expression": {
"id": 47306,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "8654:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47308,
"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": 47310,
"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": 47311,
"nodeType": "ExpressionStatement",
"src": "8654:22:54"
},
{
"expression": {
"arguments": [
{
"id": 47315,
"name": "price",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47253,
"src": "8707:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47312,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "8694:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47314,
"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": 47316,
"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": 47317,
"nodeType": "ExpressionStatement",
"src": "8694:19:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 47321,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8744:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47322,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8747:7:54",
"memberName": "isAbove",
"nodeType": "MemberAccess",
"referencedDeclaration": 46593,
"src": "8744:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"expression": {
"id": 47318,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "8731:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47320,
"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": 47323,
"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": 47324,
"nodeType": "ExpressionStatement",
"src": "8731:24:54"
},
{
"assignments": [
47326
],
"declarations": [
{
"constant": false,
"id": 47326,
"mutability": "mutable",
"name": "limit",
"nameLocation": "8781:5:54",
"nodeType": "VariableDeclaration",
"scope": 47377,
"src": "8773:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 47325,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "8773:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"id": 47334,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 47331,
"name": "limit256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47264,
"src": "8805:8:54",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_int256",
"typeString": "int256"
}
],
"id": 47330,
"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": 47329,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8797:7:54",
"typeDescriptions": {}
}
},
"id": 47332,
"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": 47328,
"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": 47327,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "8789:7:54",
"typeDescriptions": {}
}
},
"id": 47333,
"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": 47348,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 47340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47335,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8955:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47336,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8958:7:54",
"memberName": "isAbove",
"nodeType": "MemberAccess",
"referencedDeclaration": 46593,
"src": "8955:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47339,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47337,
"name": "price",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47253,
"src": "8969:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 47338,
"name": "limit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47326,
"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": 47347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47343,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "8987:11:54",
"subExpression": {
"expression": {
"id": 47341,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "8988:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47342,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "8991:7:54",
"memberName": "isAbove",
"nodeType": "MemberAccess",
"referencedDeclaration": 46593,
"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": 47346,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47344,
"name": "price",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47253,
"src": "9002:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 47345,
"name": "limit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47326,
"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": 47353,
"nodeType": "IfStatement",
"src": "8951:99:54",
"trueBody": {
"expression": {
"arguments": [
{
"hexValue": "4c",
"id": 47350,
"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": 47349,
"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": 47351,
"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": 47352,
"nodeType": "ExpressionStatement",
"src": "9039:11:54"
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 47371,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 47363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"id": 47356,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47354,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"src": "9072:17:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 47355,
"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": 47362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47357,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "9118:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47358,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9121:7:54",
"memberName": "isAbove",
"nodeType": "MemberAccess",
"referencedDeclaration": 46593,
"src": "9118:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"id": 47361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47359,
"name": "limit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47326,
"src": "9132:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 47360,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"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": 47370,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9181:11:54",
"subExpression": {
"expression": {
"id": 47364,
"name": "lc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47243,
"src": "9182:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_LineConstraint_$46602_memory_ptr",
"typeString": "struct OrderLib.LineConstraint memory"
}
},
"id": 47365,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9185:7:54",
"memberName": "isAbove",
"nodeType": "MemberAccess",
"referencedDeclaration": 46593,
"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": 47369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47367,
"name": "limit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47326,
"src": "9196:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 47368,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"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": 47376,
"nodeType": "IfStatement",
"src": "9068:217:54",
"trueBody": {
"expression": {
"id": 47374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 47372,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"src": "9260:17:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 47373,
"name": "limit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47326,
"src": "9280:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"src": "9260:25:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"id": 47375,
"nodeType": "ExpressionStatement",
"src": "9260:25:54"
}
}
]
}
},
"id": 47400,
"nodeType": "IfStatement",
"src": "7069:2480:54",
"trueBody": {
"id": 47216,
"nodeType": "Block",
"src": "7113:576:54",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "74696d6520636f6e73747261696e74",
"id": 47146,
"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": 47143,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "7131:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47145,
"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": 47147,
"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": 47148,
"nodeType": "ExpressionStatement",
"src": "7131:31:54"
},
{
"assignments": [
47151
],
"declarations": [
{
"constant": false,
"id": 47151,
"mutability": "mutable",
"name": "tc",
"nameLocation": "7202:2:54",
"nodeType": "VariableDeclaration",
"scope": 47216,
"src": "7180:24:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint"
},
"typeName": {
"id": 47150,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47149,
"name": "TimeConstraint",
"nameLocations": [
"7180:14:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46628,
"src": "7180:14:54"
},
"referencedDeclaration": 46628,
"src": "7180:14:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_storage_ptr",
"typeString": "struct OrderLib.TimeConstraint"
}
},
"visibility": "internal"
}
],
"id": 47159,
"initialValue": {
"arguments": [
{
"expression": {
"id": 47154,
"name": "constraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47132,
"src": "7218:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Constraint_$46591_storage_ptr",
"typeString": "struct OrderLib.Constraint storage pointer"
}
},
"id": 47155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7229:10:54",
"memberName": "constraint",
"nodeType": "MemberAccess",
"referencedDeclaration": 46590,
"src": "7218:21:54",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage",
"typeString": "bytes storage ref"
}
},
{
"components": [
{
"id": 47156,
"name": "TimeConstraint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46628,
"src": "7242:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_TimeConstraint_$46628_storage_ptr_$",
"typeString": "type(struct OrderLib.TimeConstraint storage pointer)"
}
}
],
"id": 47157,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "7241:16:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_TimeConstraint_$46628_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_$46628_storage_ptr_$",
"typeString": "type(struct OrderLib.TimeConstraint storage pointer)"
}
],
"expression": {
"id": 47152,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "7207:3:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 47153,
"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": 47158,
"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_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7180:78:54"
},
{
"assignments": [
47161
],
"declarations": [
{
"constant": false,
"id": 47161,
"mutability": "mutable",
"name": "time",
"nameLocation": "7283:4:54",
"nodeType": "VariableDeclaration",
"scope": 47216,
"src": "7276:11:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 47160,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "7276:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
}
],
"id": 47178,
"initialValue": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
},
"id": 47167,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 47162,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7290:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47163,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7293:8:54",
"memberName": "earliest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46624,
"src": "7290:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47164,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7302:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46608,
"src": "7290:16:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47165,
"name": "TimeMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46605,
"src": "7310:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_TimeMode_$46605_$",
"typeString": "type(enum OrderLib.TimeMode)"
}
},
"id": 47166,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7319:9:54",
"memberName": "Timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": 46603,
"src": "7310:18:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
}
},
"src": "7290:38:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 47176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47171,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "7350:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47172,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7357:5:54",
"memberName": "start",
"nodeType": "MemberAccess",
"referencedDeclaration": 46568,
"src": "7350:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"expression": {
"expression": {
"id": 47173,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7365:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47174,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7368:8:54",
"memberName": "earliest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46624,
"src": "7365:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47175,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7377:4:54",
"memberName": "time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46610,
"src": "7365:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "7350:31:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 47177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "7290:91:54",
"trueExpression": {
"expression": {
"expression": {
"id": 47168,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7331:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47169,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7334:8:54",
"memberName": "earliest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46624,
"src": "7331:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47170,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7343:4:54",
"memberName": "time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46610,
"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": 47182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47179,
"name": "time",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47161,
"src": "7403:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"expression": {
"id": 47180,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "7410:5:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 47181,
"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": 47187,
"nodeType": "IfStatement",
"src": "7399:60:54",
"trueBody": {
"expression": {
"arguments": [
{
"hexValue": "5445",
"id": 47184,
"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": 47183,
"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": 47185,
"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": 47186,
"nodeType": "ExpressionStatement",
"src": "7447:12:54"
}
},
{
"expression": {
"id": 47205,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 47188,
"name": "time",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47161,
"src": "7491:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
},
"id": 47194,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 47189,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7498:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47190,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7501:6:54",
"memberName": "latest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46627,
"src": "7498:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47191,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7508:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46608,
"src": "7498:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47192,
"name": "TimeMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46605,
"src": "7516:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_TimeMode_$46605_$",
"typeString": "type(enum OrderLib.TimeMode)"
}
},
"id": 47193,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "7525:9:54",
"memberName": "Timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": 46603,
"src": "7516:18:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_TimeMode_$46605",
"typeString": "enum OrderLib.TimeMode"
}
},
"src": "7498:36:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 47203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47198,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "7554:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47199,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7561:5:54",
"memberName": "start",
"nodeType": "MemberAccess",
"referencedDeclaration": 46568,
"src": "7554:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"expression": {
"expression": {
"id": 47200,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7569:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47201,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7572:6:54",
"memberName": "latest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46627,
"src": "7569:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47202,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7579:4:54",
"memberName": "time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46610,
"src": "7569:14:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "7554:29:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"id": 47204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "7498:85:54",
"trueExpression": {
"expression": {
"expression": {
"id": 47195,
"name": "tc",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47151,
"src": "7537:2:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_TimeConstraint_$46628_memory_ptr",
"typeString": "struct OrderLib.TimeConstraint memory"
}
},
"id": 47196,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7540:6:54",
"memberName": "latest",
"nodeType": "MemberAccess",
"referencedDeclaration": 46627,
"src": "7537:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Time_$46611_memory_ptr",
"typeString": "struct OrderLib.Time memory"
}
},
"id": 47197,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "7547:4:54",
"memberName": "time",
"nodeType": "MemberAccess",
"referencedDeclaration": 46610,
"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": 47206,
"nodeType": "ExpressionStatement",
"src": "7491:92:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47210,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47207,
"name": "time",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47161,
"src": "7605:4:54",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"id": 47208,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "7612:5:54",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 47209,
"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": 47215,
"nodeType": "IfStatement",
"src": "7601:60:54",
"trueBody": {
"expression": {
"arguments": [
{
"hexValue": "544c",
"id": 47212,
"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": 47211,
"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": 47213,
"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": 47214,
"nodeType": "ExpressionStatement",
"src": "7649:12:54"
}
}
]
}
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47126,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47122,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47119,
"src": "6950:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"expression": {
"id": 47123,
"name": "tranche",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47086,
"src": "6954:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 47124,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "6962:11:54",
"memberName": "constraints",
"nodeType": "MemberAccess",
"referencedDeclaration": 46634,
"src": "6954:19:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_Constraint_$46591_storage_$dyn_storage",
"typeString": "struct OrderLib.Constraint storage ref[] storage ref"
}
},
"id": 47125,
"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": 47402,
"initializationExpression": {
"assignments": [
47119
],
"declarations": [
{
"constant": false,
"id": 47119,
"mutability": "mutable",
"name": "c",
"nameLocation": "6943:1:54",
"nodeType": "VariableDeclaration",
"scope": 47402,
"src": "6937:7:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 47118,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "6937:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"id": 47121,
"initialValue": {
"hexValue": "30",
"id": 47120,
"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": 47128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "6982:3:54",
"subExpression": {
"id": 47127,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47119,
"src": "6982:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 47129,
"nodeType": "ExpressionStatement",
"src": "6982:3:54"
},
"nodeType": "ForStatement",
"src": "6932:2647:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "636f6d707574696e6720616d6f756e74",
"id": 47406,
"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": 47403,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9588:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47405,
"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": 47407,
"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": 47408,
"nodeType": "ExpressionStatement",
"src": "9588:32:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"expression": {
"id": 47412,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9643:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47413,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9650:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "9643:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47414,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9656:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "9643:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47409,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9630:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47411,
"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": 47415,
"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": 47416,
"nodeType": "ExpressionStatement",
"src": "9630:33:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 47420,
"name": "tranche",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47086,
"src": "9686:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 47421,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9694:8:54",
"memberName": "fraction",
"nodeType": "MemberAccess",
"referencedDeclaration": 46630,
"src": "9686:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"id": 47417,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9673:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47419,
"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": 47422,
"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": 47423,
"nodeType": "ExpressionStatement",
"src": "9673:30:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"expression": {
"id": 47427,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9726:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47428,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9733:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "9726:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47429,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9739:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "9726:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"expression": {
"id": 47424,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9713:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47426,
"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": 47430,
"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": 47431,
"nodeType": "ExpressionStatement",
"src": "9713:40:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 47435,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9776:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47436,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9783:8:54",
"memberName": "filledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46572,
"src": "9776:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47432,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9763:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47434,
"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": 47437,
"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": 47438,
"nodeType": "ExpressionStatement",
"src": "9763:29:54"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 47442,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9815:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47443,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9822:9:54",
"memberName": "filledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46574,
"src": "9815:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47439,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9802:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47441,
"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": 47444,
"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": 47445,
"nodeType": "ExpressionStatement",
"src": "9802:30:54"
},
{
"expression": {
"arguments": [
{
"baseExpression": {
"expression": {
"id": 47449,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9855:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47450,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9862:15:54",
"memberName": "trancheFilledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46577,
"src": "9855:22:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47452,
"indexExpression": {
"id": 47451,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47446,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9842:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47448,
"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": 47453,
"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": 47454,
"nodeType": "ExpressionStatement",
"src": "9842:50:54"
},
{
"expression": {
"arguments": [
{
"baseExpression": {
"expression": {
"id": 47458,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9915:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47459,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9922:16:54",
"memberName": "trancheFilledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46580,
"src": "9915:23:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47461,
"indexExpression": {
"id": 47460,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47455,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "9902:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47457,
"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": 47462,
"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": 47463,
"nodeType": "ExpressionStatement",
"src": "9902:51:54"
},
{
"assignments": [
47465
],
"declarations": [
{
"constant": false,
"id": 47465,
"mutability": "mutable",
"name": "amount",
"nameLocation": "9971:6:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "9963:14:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47464,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9963:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47492,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 47466,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "9980:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47467,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9987:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "9980:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47468,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "9993:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "9980:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"expression": {
"id": 47469,
"name": "tranche",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47086,
"src": "10002:7:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Tranche_$46635_storage_ptr",
"typeString": "struct OrderLib.Tranche storage pointer"
}
},
"id": 47470,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10010:8:54",
"memberName": "fraction",
"nodeType": "MemberAccess",
"referencedDeclaration": 46630,
"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": 47474,
"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": 47473,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "10026:6:54",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
}
],
"id": 47472,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "10021:4:54",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 47475,
"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": 47476,
"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": 47478,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10100:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47479,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10107:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10100:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47480,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10113:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "10100:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"baseExpression": {
"expression": {
"id": 47485,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10168:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47486,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10175:16:54",
"memberName": "trancheFilledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46580,
"src": "10168:23:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47488,
"indexExpression": {
"id": 47487,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "10100:105:54",
"trueExpression": {
"baseExpression": {
"expression": {
"id": 47481,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10129:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47482,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10136:15:54",
"memberName": "trancheFilledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46577,
"src": "10129:22:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47484,
"indexExpression": {
"id": 47483,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47490,
"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": 47496,
"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": 47493,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10239:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47495,
"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": 47497,
"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": 47498,
"nodeType": "ExpressionStatement",
"src": "10239:22:54"
},
{
"expression": {
"arguments": [
{
"id": 47502,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "10284:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47499,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10271:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47501,
"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": 47503,
"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": 47504,
"nodeType": "ExpressionStatement",
"src": "10271:20:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "6c696d6974",
"id": 47508,
"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": 47505,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10301:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47507,
"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": 47509,
"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": 47510,
"nodeType": "ExpressionStatement",
"src": "10301:21:54"
},
{
"expression": {
"arguments": [
{
"id": 47514,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"src": "10345:17:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"expression": {
"id": 47511,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10332:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47513,
"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": 47515,
"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": 47516,
"nodeType": "ExpressionStatement",
"src": "10332:31:54"
},
{
"expression": {
"arguments": [
{
"hexValue": "7072696365",
"id": 47520,
"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": 47517,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10373:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47519,
"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": 47521,
"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": 47522,
"nodeType": "ExpressionStatement",
"src": "10373:21:54"
},
{
"expression": {
"arguments": [
{
"id": 47526,
"name": "sqrtPriceX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47094,
"src": "10417:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"expression": {
"id": 47523,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10404:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47525,
"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": 47527,
"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": 47528,
"nodeType": "ExpressionStatement",
"src": "10404:26:54"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"condition": {
"expression": {
"expression": {
"id": 47530,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10484:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47531,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10491:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10484:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47532,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10497:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "10484:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"expression": {
"id": 47535,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10531:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47536,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10538:9:54",
"memberName": "filledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46574,
"src": "10531:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "10484:63:54",
"trueExpression": {
"expression": {
"id": 47533,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10513:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47534,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10520:8:54",
"memberName": "filledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46572,
"src": "10513:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47538,
"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": 47539,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10552:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47540,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10559:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10552:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47541,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10565:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "10552:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10483:88:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4f56455246494c4c",
"id": 47543,
"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": 47529,
"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": 47544,
"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": 47545,
"nodeType": "ExpressionStatement",
"src": "10474:111:54"
},
{
"assignments": [
47547
],
"declarations": [
{
"constant": false,
"id": 47547,
"mutability": "mutable",
"name": "remaining",
"nameLocation": "10603:9:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "10595:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47546,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10595:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47561,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47560,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 47548,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10615:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47549,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10622:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10615:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47550,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10628:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "10615:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"components": [
{
"condition": {
"expression": {
"expression": {
"id": 47551,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10638:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47552,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10645:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10638:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47553,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10651:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "10638:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"expression": {
"id": 47556,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10685:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47557,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10692:9:54",
"memberName": "filledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46574,
"src": "10685:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "10638:63:54",
"trueExpression": {
"expression": {
"id": 47554,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10667:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47555,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10674:8:54",
"memberName": "filledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46572,
"src": "10667:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47559,
"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": 47565,
"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": 47562,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10712:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47564,
"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": 47566,
"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": 47567,
"nodeType": "ExpressionStatement",
"src": "10712:25:54"
},
{
"expression": {
"arguments": [
{
"id": 47571,
"name": "remaining",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47547,
"src": "10760:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47568,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10747:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47570,
"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": 47572,
"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": 47573,
"nodeType": "ExpressionStatement",
"src": "10747:23:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47574,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "10784:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 47575,
"name": "remaining",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47547,
"src": "10793:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10784:18:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47581,
"nodeType": "IfStatement",
"src": "10780:109:54",
"trueBody": {
"expression": {
"id": 47579,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 47577,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "10871:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 47578,
"name": "remaining",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47547,
"src": "10880:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10871:18:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47580,
"nodeType": "ExpressionStatement",
"src": "10871:18:54"
}
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47585,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47583,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "10908:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 47584,
"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": 47586,
"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": 47582,
"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": 47587,
"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": 47588,
"nodeType": "ExpressionStatement",
"src": "10899:27:54"
},
{
"expression": {
"arguments": [
{
"id": 47592,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "10949:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 47589,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "10936:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47591,
"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": 47593,
"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": 47594,
"nodeType": "ExpressionStatement",
"src": "10936:20:54"
},
{
"assignments": [
47596
],
"declarations": [
{
"constant": false,
"id": 47596,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "10974:9:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "10966:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47595,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10966:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 47606,
"initialValue": {
"condition": {
"expression": {
"expression": {
"id": 47597,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "10986:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47598,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10993:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "10986:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "10999:21:54",
"memberName": "outputDirectlyToOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 46553,
"src": "10986:34:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"arguments": [
{
"id": 47603,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "11039:4:54",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OrderLib_$47919",
"typeString": "library OrderLib"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_OrderLib_$47919",
"typeString": "library OrderLib"
}
],
"id": 47602,
"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": 47601,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11031:7:54",
"typeDescriptions": {}
}
},
"id": 47604,
"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": 47605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "10986:58:54",
"trueExpression": {
"id": 47600,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47023,
"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": 47610,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47596,
"src": "11067:9:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 47607,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "11054:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47609,
"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": 47611,
"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": 47612,
"nodeType": "ExpressionStatement",
"src": "11054:23:54"
},
{
"assignments": [
47614
],
"declarations": [
{
"constant": false,
"id": 47614,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "11095:8:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "11087:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47613,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11087:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47615,
"nodeType": "VariableDeclarationStatement",
"src": "11087:16:54"
},
{
"assignments": [
47617
],
"declarations": [
{
"constant": false,
"id": 47617,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "11121:9:54",
"nodeType": "VariableDeclaration",
"scope": 47684,
"src": "11113:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47616,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11113:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47618,
"nodeType": "VariableDeclarationStatement",
"src": "11113:17:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
},
"id": 47625,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"expression": {
"id": 47619,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11144:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47620,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11151:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "11144:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47621,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11157:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "11144:18:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"id": 47622,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11163:8:54",
"memberName": "exchange",
"nodeType": "MemberAccess",
"referencedDeclaration": 46537,
"src": "11144:27:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47623,
"name": "Exchange",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46534,
"src": "11175:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Exchange_$46534_$",
"typeString": "type(enum OrderLib.Exchange)"
}
},
"id": 47624,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "11184:9:54",
"memberName": "UniswapV3",
"nodeType": "MemberAccess",
"referencedDeclaration": 46533,
"src": "11175:18:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Exchange_$46534",
"typeString": "enum OrderLib.Exchange"
}
},
"src": "11144:49:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"expression": {
"arguments": [
{
"hexValue": "5552",
"id": 47640,
"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": 47639,
"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": 47641,
"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": 47642,
"nodeType": "ExpressionStatement",
"src": "11364:12:54"
},
"id": 47643,
"nodeType": "IfStatement",
"src": "11140:236:54",
"trueBody": {
"expression": {
"id": 47637,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"components": [
{
"id": 47626,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47614,
"src": "11209:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47627,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47617,
"src": "11219:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47628,
"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": 47630,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47596,
"src": "11250:9:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 47631,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11261:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47632,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11268:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "11261:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
{
"id": 47633,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47102,
"src": "11275:4:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 47634,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47465,
"src": "11281:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47635,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47098,
"src": "11289:17:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 47629,
"name": "_do_execute_univ3",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47768,
"src": "11232:17:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_struct$_SwapOrder_$46560_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": 47636,
"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": 47638,
"nodeType": "ExpressionStatement",
"src": "11208:99:54"
}
},
{
"expression": {
"id": 47648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 47644,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11403:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47646,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "11410:8:54",
"memberName": "filledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46572,
"src": "11403:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"id": 47647,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47614,
"src": "11422:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11403:27:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47649,
"nodeType": "ExpressionStatement",
"src": "11403:27:54"
},
{
"expression": {
"id": 47654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 47650,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11440:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47652,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "11447:9:54",
"memberName": "filledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46574,
"src": "11440:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"id": 47653,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47617,
"src": "11460:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11440:29:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47655,
"nodeType": "ExpressionStatement",
"src": "11440:29:54"
},
{
"expression": {
"id": 47662,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"id": 47656,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11479:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47659,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11486:15:54",
"memberName": "trancheFilledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46577,
"src": "11479:22:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47660,
"indexExpression": {
"id": 47658,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47661,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47614,
"src": "11519:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11479:48:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47663,
"nodeType": "ExpressionStatement",
"src": "11479:48:54"
},
{
"expression": {
"id": 47670,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"expression": {
"id": 47664,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11537:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47667,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "11544:16:54",
"memberName": "trancheFilledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46580,
"src": "11537:23:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 47668,
"indexExpression": {
"id": 47666,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"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": 47669,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47617,
"src": "11578:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11537:50:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47671,
"nodeType": "ExpressionStatement",
"src": "11537:50:54"
},
{
"eventCall": {
"arguments": [
{
"id": 47673,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47025,
"src": "11621:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
{
"id": 47674,
"name": "trancheIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47027,
"src": "11633:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"id": 47675,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47614,
"src": "11647:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47676,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47617,
"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": 47672,
"name": "DexorderSwapFilled",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46522,
"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": 47677,
"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": 47678,
"nodeType": "EmitStatement",
"src": "11597:70:54"
},
{
"expression": {
"arguments": [
{
"id": 47680,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47021,
"src": "11693:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
{
"id": 47681,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47068,
"src": "11699:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
},
{
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
],
"id": 47679,
"name": "_checkCompleted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47838,
"src": "11677:15:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46506_storage_ptr_$_t_struct$_SwapOrderStatus_$46581_storage_ptr_$returns$__$",
"typeString": "function (struct OrderLib.OrdersInfo storage pointer,struct OrderLib.SwapOrderStatus storage pointer)"
}
},
"id": 47682,
"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": 47683,
"nodeType": "ExpressionStatement",
"src": "11677:29:54"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "execute",
"nameLocation": "6148:7:54",
"parameters": {
"id": 47031,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47021,
"mutability": "mutable",
"name": "self",
"nameLocation": "6175:4:54",
"nodeType": "VariableDeclaration",
"scope": 47685,
"src": "6156:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 47020,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47019,
"name": "OrdersInfo",
"nameLocations": [
"6156:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "6156:10:54"
},
"referencedDeclaration": 46506,
"src": "6156:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47023,
"mutability": "mutable",
"name": "owner",
"nameLocation": "6189:5:54",
"nodeType": "VariableDeclaration",
"scope": 47685,
"src": "6181:13:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47022,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6181:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47025,
"mutability": "mutable",
"name": "orderIndex",
"nameLocation": "6203:10:54",
"nodeType": "VariableDeclaration",
"scope": 47685,
"src": "6196:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 47024,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "6196:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47027,
"mutability": "mutable",
"name": "trancheIndex",
"nameLocation": "6221:12:54",
"nodeType": "VariableDeclaration",
"scope": 47685,
"src": "6215:18:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 47026,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "6215:5:54",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47030,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 47685,
"src": "6235:17:54",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriceProof_$46638_memory_ptr",
"typeString": "struct OrderLib.PriceProof"
},
"typeName": {
"id": 47029,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47028,
"name": "PriceProof",
"nameLocations": [
"6235:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46638,
"src": "6235:10:54"
},
"referencedDeclaration": 46638,
"src": "6235:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_PriceProof_$46638_storage_ptr",
"typeString": "struct OrderLib.PriceProof"
}
},
"visibility": "internal"
}
],
"src": "6155:99:54"
},
"returnParameters": {
"id": 47032,
"nodeType": "ParameterList",
"parameters": [],
"src": "6264:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 47768,
"nodeType": "FunctionDefinition",
"src": "11720:909:54",
"nodes": [],
"body": {
"id": 47767,
"nodeType": "Block",
"src": "11911:718:54",
"nodes": [],
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "7072696365206c696d6974",
"id": 47706,
"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": 47703,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "12063:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47705,
"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": 47707,
"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": 47708,
"nodeType": "ExpressionStatement",
"src": "12063:27:54"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 47714,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47696,
"src": "12118:17:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 47713,
"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": 47712,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "12113:4:54",
"typeDescriptions": {}
}
},
"id": 47715,
"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": 47709,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "12100:8:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 47711,
"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": 47716,
"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": 47717,
"nodeType": "ExpressionStatement",
"src": "12100:37:54"
},
{
"condition": {
"expression": {
"id": 47718,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12151:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47719,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12157:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "12151:19:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 47765,
"nodeType": "Block",
"src": "12404:219:54",
"statements": [
{
"expression": {
"id": 47763,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"components": [
{
"id": 47743,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47699,
"src": "12419:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47744,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47701,
"src": "12429:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47745,
"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": 47750,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47692,
"src": "12520:4:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 47751,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12526:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47752,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12532:7:54",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46542,
"src": "12526:13:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 47753,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12541:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47754,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12547:8:54",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46544,
"src": "12541:14:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 47755,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47687,
"src": "12557:9:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"expression": {
"id": 47756,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12568:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47757,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12574:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "12568:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"id": 47758,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12580:3:54",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 46539,
"src": "12568:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
{
"id": 47759,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47694,
"src": "12585:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47760,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47696,
"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": 47748,
"name": "UniswapSwapper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48844,
"src": "12473:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48844_$",
"typeString": "type(library UniswapSwapper)"
}
},
"id": 47749,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12488:10:54",
"memberName": "SwapParams",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "12473:25:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_SwapParams_$48339_storage_ptr_$",
"typeString": "type(struct UniswapSwapper.SwapParams storage pointer)"
}
},
"id": 47761,
"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_$48339_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
],
"expression": {
"id": 47746,
"name": "UniswapSwapper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48844,
"src": "12442:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48844_$",
"typeString": "type(library UniswapSwapper)"
}
},
"id": 47747,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12457:15:54",
"memberName": "swapExactOutput",
"nodeType": "MemberAccess",
"referencedDeclaration": 48790,
"src": "12442:30:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapParams_$48339_memory_ptr_$returns$_t_uint256_$_t_uint256_$",
"typeString": "function (struct UniswapSwapper.SwapParams memory) returns (uint256,uint256)"
}
},
"id": 47762,
"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": 47764,
"nodeType": "ExpressionStatement",
"src": "12418:194:54"
}
]
},
"id": 47766,
"nodeType": "IfStatement",
"src": "12147:476:54",
"trueBody": {
"id": 47742,
"nodeType": "Block",
"src": "12172:218:54",
"statements": [
{
"expression": {
"id": 47740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"components": [
{
"id": 47720,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47699,
"src": "12187:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47721,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47701,
"src": "12197:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47722,
"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": 47727,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47692,
"src": "12287:4:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 47728,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12293:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47729,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12299:7:54",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46542,
"src": "12293:13:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 47730,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12308:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47731,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12314:8:54",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46544,
"src": "12308:14:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 47732,
"name": "recipient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47687,
"src": "12324:9:54",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"expression": {
"id": 47733,
"name": "order",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47690,
"src": "12335:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder storage pointer"
}
},
"id": 47734,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12341:5:54",
"memberName": "route",
"nodeType": "MemberAccess",
"referencedDeclaration": 46547,
"src": "12335:11:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Route_$46540_storage",
"typeString": "struct OrderLib.Route storage ref"
}
},
"id": 47735,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12347:3:54",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 46539,
"src": "12335:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
{
"id": 47736,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47694,
"src": "12352:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 47737,
"name": "sqrtPriceLimitX96",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47696,
"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": 47725,
"name": "UniswapSwapper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48844,
"src": "12240:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48844_$",
"typeString": "type(library UniswapSwapper)"
}
},
"id": 47726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12255:10:54",
"memberName": "SwapParams",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "12240:25:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_SwapParams_$48339_storage_ptr_$",
"typeString": "type(struct UniswapSwapper.SwapParams storage pointer)"
}
},
"id": 47738,
"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_$48339_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
],
"expression": {
"id": 47723,
"name": "UniswapSwapper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48844,
"src": "12210:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_UniswapSwapper_$48844_$",
"typeString": "type(library UniswapSwapper)"
}
},
"id": 47724,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12225:14:54",
"memberName": "swapExactInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 48529,
"src": "12210:29:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapParams_$48339_memory_ptr_$returns$_t_uint256_$_t_uint256_$",
"typeString": "function (struct UniswapSwapper.SwapParams memory) returns (uint256,uint256)"
}
},
"id": 47739,
"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": 47741,
"nodeType": "ExpressionStatement",
"src": "12186:193:54"
}
]
}
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_do_execute_univ3",
"nameLocation": "11729:17:54",
"parameters": {
"id": 47697,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47687,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "11756:9:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11748:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47686,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11748:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47690,
"mutability": "mutable",
"name": "order",
"nameLocation": "11785:5:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11767:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
},
"typeName": {
"id": 47689,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47688,
"name": "SwapOrder",
"nameLocations": [
"11767:9:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46560,
"src": "11767:9:54"
},
"referencedDeclaration": 46560,
"src": "11767:9:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage_ptr",
"typeString": "struct OrderLib.SwapOrder"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47692,
"mutability": "mutable",
"name": "pool",
"nameLocation": "11800:4:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11792:12:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47691,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11792:7:54",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47694,
"mutability": "mutable",
"name": "amount",
"nameLocation": "11814:6:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11806:14:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47693,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11806:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47696,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "11830:17:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11822:25:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 47695,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "11822:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"src": "11746:102:54"
},
"returnParameters": {
"id": 47702,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47699,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "11878:8:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11870:16:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47698,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11870:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47701,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "11896:9:54",
"nodeType": "VariableDeclaration",
"scope": 47768,
"src": "11888:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47700,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11888:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "11869:37:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"id": 47838,
"nodeType": "FunctionDefinition",
"src": "12635:706:54",
"nodes": [],
"body": {
"id": 47837,
"nodeType": "Block",
"src": "12726:615:54",
"nodes": [],
"statements": [
{
"assignments": [
47778
],
"declarations": [
{
"constant": false,
"id": 47778,
"mutability": "mutable",
"name": "remaining",
"nameLocation": "12744:9:54",
"nodeType": "VariableDeclaration",
"scope": 47837,
"src": "12736:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47777,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "12736:7:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 47792,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 47791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"id": 47779,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "12756:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47780,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12763:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "12756:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47781,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12769:6:54",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 46549,
"src": "12756:19:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"components": [
{
"condition": {
"expression": {
"expression": {
"id": 47782,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "12779:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47783,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12786:5:54",
"memberName": "order",
"nodeType": "MemberAccess",
"referencedDeclaration": 46563,
"src": "12779:12:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrder_$46560_storage",
"typeString": "struct OrderLib.SwapOrder storage ref"
}
},
"id": 47784,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12792:13:54",
"memberName": "amountIsInput",
"nodeType": "MemberAccess",
"referencedDeclaration": 46551,
"src": "12779:26:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"expression": {
"id": 47787,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "12826:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47788,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12833:9:54",
"memberName": "filledOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 46574,
"src": "12826:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 47789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "12779:63:54",
"trueExpression": {
"expression": {
"id": 47785,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "12808:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47786,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "12815:8:54",
"memberName": "filledIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 46572,
"src": "12808:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 47790,
"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": 47795,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47793,
"name": "remaining",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47778,
"src": "12857:9:54",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 47794,
"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": 47828,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 47818,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47815,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "13181:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47816,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13188:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"src": "13181:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 47817,
"name": "NO_OCO_INDEX",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46495,
"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_$46642",
"typeString": "enum OrderLib.OcoMode"
},
"id": 47827,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"baseExpression": {
"expression": {
"id": 47819,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47771,
"src": "13216:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 47820,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13221:9:54",
"memberName": "ocoGroups",
"nodeType": "MemberAccess",
"referencedDeclaration": 46505,
"src": "13216:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage",
"typeString": "struct OrderLib.OcoGroup storage ref[] storage ref"
}
},
"id": 47823,
"indexExpression": {
"expression": {
"id": 47821,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "13231:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47822,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13238:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"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_$46650_storage",
"typeString": "struct OrderLib.OcoGroup storage ref"
}
},
"id": 47824,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13248:4:54",
"memberName": "mode",
"nodeType": "MemberAccess",
"referencedDeclaration": 46645,
"src": "13216:36:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"typeString": "enum OrderLib.OcoMode"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47825,
"name": "OcoMode",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46642,
"src": "13256:7:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_OcoMode_$46642_$",
"typeString": "type(enum OrderLib.OcoMode)"
}
},
"id": 47826,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "13264:22:54",
"memberName": "CANCEL_ON_PARTIAL_FILL",
"nodeType": "MemberAccess",
"referencedDeclaration": 46640,
"src": "13256:30:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_OcoMode_$46642",
"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": 47835,
"nodeType": "IfStatement",
"src": "13177:157:54",
"trueBody": {
"expression": {
"arguments": [
{
"id": 47830,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47771,
"src": "13312:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
{
"expression": {
"id": 47831,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "13318:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47832,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13325:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"src": "13318:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
},
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
],
"id": 47829,
"name": "_cancelOco",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47880,
"src": "13301:10:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46506_storage_ptr_$_t_uint64_$returns$__$",
"typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)"
}
},
"id": 47833,
"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": 47834,
"nodeType": "ExpressionStatement",
"src": "13301:33:54"
}
},
"id": 47836,
"nodeType": "IfStatement",
"src": "12853:481:54",
"trueBody": {
"id": 47814,
"nodeType": "Block",
"src": "12875:288:54",
"statements": [
{
"expression": {
"id": 47801,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 47796,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "12910:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47798,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "12917:5:54",
"memberName": "state",
"nodeType": "MemberAccess",
"referencedDeclaration": 46566,
"src": "12910:12:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 47799,
"name": "SwapOrderState",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46531,
"src": "12925:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46531_$",
"typeString": "type(enum OrderLib.SwapOrderState)"
}
},
"id": 47800,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "12940:6:54",
"memberName": "Filled",
"nodeType": "MemberAccess",
"referencedDeclaration": 46529,
"src": "12925:21:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"src": "12910:36:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"id": 47802,
"nodeType": "ExpressionStatement",
"src": "12910:36:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 47806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47803,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "13070:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47804,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13077:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"src": "13070:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 47805,
"name": "NO_OCO_INDEX",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46495,
"src": "13089:12:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "13070:31:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47813,
"nodeType": "IfStatement",
"src": "13066:86:54",
"trueBody": {
"expression": {
"arguments": [
{
"id": 47808,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47771,
"src": "13130:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
{
"expression": {
"id": 47809,
"name": "status",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47774,
"src": "13136:6:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus storage pointer"
}
},
"id": 47810,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13143:8:54",
"memberName": "ocoGroup",
"nodeType": "MemberAccess",
"referencedDeclaration": 46570,
"src": "13136:15:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
},
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
],
"id": 47807,
"name": "_cancelOco",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47880,
"src": "13119:10:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46506_storage_ptr_$_t_uint64_$returns$__$",
"typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)"
}
},
"id": 47811,
"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": 47812,
"nodeType": "ExpressionStatement",
"src": "13119:33:54"
}
}
]
}
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_checkCompleted",
"nameLocation": "12644:15:54",
"parameters": {
"id": 47775,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47771,
"mutability": "mutable",
"name": "self",
"nameLocation": "12679:4:54",
"nodeType": "VariableDeclaration",
"scope": 47838,
"src": "12660:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 47770,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47769,
"name": "OrdersInfo",
"nameLocations": [
"12660:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "12660:10:54"
},
"referencedDeclaration": 46506,
"src": "12660:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47774,
"mutability": "mutable",
"name": "status",
"nameLocation": "12709:6:54",
"nodeType": "VariableDeclaration",
"scope": 47838,
"src": "12685:30:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
},
"typeName": {
"id": 47773,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47772,
"name": "SwapOrderStatus",
"nameLocations": [
"12685:15:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46581,
"src": "12685:15:54"
},
"referencedDeclaration": 46581,
"src": "12685:15:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapOrderStatus_$46581_storage_ptr",
"typeString": "struct OrderLib.SwapOrderStatus"
}
},
"visibility": "internal"
}
],
"src": "12659:57:54"
},
"returnParameters": {
"id": 47776,
"nodeType": "ParameterList",
"parameters": [],
"src": "12726:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 47880,
"nodeType": "FunctionDefinition",
"src": "13347:286:54",
"nodes": [],
"body": {
"id": 47879,
"nodeType": "Block",
"src": "13418:215:54",
"nodes": [],
"statements": [
{
"assignments": [
47848
],
"declarations": [
{
"constant": false,
"id": 47848,
"mutability": "mutable",
"name": "group",
"nameLocation": "13445:5:54",
"nodeType": "VariableDeclaration",
"scope": 47879,
"src": "13428:22:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup"
},
"typeName": {
"id": 47847,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47846,
"name": "OcoGroup",
"nameLocations": [
"13428:8:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46650,
"src": "13428:8:54"
},
"referencedDeclaration": 46650,
"src": "13428:8:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup"
}
},
"visibility": "internal"
}
],
"id": 47853,
"initialValue": {
"baseExpression": {
"expression": {
"id": 47849,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47841,
"src": "13453:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 47850,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13458:9:54",
"memberName": "ocoGroups",
"nodeType": "MemberAccess",
"referencedDeclaration": 46505,
"src": "13453:14:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_OcoGroup_$46650_storage_$dyn_storage",
"typeString": "struct OrderLib.OcoGroup storage ref[] storage ref"
}
},
"id": 47852,
"indexExpression": {
"id": 47851,
"name": "ocoIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47843,
"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_$46650_storage",
"typeString": "struct OrderLib.OcoGroup storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13428:49:54"
},
{
"assignments": [
47855
],
"declarations": [
{
"constant": false,
"id": 47855,
"mutability": "mutable",
"name": "endIndex",
"nameLocation": "13494:8:54",
"nodeType": "VariableDeclaration",
"scope": 47879,
"src": "13487:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 47854,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13487:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"id": 47861,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 47860,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 47856,
"name": "group",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47848,
"src": "13505:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup storage pointer"
}
},
"id": 47857,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13511:10:54",
"memberName": "startIndex",
"nodeType": "MemberAccess",
"referencedDeclaration": 46647,
"src": "13505:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"expression": {
"id": 47858,
"name": "group",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47848,
"src": "13524:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup storage pointer"
}
},
"id": 47859,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13530:3:54",
"memberName": "num",
"nodeType": "MemberAccess",
"referencedDeclaration": 46649,
"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": 47874,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47841,
"src": "13618:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
{
"id": 47875,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47863,
"src": "13624:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
},
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
],
"id": 47873,
"name": "_cancelOrder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47918,
"src": "13605:12:54",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrdersInfo_$46506_storage_ptr_$_t_uint64_$returns$__$",
"typeString": "function (struct OrderLib.OrdersInfo storage pointer,uint64)"
}
},
"id": 47876,
"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": 47877,
"nodeType": "ExpressionStatement",
"src": "13605:21:54"
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 47869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47867,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47863,
"src": "13575:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 47868,
"name": "endIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47855,
"src": "13577:8:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "13575:10:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47878,
"initializationExpression": {
"assignments": [
47863
],
"declarations": [
{
"constant": false,
"id": 47863,
"mutability": "mutable",
"name": "i",
"nameLocation": "13555:1:54",
"nodeType": "VariableDeclaration",
"scope": 47878,
"src": "13548:8:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 47862,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13548:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"id": 47866,
"initialValue": {
"expression": {
"id": 47864,
"name": "group",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47848,
"src": "13557:5:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OcoGroup_$46650_storage_ptr",
"typeString": "struct OrderLib.OcoGroup storage pointer"
}
},
"id": 47865,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13563:10:54",
"memberName": "startIndex",
"nodeType": "MemberAccess",
"referencedDeclaration": 46647,
"src": "13557:16:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13548:25:54"
},
"isSimpleCounterLoop": true,
"loopExpression": {
"expression": {
"id": 47871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "13587:3:54",
"subExpression": {
"id": 47870,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47863,
"src": "13587:1:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"id": 47872,
"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": 47844,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47841,
"mutability": "mutable",
"name": "self",
"nameLocation": "13386:4:54",
"nodeType": "VariableDeclaration",
"scope": 47880,
"src": "13367:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 47840,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47839,
"name": "OrdersInfo",
"nameLocations": [
"13367:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "13367:10:54"
},
"referencedDeclaration": 46506,
"src": "13367:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47843,
"mutability": "mutable",
"name": "ocoIndex",
"nameLocation": "13399:8:54",
"nodeType": "VariableDeclaration",
"scope": 47880,
"src": "13392:15:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 47842,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13392:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "13366:42:54"
},
"returnParameters": {
"id": 47845,
"nodeType": "ParameterList",
"parameters": [],
"src": "13418:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 47918,
"nodeType": "FunctionDefinition",
"src": "13639:319:54",
"nodes": [],
"body": {
"id": 47917,
"nodeType": "Block",
"src": "13714:244:54",
"nodes": [],
"statements": [
{
"assignments": [
47890
],
"declarations": [
{
"constant": false,
"id": 47890,
"mutability": "mutable",
"name": "state",
"nameLocation": "13739:5:54",
"nodeType": "VariableDeclaration",
"scope": 47917,
"src": "13724:20:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
},
"typeName": {
"id": 47889,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47888,
"name": "SwapOrderState",
"nameLocations": [
"13724:14:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46531,
"src": "13724:14:54"
},
"referencedDeclaration": 46531,
"src": "13724:14:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"visibility": "internal"
}
],
"id": 47896,
"initialValue": {
"expression": {
"baseExpression": {
"expression": {
"id": 47891,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47883,
"src": "13747:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 47892,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13752:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "13747:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 47894,
"indexExpression": {
"id": 47893,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47885,
"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_$46581_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref"
}
},
"id": 47895,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13771:5:54",
"memberName": "state",
"nodeType": "MemberAccess",
"referencedDeclaration": 46566,
"src": "13747:29:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13724:52:54"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
},
"id": 47900,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 47897,
"name": "state",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47890,
"src": "13790:5:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"id": 47898,
"name": "SwapOrderState",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46531,
"src": "13799:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46531_$",
"typeString": "type(enum OrderLib.SwapOrderState)"
}
},
"id": 47899,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "13814:4:54",
"memberName": "Open",
"nodeType": "MemberAccess",
"referencedDeclaration": 46527,
"src": "13799:19:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"src": "13790:28:54",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 47916,
"nodeType": "IfStatement",
"src": "13786:166:54",
"trueBody": {
"id": 47915,
"nodeType": "Block",
"src": "13821:131:54",
"statements": [
{
"expression": {
"id": 47909,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"baseExpression": {
"expression": {
"id": 47901,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47883,
"src": "13835:4:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo storage pointer"
}
},
"id": 47904,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "13840:6:54",
"memberName": "orders",
"nodeType": "MemberAccess",
"referencedDeclaration": 46501,
"src": "13835:11:54",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_SwapOrderStatus_$46581_storage_$dyn_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref[] storage ref"
}
},
"id": 47905,
"indexExpression": {
"id": 47903,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47885,
"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_$46581_storage",
"typeString": "struct OrderLib.SwapOrderStatus storage ref"
}
},
"id": 47906,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "13859:5:54",
"memberName": "state",
"nodeType": "MemberAccess",
"referencedDeclaration": 46566,
"src": "13835:29:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 47907,
"name": "SwapOrderState",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46531,
"src": "13867:14:54",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_SwapOrderState_$46531_$",
"typeString": "type(enum OrderLib.SwapOrderState)"
}
},
"id": 47908,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "13882:8:54",
"memberName": "Canceled",
"nodeType": "MemberAccess",
"referencedDeclaration": 46528,
"src": "13867:23:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"src": "13835:55:54",
"typeDescriptions": {
"typeIdentifier": "t_enum$_SwapOrderState_$46531",
"typeString": "enum OrderLib.SwapOrderState"
}
},
"id": 47910,
"nodeType": "ExpressionStatement",
"src": "13835:55:54"
},
{
"eventCall": {
"arguments": [
{
"id": 47912,
"name": "orderIndex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47885,
"src": "13930:10:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
],
"id": 47911,
"name": "DexorderSwapCanceled",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46526,
"src": "13909:20:54",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$",
"typeString": "function (uint64)"
}
},
"id": 47913,
"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": 47914,
"nodeType": "EmitStatement",
"src": "13904:37:54"
}
]
}
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_cancelOrder",
"nameLocation": "13648:12:54",
"parameters": {
"id": 47886,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47883,
"mutability": "mutable",
"name": "self",
"nameLocation": "13680:4:54",
"nodeType": "VariableDeclaration",
"scope": 47918,
"src": "13661:23:54",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
},
"typeName": {
"id": 47882,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 47881,
"name": "OrdersInfo",
"nameLocations": [
"13661:10:54"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 46506,
"src": "13661:10:54"
},
"referencedDeclaration": 46506,
"src": "13661:10:54",
"typeDescriptions": {
"typeIdentifier": "t_struct$_OrdersInfo_$46506_storage_ptr",
"typeString": "struct OrderLib.OrdersInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 47885,
"mutability": "mutable",
"name": "orderIndex",
"nameLocation": "13693:10:54",
"nodeType": "VariableDeclaration",
"scope": 47918,
"src": "13686:17:54",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 47884,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "13686:6:54",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "13660:44:54"
},
"returnParameters": {
"id": 47887,
"nodeType": "ParameterList",
"parameters": [],
"src": "13714:0:54"
},
"scope": 47919,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "OrderLib",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts": [
47919
],
"name": "OrderLib",
"nameLocation": "253:8:54",
"scope": 47920,
"usedErrors": [],
"usedEvents": [
46512,
46522,
46526
]
}
],
"license": "UNLICENSED"
},
"id": 54
}