@levelk/token-price-oracles
Version:
tools for creating token price data feeds and oracles that integrate with on-chain dex's
1,098 lines • 35 kB
JSON
{
"contractName": "UniswapFactoryInterface",
"abi": [
{
"constant": true,
"inputs": [],
"name": "exchangeTemplate",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "tokenCount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "createExchange",
"outputs": [
{
"name": "exchange",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getExchange",
"outputs": [
{
"name": "exchange",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "exchange",
"type": "address"
}
],
"name": "getToken",
"outputs": [
{
"name": "token",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenId",
"type": "uint256"
}
],
"name": "getTokenWithId",
"outputs": [
{
"name": "token",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "template",
"type": "address"
}
],
"name": "initializeFactory",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity >=0.4.24;\n\ncontract UniswapFactoryInterface {\n // Public Variables\n address public exchangeTemplate;\n uint256 public tokenCount;\n // Create Exchange\n function createExchange(address token) external returns (address exchange);\n // Get Exchange and Token Info\n function getExchange(address token) external view returns (address exchange);\n function getToken(address exchange) external view returns (address token);\n function getTokenWithId(uint256 tokenId) external view returns (address token);\n // Never use\n function initializeFactory(address template) external;\n}\n",
"sourcePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/ExchangeAdapters/Uniswap/UniswapFactoryInterface.sol",
"ast": {
"absolutePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/ExchangeAdapters/Uniswap/UniswapFactoryInterface.sol",
"exportedSymbols": {
"UniswapFactoryInterface": [
1024
]
},
"id": 1025,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 986,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:5"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1024,
"linearizedBaseContracts": [
1024
],
"name": "UniswapFactoryInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 988,
"name": "exchangeTemplate",
"nodeType": "VariableDeclaration",
"scope": 1024,
"src": "90:31:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 987,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "90:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 990,
"name": "tokenCount",
"nodeType": "VariableDeclaration",
"scope": 1024,
"src": "127:25:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 989,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "127:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 997,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 993,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 992,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 997,
"src": "205:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 991,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "205:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "204:15:5"
},
"payable": false,
"returnParameters": {
"id": 996,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 995,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 997,
"src": "238:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 994,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "238:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "237:18:5"
},
"scope": 1024,
"src": "181:75:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1004,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1000,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 999,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1004,
"src": "317:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 998,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "317:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "316:15:5"
},
"payable": false,
"returnParameters": {
"id": 1003,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1002,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1004,
"src": "355:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1001,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "355:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "354:18:5"
},
"scope": 1024,
"src": "296:77:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1011,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getToken",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1007,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1006,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1011,
"src": "396:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1005,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "396:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "395:18:5"
},
"payable": false,
"returnParameters": {
"id": 1010,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1009,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1011,
"src": "437:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1008,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "437:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "436:15:5"
},
"scope": 1024,
"src": "378:74:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1018,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getTokenWithId",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1014,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1013,
"name": "tokenId",
"nodeType": "VariableDeclaration",
"scope": 1018,
"src": "481:15:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1012,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "481:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:17:5"
},
"payable": false,
"returnParameters": {
"id": 1017,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1016,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1018,
"src": "521:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1015,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "520:15:5"
},
"scope": 1024,
"src": "457:79:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1023,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "initializeFactory",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1021,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1020,
"name": "template",
"nodeType": "VariableDeclaration",
"scope": 1023,
"src": "585:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1019,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "585:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "584:18:5"
},
"payable": false,
"returnParameters": {
"id": 1022,
"nodeType": "ParameterList",
"parameters": [],
"src": "611:0:5"
},
"scope": 1024,
"src": "558:54:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1025,
"src": "27:587:5"
}
],
"src": "0:615:5"
},
"legacyAST": {
"absolutePath": "/Users/mfcalvanese/dev/eth/token-price-oracles/contracts/ExchangeAdapters/Uniswap/UniswapFactoryInterface.sol",
"exportedSymbols": {
"UniswapFactoryInterface": [
1024
]
},
"id": 1025,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 986,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:5"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1024,
"linearizedBaseContracts": [
1024
],
"name": "UniswapFactoryInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 988,
"name": "exchangeTemplate",
"nodeType": "VariableDeclaration",
"scope": 1024,
"src": "90:31:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 987,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "90:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 990,
"name": "tokenCount",
"nodeType": "VariableDeclaration",
"scope": 1024,
"src": "127:25:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 989,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "127:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 997,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 993,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 992,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 997,
"src": "205:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 991,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "205:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "204:15:5"
},
"payable": false,
"returnParameters": {
"id": 996,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 995,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 997,
"src": "238:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 994,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "238:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "237:18:5"
},
"scope": 1024,
"src": "181:75:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1004,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1000,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 999,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1004,
"src": "317:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 998,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "317:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "316:15:5"
},
"payable": false,
"returnParameters": {
"id": 1003,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1002,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1004,
"src": "355:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1001,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "355:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "354:18:5"
},
"scope": 1024,
"src": "296:77:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1011,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getToken",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1007,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1006,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1011,
"src": "396:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1005,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "396:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "395:18:5"
},
"payable": false,
"returnParameters": {
"id": 1010,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1009,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1011,
"src": "437:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1008,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "437:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "436:15:5"
},
"scope": 1024,
"src": "378:74:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1018,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getTokenWithId",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1014,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1013,
"name": "tokenId",
"nodeType": "VariableDeclaration",
"scope": 1018,
"src": "481:15:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1012,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "481:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:17:5"
},
"payable": false,
"returnParameters": {
"id": 1017,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1016,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1018,
"src": "521:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1015,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "520:15:5"
},
"scope": 1024,
"src": "457:79:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1023,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "initializeFactory",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1021,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1020,
"name": "template",
"nodeType": "VariableDeclaration",
"scope": 1023,
"src": "585:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1019,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "585:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "584:18:5"
},
"payable": false,
"returnParameters": {
"id": 1022,
"nodeType": "ParameterList",
"parameters": [],
"src": "611:0:5"
},
"scope": 1024,
"src": "558:54:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1025,
"src": "27:587:5"
}
],
"src": "0:615:5"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.2",
"updatedAt": "2020-02-17T22:26:48.001Z"
}