@oikos/swap
Version:
Oikos Swap Contracts
1,121 lines • 36.5 kB
JSON
{
"contractName": "IUniswapFactory",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": true,
"name": "exchange",
"type": "address"
}
],
"name": "NewExchange",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "template",
"type": "address"
}
],
"name": "initializeFactory",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "createExchange",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getExchange",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getToken",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token_id",
"type": "uint256"
}
],
"name": "getTokenWihId",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.5.0;\n\ninterface IUniswapFactory {\n event NewExchange(address indexed token, address indexed exchange);\n\n function initializeFactory(address template) external;\n function createExchange(address token) external returns (address payable);\n function getExchange(address token) external view returns (address payable);\n function getToken(address token) external view returns (address);\n function getTokenWihId(uint256 token_id) external view returns (address);\n}",
"sourcePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/merged/IUniswapFactory.sol",
"ast": {
"absolutePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/merged/IUniswapFactory.sol",
"exportedSymbols": {
"IUniswapFactory": [
1297
]
},
"id": 1298,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1257,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 1297,
"linearizedBaseContracts": [
1297
],
"name": "IUniswapFactory",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 1263,
"name": "NewExchange",
"nodeType": "EventDefinition",
"parameters": {
"id": 1262,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1259,
"indexed": true,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1263,
"src": "73:21:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1258,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "73:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1261,
"indexed": true,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1263,
"src": "96:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1260,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "96:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "72:49:6"
},
"src": "55:67:6"
},
{
"body": null,
"documentation": null,
"id": 1268,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "initializeFactory",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1266,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1265,
"name": "template",
"nodeType": "VariableDeclaration",
"scope": 1268,
"src": "153:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1264,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "153:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "152:18:6"
},
"returnParameters": {
"id": 1267,
"nodeType": "ParameterList",
"parameters": [],
"src": "179:0:6"
},
"scope": 1297,
"src": "126:54:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1275,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "createExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1271,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1270,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "207:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1269,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "207:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "206:15:6"
},
"returnParameters": {
"id": 1274,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1273,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "240:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 1272,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "240:15:6",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "239:17:6"
},
"scope": 1297,
"src": "183:74:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1282,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1277,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1282,
"src": "281:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1276,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "281:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "280:15:6"
},
"returnParameters": {
"id": 1281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1280,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1282,
"src": "319:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 1279,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "319:15:6",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "318:17:6"
},
"scope": 1297,
"src": "260:76:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1289,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getToken",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1284,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1289,
"src": "357:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1283,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "357:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "356:15:6"
},
"returnParameters": {
"id": 1288,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1287,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1289,
"src": "395:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1286,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "395:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "394:9:6"
},
"scope": 1297,
"src": "339:65:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1296,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getTokenWihId",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1292,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1291,
"name": "token_id",
"nodeType": "VariableDeclaration",
"scope": 1296,
"src": "430:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "430:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "429:18:6"
},
"returnParameters": {
"id": 1295,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1294,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1296,
"src": "471:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1293,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "471:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "470:9:6"
},
"scope": 1297,
"src": "407:73:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1298,
"src": "25:457:6"
}
],
"src": "0:482:6"
},
"legacyAST": {
"absolutePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/merged/IUniswapFactory.sol",
"exportedSymbols": {
"IUniswapFactory": [
1297
]
},
"id": 1298,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1257,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 1297,
"linearizedBaseContracts": [
1297
],
"name": "IUniswapFactory",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 1263,
"name": "NewExchange",
"nodeType": "EventDefinition",
"parameters": {
"id": 1262,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1259,
"indexed": true,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1263,
"src": "73:21:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1258,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "73:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1261,
"indexed": true,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 1263,
"src": "96:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1260,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "96:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "72:49:6"
},
"src": "55:67:6"
},
{
"body": null,
"documentation": null,
"id": 1268,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "initializeFactory",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1266,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1265,
"name": "template",
"nodeType": "VariableDeclaration",
"scope": 1268,
"src": "153:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1264,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "153:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "152:18:6"
},
"returnParameters": {
"id": 1267,
"nodeType": "ParameterList",
"parameters": [],
"src": "179:0:6"
},
"scope": 1297,
"src": "126:54:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1275,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "createExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1271,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1270,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "207:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1269,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "207:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "206:15:6"
},
"returnParameters": {
"id": 1274,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1273,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "240:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 1272,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "240:15:6",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "239:17:6"
},
"scope": 1297,
"src": "183:74:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1282,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getExchange",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1277,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1282,
"src": "281:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1276,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "281:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "280:15:6"
},
"returnParameters": {
"id": 1281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1280,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1282,
"src": "319:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 1279,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "319:15:6",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "318:17:6"
},
"scope": 1297,
"src": "260:76:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1289,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getToken",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1284,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1289,
"src": "357:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1283,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "357:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "356:15:6"
},
"returnParameters": {
"id": 1288,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1287,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1289,
"src": "395:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1286,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "395:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "394:9:6"
},
"scope": 1297,
"src": "339:65:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1296,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getTokenWihId",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1292,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1291,
"name": "token_id",
"nodeType": "VariableDeclaration",
"scope": 1296,
"src": "430:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "430:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "429:18:6"
},
"returnParameters": {
"id": 1295,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1294,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1296,
"src": "471:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1293,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "471:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "470:9:6"
},
"scope": 1297,
"src": "407:73:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 1298,
"src": "25:457:6"
}
],
"src": "0:482:6"
},
"compiler": {
"name": "solc",
"version": "0.5.8+commit.1f148fe1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2020-05-03T00:37:19.459Z"
}