UNPKG

moonwalkerswap-v1-core

Version:
1,102 lines (1,101 loc) 93.1 kB
{ "contractName": "IMoonwalkerFactory", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint24", "name": "fee", "type": "uint24" }, { "indexed": true, "internalType": "int24", "name": "tickSpacing", "type": "int24" } ], "name": "FeeAmountEnabled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oldOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "token0", "type": "address" }, { "indexed": true, "internalType": "address", "name": "token1", "type": "address" }, { "indexed": true, "internalType": "uint24", "name": "fee", "type": "uint24" }, { "indexed": false, "internalType": "int24", "name": "tickSpacing", "type": "int24" }, { "indexed": false, "internalType": "address", "name": "pool", "type": "address" } ], "name": "PoolCreated", "type": "event" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint24", "name": "fee", "type": "uint24" } ], "name": "feeAmountTickSpacing", "outputs": [ { "internalType": "int24", "name": "", "type": "int24" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" }, { "internalType": "uint24", "name": "fee", "type": "uint24" } ], "name": "getPool", "outputs": [ { "internalType": "address", "name": "pool", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" }, { "internalType": "uint24", "name": "fee", "type": "uint24" } ], "name": "createPool", "outputs": [ { "internalType": "address", "name": "pool", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "setOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "int24", "name": "tickSpacing", "type": "int24" } ], "name": "enableFeeAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"}],\"name\":\"FeeAmountEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"}],\"name\":\"enableFeeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"feeAmountTickSpacing\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"FeeAmountEnabled(uint24,int24)\":{\"params\":{\"fee\":\"The enabled fee, denominated in hundredths of a bip\",\"tickSpacing\":\"The minimum number of ticks between initialized ticks for pools created with the given fee\"}},\"OwnerChanged(address,address)\":{\"params\":{\"newOwner\":\"The owner after the owner was changed\",\"oldOwner\":\"The owner before the owner was changed\"}},\"PoolCreated(address,address,uint24,int24,address)\":{\"params\":{\"fee\":\"The fee collected upon every swap in the pool, denominated in hundredths of a bip\",\"pool\":\"The address of the created pool\",\"tickSpacing\":\"The minimum number of ticks between initialized ticks\",\"token0\":\"The first token of the pool by address sort order\",\"token1\":\"The second token of the pool by address sort order\"}}},\"kind\":\"dev\",\"methods\":{\"createPool(address,address,uint24)\":{\"details\":\"tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments are invalid.\",\"params\":{\"fee\":\"The desired fee for the pool\",\"tokenA\":\"One of the two tokens in the desired pool\",\"tokenB\":\"The other of the two tokens in the desired pool\"},\"returns\":{\"pool\":\"The address of the newly created pool\"}},\"enableFeeAmount(uint24,int24)\":{\"details\":\"Fee amounts may never be removed once enabled\",\"params\":{\"fee\":\"The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\",\"tickSpacing\":\"The spacing between ticks to be enforced for all pools created with the given fee amount\"}},\"feeAmountTickSpacing(uint24)\":{\"details\":\"A fee amount can never be removed, so this value should be hard coded or cached in the calling context\",\"params\":{\"fee\":\"The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\"},\"returns\":{\"_0\":\"The tick spacing\"}},\"getPool(address,address,uint24)\":{\"details\":\"tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\",\"params\":{\"fee\":\"The fee collected upon every swap in the pool, denominated in hundredths of a bip\",\"tokenA\":\"The contract address of either token0 or token1\",\"tokenB\":\"The contract address of the other token\"},\"returns\":{\"pool\":\"The pool address\"}},\"owner()\":{\"details\":\"Can be changed by the current owner via setOwner\",\"returns\":{\"_0\":\"The address of the factory owner\"}},\"setOwner(address)\":{\"details\":\"Must be called by the current owner\",\"params\":{\"_owner\":\"The new owner of the factory\"}}},\"title\":\"The interface for the Moonwalker V1 Factory\",\"version\":1},\"userdoc\":{\"events\":{\"FeeAmountEnabled(uint24,int24)\":{\"notice\":\"Emitted when a new fee amount is enabled for pool creation via the factory\"},\"OwnerChanged(address,address)\":{\"notice\":\"Emitted when the owner of the factory is changed\"},\"PoolCreated(address,address,uint24,int24,address)\":{\"notice\":\"Emitted when a pool is created\"}},\"kind\":\"user\",\"methods\":{\"createPool(address,address,uint24)\":{\"notice\":\"Creates a pool for the given two tokens and fee\"},\"enableFeeAmount(uint24,int24)\":{\"notice\":\"Enables a fee amount with the given tickSpacing\"},\"feeAmountTickSpacing(uint24)\":{\"notice\":\"Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\"},\"getPool(address,address,uint24)\":{\"notice\":\"Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\"},\"owner()\":{\"notice\":\"Returns the current owner of the factory\"},\"setOwner(address)\":{\"notice\":\"Updates the owner of the factory\"}},\"notice\":\"The Moonwalker V1 Factory facilitates creation of Moonwalker V1 pools and control over the protocol fees\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IMoonwalkerFactory.sol\":\"IMoonwalkerFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IMoonwalkerFactory.sol\":{\"keccak256\":\"0xef710eff542f772b16ac4729719c373436c2eb10206764bfb6a41dd33096f7df\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea2310bf2f9bfe77324a70ef2faf57f4c0bbf011f15d011b87360d5e035cc41a\",\"dweb:/ipfs/QmdK8PHBsB73CZMFZC2pWKeHire9XZhc638S2xVH9WFx4S\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0;\n\n/// @title The interface for the Moonwalker V1 Factory\n/// @notice The Moonwalker V1 Factory facilitates creation of Moonwalker V1 pools and control over the protocol fees\ninterface IMoonwalkerFactory {\n /// @notice Emitted when the owner of the factory is changed\n /// @param oldOwner The owner before the owner was changed\n /// @param newOwner The owner after the owner was changed\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\n\n /// @notice Emitted when a pool is created\n /// @param token0 The first token of the pool by address sort order\n /// @param token1 The second token of the pool by address sort order\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n /// @param tickSpacing The minimum number of ticks between initialized ticks\n /// @param pool The address of the created pool\n event PoolCreated(\n address indexed token0,\n address indexed token1,\n uint24 indexed fee,\n int24 tickSpacing,\n address pool\n );\n\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\n /// @param fee The enabled fee, denominated in hundredths of a bip\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\n\n /// @notice Returns the current owner of the factory\n /// @dev Can be changed by the current owner via setOwner\n /// @return The address of the factory owner\n function owner() external view returns (address);\n\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\n /// @return The tick spacing\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\n\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\n /// @param tokenA The contract address of either token0 or token1\n /// @param tokenB The contract address of the other token\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n /// @return pool The pool address\n function getPool(\n address tokenA,\n address tokenB,\n uint24 fee\n ) external view returns (address pool);\n\n /// @notice Creates a pool for the given two tokens and fee\n /// @param tokenA One of the two tokens in the desired pool\n /// @param tokenB The other of the two tokens in the desired pool\n /// @param fee The desired fee for the pool\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\n /// are invalid.\n /// @return pool The address of the newly created pool\n function createPool(\n address tokenA,\n address tokenB,\n uint24 fee\n ) external returns (address pool);\n\n /// @notice Updates the owner of the factory\n /// @dev Must be called by the current owner\n /// @param _owner The new owner of the factory\n function setOwner(address _owner) external;\n\n /// @notice Enables a fee amount with the given tickSpacing\n /// @dev Fee amounts may never be removed once enabled\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\n}\n", "sourcePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IMoonwalkerFactory.sol", "ast": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IMoonwalkerFactory.sol", "exportedSymbols": { "IMoonwalkerFactory": [ 3019 ] }, "id": 3020, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 2938, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "32:24:5" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2939, "nodeType": "StructuredDocumentation", "src": "58:172:5", "text": "@title The interface for the Moonwalker V1 Factory\n @notice The Moonwalker V1 Factory facilitates creation of Moonwalker V1 pools and control over the protocol fees" }, "fullyImplemented": false, "id": 3019, "linearizedBaseContracts": [ 3019 ], "name": "IMoonwalkerFactory", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": { "id": 2940, "nodeType": "StructuredDocumentation", "src": "265:185:5", "text": "@notice Emitted when the owner of the factory is changed\n @param oldOwner The owner before the owner was changed\n @param newOwner The owner after the owner was changed" }, "id": 2946, "name": "OwnerChanged", "nodeType": "EventDefinition", "parameters": { "id": 2945, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2942, "indexed": true, "mutability": "mutable", "name": "oldOwner", "nodeType": "VariableDeclaration", "scope": 2946, "src": "474:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2941, "name": "address", "nodeType": "ElementaryTypeName", "src": "474:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2944, "indexed": true, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 2946, "src": "500:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2943, "name": "address", "nodeType": "ElementaryTypeName", "src": "500:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "473:52:5" }, "src": "455:71:5" }, { "anonymous": false, "documentation": { "id": 2947, "nodeType": "StructuredDocumentation", "src": "532:421:5", "text": "@notice Emitted when a pool is created\n @param token0 The first token of the pool by address sort order\n @param token1 The second token of the pool by address sort order\n @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n @param tickSpacing The minimum number of ticks between initialized ticks\n @param pool The address of the created pool" }, "id": 2959, "name": "PoolCreated", "nodeType": "EventDefinition", "parameters": { "id": 2958, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2949, "indexed": true, "mutability": "mutable", "name": "token0", "nodeType": "VariableDeclaration", "scope": 2959, "src": "985:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2948, "name": "address", "nodeType": "ElementaryTypeName", "src": "985:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2951, "indexed": true, "mutability": "mutable", "name": "token1", "nodeType": "VariableDeclaration", "scope": 2959, "src": "1017:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2950, "name": "address", "nodeType": "ElementaryTypeName", "src": "1017:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2953, "indexed": true, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 2959, "src": "1049:18:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 2952, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "1049:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" }, { "constant": false, "id": 2955, "indexed": false, "mutability": "mutable", "name": "tickSpacing", "nodeType": "VariableDeclaration", "scope": 2959, "src": "1077:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 2954, "name": "int24", "nodeType": "ElementaryTypeName", "src": "1077:5:5", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" }, { "constant": false, "id": 2957, "indexed": false, "mutability": "mutable", "name": "pool", "nodeType": "VariableDeclaration", "scope": 2959, "src": "1104:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2956, "name": "address", "nodeType": "ElementaryTypeName", "src": "1104:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "975:147:5" }, "src": "958:165:5" }, { "anonymous": false, "documentation": { "id": 2960, "nodeType": "StructuredDocumentation", "src": "1129:275:5", "text": "@notice Emitted when a new fee amount is enabled for pool creation via the factory\n @param fee The enabled fee, denominated in hundredths of a bip\n @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee" }, "id": 2966, "name": "FeeAmountEnabled", "nodeType": "EventDefinition", "parameters": { "id": 2965, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2962, "indexed": true, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 2966, "src": "1432:18:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 2961, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "1432:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" }, { "constant": false, "id": 2964, "indexed": true, "mutability": "mutable", "name": "tickSpacing", "nodeType": "VariableDeclaration", "scope": 2966, "src": "1452:25:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 2963, "name": "int24", "nodeType": "ElementaryTypeName", "src": "1452:5:5", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" } ], "src": "1431:47:5" }, "src": "1409:70:5" }, { "documentation": { "id": 2967, "nodeType": "StructuredDocumentation", "src": "1485:163:5", "text": "@notice Returns the current owner of the factory\n @dev Can be changed by the current owner via setOwner\n @return The address of the factory owner" }, "functionSelector": "8da5cb5b", "id": 2972, "implemented": false, "kind": "function", "modifiers": [], "name": "owner", "nodeType": "FunctionDefinition", "parameters": { "id": 2968, "nodeType": "ParameterList", "parameters": [], "src": "1667:2:5" }, "returnParameters": { "id": 2971, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2970, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 2972, "src": "1693:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2969, "name": "address", "nodeType": "ElementaryTypeName", "src": "1693:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1692:9:5" }, "scope": 3019, "src": "1653:49:5", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 2973, "nodeType": "StructuredDocumentation", "src": "1708:348:5", "text": "@notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\n @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\n @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\n @return The tick spacing" }, "functionSelector": "22afcccb", "id": 2980, "implemented": false, "kind": "function", "modifiers": [], "name": "feeAmountTickSpacing", "nodeType": "FunctionDefinition", "parameters": { "id": 2976, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2975, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 2980, "src": "2091:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 2974, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "2091:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" } ], "src": "2090:12:5" }, "returnParameters": { "id": 2979, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2978, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 2980, "src": "2126:5:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 2977, "name": "int24", "nodeType": "ElementaryTypeName", "src": "2126:5:5", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" } ], "src": "2125:7:5" }, "scope": 3019, "src": "2061:72:5", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 2981, "nodeType": "StructuredDocumentation", "src": "2139:471:5", "text": "@notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\n @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\n @param tokenA The contract address of either token0 or token1\n @param tokenB The contract address of the other token\n @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n @return pool The pool address" }, "functionSelector": "1698ee82", "id": 2992, "implemented": false, "kind": "function", "modifiers": [], "name": "getPool", "nodeType": "FunctionDefinition", "parameters": { "id": 2988, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2983, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 2992, "src": "2641:14:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2982, "name": "address", "nodeType": "ElementaryTypeName", "src": "2641:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2985, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 2992, "src": "2665:14:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2984, "name": "address", "nodeType": "ElementaryTypeName", "src": "2665:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2987, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 2992, "src": "2689:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 2986, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "2689:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" } ], "src": "2631:74:5" }, "returnParameters": { "id": 2991, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2990, "mutability": "mutable", "name": "pool", "nodeType": "VariableDeclaration", "scope": 2992, "src": "2729:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2989, "name": "address", "nodeType": "ElementaryTypeName", "src": "2729:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2728:14:5" }, "scope": 3019, "src": "2615:128:5", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 2993, "nodeType": "StructuredDocumentation", "src": "2749:554:5", "text": "@notice Creates a pool for the given two tokens and fee\n @param tokenA One of the two tokens in the desired pool\n @param tokenB The other of the two tokens in the desired pool\n @param fee The desired fee for the pool\n @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\n from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\n are invalid.\n @return pool The address of the newly created pool" }, "functionSelector": "a1671295", "id": 3004, "implemented": false, "kind": "function", "modifiers": [], "name": "createPool", "nodeType": "FunctionDefinition", "parameters": { "id": 3000, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2995, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 3004, "src": "3337:14:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2994, "name": "address", "nodeType": "ElementaryTypeName", "src": "3337:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2997, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 3004, "src": "3361:14:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2996, "name": "address", "nodeType": "ElementaryTypeName", "src": "3361:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2999, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 3004, "src": "3385:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 2998, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "3385:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" } ], "src": "3327:74:5" }, "returnParameters": { "id": 3003, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3002, "mutability": "mutable", "name": "pool", "nodeType": "VariableDeclaration", "scope": 3004, "src": "3420:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3001, "name": "address", "nodeType": "ElementaryTypeName", "src": "3420:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "3419:14:5" }, "scope": 3019, "src": "3308:126:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 3005, "nodeType": "StructuredDocumentation", "src": "3440:144:5", "text": "@notice Updates the owner of the factory\n @dev Must be called by the current owner\n @param _owner The new owner of the factory" }, "functionSelector": "13af4035", "id": 3010, "implemented": false, "kind": "function", "modifiers": [], "name": "setOwner", "nodeType": "FunctionDefinition", "parameters": { "id": 3008, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3007, "mutability": "mutable", "name": "_owner", "nodeType": "VariableDeclaration", "scope": 3010, "src": "3607:14:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3006, "name": "address", "nodeType": "ElementaryTypeName", "src": "3607:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "3606:16:5" }, "returnParameters": { "id": 3009, "nodeType": "ParameterList", "parameters": [], "src": "3631:0:5" }, "scope": 3019, "src": "3589:43:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 3011, "nodeType": "StructuredDocumentation", "src": "3638:326:5", "text": "@notice Enables a fee amount with the given tickSpacing\n @dev Fee amounts may never be removed once enabled\n @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\n @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount" }, "functionSelector": "8a7c195f", "id": 3018, "implemented": false, "kind": "function", "modifiers": [], "name": "enableFeeAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 3016, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3013, "mutability": "mutable", "name": "fee", "nodeType": "VariableDeclaration", "scope": 3018, "src": "3994:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 3012, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "3994:6:5", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" }, { "constant": false, "id": 3015, "mutability": "mutable", "name": "tickSpacing", "nodeType": "VariableDeclaration", "scope": 3018, "src": "4006:17:5", "stateVariable": false, "storageLocation": "default",