UNPKG

moonwalkerswap-v1-core

Version:
414 lines 19.1 kB
{ "contractName": "IMoonwalkerSwapCallback", "abi": [ { "inputs": [ { "internalType": "int256", "name": "amount0Delta", "type": "int256" }, { "internalType": "int256", "name": "amount1Delta", "type": "int256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "moonwalkerSwapCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"moonwalkerSwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"moonwalkerSwapCallback(int256,int256,bytes)\":{\"details\":\"In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a MoonwalkerPool deployed by the canonical MoonwalkerFactory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\",\"params\":{\"amount0Delta\":\"The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.\",\"amount1Delta\":\"The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.\",\"data\":\"Any data passed through by the caller via the IMoonwalkerPoolActions#swap call\"}}},\"title\":\"Callback for IMoonwalkerPoolActions#swap\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"moonwalkerSwapCallback(int256,int256,bytes)\":{\"notice\":\"Called to `msg.sender` after executing a swap via IMoonwalkerPool#swap.\"}},\"notice\":\"Any contract that calls IMoonwalkerPoolActions#swap must implement this interface\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/callback/IMoonwalkerSwapCallback.sol\":\"IMoonwalkerSwapCallback\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/callback/IMoonwalkerSwapCallback.sol\":{\"keccak256\":\"0x0709f6eafdc1a998d714c4719e292df3747b0f298a95b994b82e7e0dfc8b70b7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2c404b5a8aaf8aabeb87c1228d827e6e31a007cedbf0fe1527bf56f43a43f78\",\"dweb:/ipfs/QmT7fBphTzRgaP4bfL7qtK1kzEbNM5zPhXQaWat7KcHwJN\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0;\n\n/// @title Callback for IMoonwalkerPoolActions#swap\n/// @notice Any contract that calls IMoonwalkerPoolActions#swap must implement this interface\ninterface IMoonwalkerSwapCallback {\n /// @notice Called to `msg.sender` after executing a swap via IMoonwalkerPool#swap.\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\n /// The caller of this method must be checked to be a MoonwalkerPool deployed by the canonical MoonwalkerFactory.\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\n /// @param data Any data passed through by the caller via the IMoonwalkerPoolActions#swap call\n function moonwalkerSwapCallback(\n int256 amount0Delta,\n int256 amount1Delta,\n bytes calldata data\n ) external;\n}\n", "sourcePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/callback/IMoonwalkerSwapCallback.sol", "ast": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/callback/IMoonwalkerSwapCallback.sol", "exportedSymbols": { "IMoonwalkerSwapCallback": [ 3101 ] }, "id": 3102, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 3089, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "32:24:10" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 3090, "nodeType": "StructuredDocumentation", "src": "58:146:10", "text": "@title Callback for IMoonwalkerPoolActions#swap\n @notice Any contract that calls IMoonwalkerPoolActions#swap must implement this interface" }, "fullyImplemented": false, "id": 3101, "linearizedBaseContracts": [ 3101 ], "name": "IMoonwalkerSwapCallback", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 3091, "nodeType": "StructuredDocumentation", "src": "244:902:10", "text": "@notice Called to `msg.sender` after executing a swap via IMoonwalkerPool#swap.\n @dev In the implementation you must pay the pool tokens owed for the swap.\n The caller of this method must be checked to be a MoonwalkerPool deployed by the canonical MoonwalkerFactory.\n amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\n @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token0 to the pool.\n @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token1 to the pool.\n @param data Any data passed through by the caller via the IMoonwalkerPoolActions#swap call" }, "functionSelector": "9e040f7f", "id": 3100, "implemented": false, "kind": "function", "modifiers": [], "name": "moonwalkerSwapCallback", "nodeType": "FunctionDefinition", "parameters": { "id": 3098, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3093, "mutability": "mutable", "name": "amount0Delta", "nodeType": "VariableDeclaration", "scope": 3100, "src": "1192:19:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 3092, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1192:6:10", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" }, { "constant": false, "id": 3095, "mutability": "mutable", "name": "amount1Delta", "nodeType": "VariableDeclaration", "scope": 3100, "src": "1221:19:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 3094, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1221:6:10", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" }, { "constant": false, "id": 3097, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "scope": 3100, "src": "1250:19:10", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 3096, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1250:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1182:93:10" }, "returnParameters": { "id": 3099, "nodeType": "ParameterList", "parameters": [], "src": "1284:0:10" }, "scope": 3101, "src": "1151:134:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 3102, "src": "204:1083:10" } ], "src": "32:1256:10" }, "legacyAST": { "attributes": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/callback/IMoonwalkerSwapCallback.sol", "exportedSymbols": { "IMoonwalkerSwapCallback": [ 3101 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", ">=", "0.5", ".0" ] }, "id": 3089, "name": "PragmaDirective", "src": "32:24:10" }, { "attributes": { "abstract": false, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "interface", "fullyImplemented": false, "linearizedBaseContracts": [ 3101 ], "name": "IMoonwalkerSwapCallback", "scope": 3102 }, "children": [ { "attributes": { "text": "@title Callback for IMoonwalkerPoolActions#swap\n @notice Any contract that calls IMoonwalkerPoolActions#swap must implement this interface" }, "id": 3090, "name": "StructuredDocumentation", "src": "58:146:10" }, { "attributes": { "functionSelector": "9e040f7f", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "moonwalkerSwapCallback", "scope": 3101, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, "children": [ { "attributes": { "text": "@notice Called to `msg.sender` after executing a swap via IMoonwalkerPool#swap.\n @dev In the implementation you must pay the pool tokens owed for the swap.\n The caller of this method must be checked to be a MoonwalkerPool deployed by the canonical MoonwalkerFactory.\n amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\n @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token0 to the pool.\n @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token1 to the pool.\n @param data Any data passed through by the caller via the IMoonwalkerPoolActions#swap call" }, "id": 3091, "name": "StructuredDocumentation", "src": "244:902:10" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "amount0Delta", "scope": 3100, "stateVariable": false, "storageLocation": "default", "type": "int256", "visibility": "internal" }, "children": [ { "attributes": { "name": "int256", "type": "int256" }, "id": 3092, "name": "ElementaryTypeName", "src": "1192:6:10" } ], "id": 3093, "name": "VariableDeclaration", "src": "1192:19:10" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "amount1Delta", "scope": 3100, "stateVariable": false, "storageLocation": "default", "type": "int256", "visibility": "internal" }, "children": [ { "attributes": { "name": "int256", "type": "int256" }, "id": 3094, "name": "ElementaryTypeName", "src": "1221:6:10" } ], "id": 3095, "name": "VariableDeclaration", "src": "1221:19:10" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "data", "scope": 3100, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 3096, "name": "ElementaryTypeName", "src": "1250:5:10" } ], "id": 3097, "name": "VariableDeclaration", "src": "1250:19:10" } ], "id": 3098, "name": "ParameterList", "src": "1182:93:10" }, { "attributes": { "parameters": [ null ] }, "children": [], "id": 3099, "name": "ParameterList", "src": "1284:0:10" } ], "id": 3100, "name": "FunctionDefinition", "src": "1151:134:10" } ], "id": 3101, "name": "ContractDefinition", "src": "204:1083:10" } ], "id": 3102, "name": "SourceUnit", "src": "32:1256:10" }, "compiler": { "name": "solc", "version": "0.7.6+commit.7338295f.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.1", "updatedAt": "2022-01-17T20:05:41.700Z", "devdoc": { "kind": "dev", "methods": { "moonwalkerSwapCallback(int256,int256,bytes)": { "details": "In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a MoonwalkerPool deployed by the canonical MoonwalkerFactory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.", "params": { "amount0Delta": "The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.", "amount1Delta": "The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.", "data": "Any data passed through by the caller via the IMoonwalkerPoolActions#swap call" } } }, "title": "Callback for IMoonwalkerPoolActions#swap", "version": 1 }, "userdoc": { "kind": "user", "methods": { "moonwalkerSwapCallback(int256,int256,bytes)": { "notice": "Called to `msg.sender` after executing a swap via IMoonwalkerPool#swap." } }, "notice": "Any contract that calls IMoonwalkerPoolActions#swap must implement this interface", "version": 1 } }