From fe73f72272b5bed638d2812204240b7ba7707a9a Mon Sep 17 00:00:00 2001 From: vnonCodes Date: Thu, 10 Jun 2021 07:44:50 +0800 Subject: [PATCH] Import token.sol -> ethswap.sol Contract #1 (EthSwap) communicates with Contract #2 (DApp Token) + creates Token variable on EthSwap contract to be called for --- migrations/2_deploy_contracts.js | 2 +- src/abis/EthSwap.json | 416 ++++++++++++++++++++++++++++--- src/abis/Migrations.json | 6 +- src/abis/Token.json | 6 +- src/contracts/EthSwap.sol | 10 +- 5 files changed, 395 insertions(+), 45 deletions(-) diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index cda9003fa..86657683a 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -7,7 +7,7 @@ module.exports = async function(deployer) { const token = await Token.deployed() //Deploy EthSwap - await deployer.deploy(EthSwap); + await deployer.deploy(EthSwap, token.address); const ethSwap = await EthSwap.deployed() //Transfer all tokens to EthSwap (1 million) diff --git a/src/abis/EthSwap.json b/src/abis/EthSwap.json index 2e3280d1e..c1d95a36c 100644 --- a/src/abis/EthSwap.json +++ b/src/abis/EthSwap.json @@ -1,6 +1,18 @@ { "contractName": "EthSwap", "abi": [ + { + "inputs": [ + { + "internalType": "contract Token", + "name": "_token", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, { "constant": true, "inputs": [], @@ -15,23 +27,38 @@ "payable": false, "stateMutability": "view", "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract Token", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol\":\"EthSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol\":{\"keccak256\":\"0x82ef28356fe2e1585d9f0433885202f0453af4c5d84f4d91415c404f350050b2\",\"urls\":[\"bzz-raw://4ab413095cda5300caa4e65815309c7228f26b834ee6b4be6980595d653b45fc\",\"dweb:/ipfs/QmSQkRu5e5oUxPXowJVV4TY9ASGi96U4ftfSRtJr8WDJSZ\"]}},\"version\":1}", - "bytecode": "0x60806040526040518060400160405280601881526020017f4574685377617020496e7374616e742045786368616e676500000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610107565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b61010491905b808211156101005760008160009055506001016100e8565b5090565b90565b610186806101166000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806306fdde0314610030575b600080fd5b6100386100b3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561007857808201518184015260208101905061005d565b50505050905090810190601f1680156100a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101495780601f1061011e57610100808354040283529160200191610149565b820191906000526020600020905b81548152906001019060200180831161012c57829003601f168201915b50505050508156fea265627a7a72315820d48f005e1249df9a406ae6c2f8368d9322b33ec82dad9073994e409fac6a464f64736f6c63430005100032", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806306fdde0314610030575b600080fd5b6100386100b3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561007857808201518184015260208101905061005d565b50505050905090810190601f1680156100a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101495780601f1061011e57610100808354040283529160200191610149565b820191906000526020600020905b81548152906001019060200180831161012c57829003601f168201915b50505050508156fea265627a7a72315820d48f005e1249df9a406ae6c2f8368d9322b33ec82dad9073994e409fac6a464f64736f6c63430005100032", - "sourceMap": "25:73:0:-;;;48:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;25:73;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "25:73:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:73:0;;;;;;;;;;;;;;;;;;;48:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;48:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.5.0;\n\ncontract EthSwap {\n string public name = \"EthSwap Instant Exchange\";\n}", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Token\",\"name\":\"_token\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract Token\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol\":\"EthSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol\":{\"keccak256\":\"0x7c8bcf7248653b94b6242cf9cf9e43f5b1bb05a0f680f1ed795e212ec5ab7a53\",\"urls\":[\"bzz-raw://5cff9454d38766b0a4ad0a49ee2e56eb387cc8a51fcec69f7918fea4df9f753c\",\"dweb:/ipfs/QmfUtKTUFsikp5bdYkhAyWzdXCKHfpVwkJ8VMmAvUcQhJH\"]},\"/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/Token.sol\":{\"keccak256\":\"0x9030fca2a55f386312a637f48f53b364c61c41868e7192612ff86040d7cc985d\",\"urls\":[\"bzz-raw://f454e80fb8c1db9adeaa48b4a811c23de9f1f3e899f36ac8bae6caba37ce5a9f\",\"dweb:/ipfs/QmWV2HJL56dez2rmxofktNnzX28EDCMSiXk1BeaWDjdnu5\"]}},\"version\":1}", + "bytecode": "0x60806040526040518060400160405280601881526020017f4574685377617020496e7374616e742045786368616e676500000000000000008152506000908051906020019061004f9291906100d7565b5034801561005c57600080fd5b5060405161038c38038061038c8339818101604052602081101561007f57600080fd5b810190808051906020019092919050505080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061017c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011857805160ff1916838001178555610146565b82800160010185558215610146579182015b8281111561014557825182559160200191906001019061012a565b5b5090506101539190610157565b5090565b61017991905b8082111561017557600081600090555060010161015d565b5090565b90565b6102018061018b6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806306fdde031461003b578063fc0c546a146100be575b600080fd5b610043610108565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c66101a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561019e5780601f106101735761010080835404028352916020019161019e565b820191906000526020600020905b81548152906001019060200180831161018157829003601f168201915b505050505081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a723158206d3c8bcc7b229e7ae631c2fb8468385e9f53d208894a3969c4a0734cad2de26e64736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806306fdde031461003b578063fc0c546a146100be575b600080fd5b610043610108565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c66101a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561019e5780601f106101735761010080835404028352916020019161019e565b820191906000526020600020905b81548152906001019060200180831161018157829003601f168201915b505050505081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a723158206d3c8bcc7b229e7ae631c2fb8468385e9f53d208894a3969c4a0734cad2de26e64736f6c63430005100032", + "sourceMap": "48:168:0:-;;;71:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;149:64;8:9:-1;5:2;;;30:1;27;20:12;5:2;149:64:0;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;149:64:0;;;;;;;;;;;;;;;;200:6;192:5;;:14;;;;;;;;;;;;;;;;;;149:64;48:168;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "48:168:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48:168:0;;;;;;;;;;;;;;;;;;;;;;;;71:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;71:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;71:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;124:18::-;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.5.0;\n\nimport \"./Token.sol\";\n\ncontract EthSwap {\n string public name = \"EthSwap Instant Exchange\";\n Token public token;\n\n constructor(Token _token) public {\n token = _token;\n }\n\n}\n", "sourcePath": "/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol", "ast": { "absolutePath": "/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol", "exportedSymbols": { "EthSwap": [ - 5 + 18 ] }, - "id": 6, + "id": 19, "nodeType": "SourceUnit", "nodes": [ { @@ -45,26 +72,37 @@ "nodeType": "PragmaDirective", "src": "0:23:0" }, + { + "absolutePath": "/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/Token.sol", + "file": "./Token.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 19, + "sourceUnit": 200, + "src": "25:21:0", + "symbolAliases": [], + "unitAlias": "" + }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 5, + "id": 18, "linearizedBaseContracts": [ - 5 + 18 ], "name": "EthSwap", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 4, + "id": 5, "name": "name", "nodeType": "VariableDeclaration", - "scope": 5, - "src": "48:47:0", + "scope": 18, + "src": "71:47:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -72,10 +110,10 @@ "typeString": "string" }, "typeName": { - "id": 2, + "id": 3, "name": "string", "nodeType": "ElementaryTypeName", - "src": "48:6:0", + "src": "71:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -84,14 +122,14 @@ "value": { "argumentTypes": null, "hexValue": "4574685377617020496e7374616e742045786368616e6765", - "id": 3, + "id": 4, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "69:26:0", + "src": "92:26:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_0cd767832a4b45e13c98bb05545343ab53826a9ea9075205b12bb04a1062f40e", @@ -100,20 +138,156 @@ "value": "EthSwap Instant Exchange" }, "visibility": "public" + }, + { + "constant": false, + "id": 7, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 18, + "src": "124:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + }, + "typeName": { + "contractScope": null, + "id": 6, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 199, + "src": "124:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 16, + "nodeType": "Block", + "src": "182:31:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 14, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "192:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 13, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + } + }, + "src": "192:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + } + }, + "id": 15, + "nodeType": "ExpressionStatement", + "src": "192:14:0" + } + ] + }, + "documentation": null, + "id": 17, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 10, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "161:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + }, + "typeName": { + "contractScope": null, + "id": 8, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 199, + "src": "161:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$199", + "typeString": "contract Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "160:14:0" + }, + "returnParameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [], + "src": "182:0:0" + }, + "scope": 18, + "src": "149:64:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" } ], - "scope": 6, - "src": "25:73:0" + "scope": 19, + "src": "48:168:0" } ], - "src": "0:98:0" + "src": "0:217:0" }, "legacyAST": { "attributes": { "absolutePath": "/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/EthSwap.sol", "exportedSymbols": { "EthSwap": [ - 5 + 18 ] } }, @@ -131,6 +305,21 @@ "name": "PragmaDirective", "src": "0:23:0" }, + { + "attributes": { + "SourceUnit": 200, + "absolutePath": "/Users/irfan/Documents/vsCode/00-cryptoexchange/crypto_exch/src/contracts/Token.sol", + "file": "./Token.sol", + "scope": 19, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "25:21:0" + }, { "attributes": { "baseContracts": [ @@ -143,17 +332,17 @@ "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 5 + 18 ], "name": "EthSwap", - "scope": 6 + "scope": 19 }, "children": [ { "attributes": { "constant": false, "name": "name", - "scope": 5, + "scope": 18, "stateVariable": true, "storageLocation": "default", "type": "string", @@ -165,9 +354,9 @@ "name": "string", "type": "string" }, - "id": 2, + "id": 3, "name": "ElementaryTypeName", - "src": "48:6:0" + "src": "71:6:0" }, { "attributes": { @@ -182,24 +371,177 @@ "type": "literal_string \"EthSwap Instant Exchange\"", "value": "EthSwap Instant Exchange" }, - "id": 3, + "id": 4, "name": "Literal", - "src": "69:26:0" + "src": "92:26:0" } ], - "id": 4, + "id": 5, "name": "VariableDeclaration", - "src": "48:47:0" + "src": "71:47:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 18, + "stateVariable": true, + "storageLocation": "default", + "type": "contract Token", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Token", + "referencedDeclaration": 199, + "type": "contract Token" + }, + "id": 6, + "name": "UserDefinedTypeName", + "src": "124:5:0" + } + ], + "id": 7, + "name": "VariableDeclaration", + "src": "124:18:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 18, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 17, + "stateVariable": false, + "storageLocation": "default", + "type": "contract Token", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Token", + "referencedDeclaration": 199, + "type": "contract Token" + }, + "id": 8, + "name": "UserDefinedTypeName", + "src": "161:5:0" + } + ], + "id": 9, + "name": "VariableDeclaration", + "src": "161:12:0" + } + ], + "id": 10, + "name": "ParameterList", + "src": "160:14:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 11, + "name": "ParameterList", + "src": "182:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "contract Token" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7, + "type": "contract Token", + "value": "token" + }, + "id": 12, + "name": "Identifier", + "src": "192:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 9, + "type": "contract Token", + "value": "_token" + }, + "id": 13, + "name": "Identifier", + "src": "200:6:0" + } + ], + "id": 14, + "name": "Assignment", + "src": "192:14:0" + } + ], + "id": 15, + "name": "ExpressionStatement", + "src": "192:14:0" + } + ], + "id": 16, + "name": "Block", + "src": "182:31:0" + } + ], + "id": 17, + "name": "FunctionDefinition", + "src": "149:64:0" } ], - "id": 5, + "id": 18, "name": "ContractDefinition", - "src": "25:73:0" + "src": "48:168:0" } ], - "id": 6, + "id": 19, "name": "SourceUnit", - "src": "0:98:0" + "src": "0:217:0" }, "compiler": { "name": "solc", @@ -209,12 +551,12 @@ "5777": { "events": {}, "links": {}, - "address": "0xf9BD230Ba6E193aCa13689a18641e239E5c41F63", - "transactionHash": "0x4a83921d3261262766f2bcaca211b5af3274e9da7b77f69e5f7db8682ccb2896" + "address": "0xC96b48969a64bcEA7709f0CcEB2FF1a3FF090229", + "transactionHash": "0xe9bdfcc4fca7729e67629c6145c708ccfb710b43d55a095ced842ccf79792d90" } }, "schemaVersion": "3.4.1", - "updatedAt": "2021-06-09T09:49:18.007Z", + "updatedAt": "2021-06-09T23:40:34.508Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/src/abis/Migrations.json b/src/abis/Migrations.json index 2d22e4d1d..49dc42fc1 100644 --- a/src/abis/Migrations.json +++ b/src/abis/Migrations.json @@ -1475,12 +1475,12 @@ "5777": { "events": {}, "links": {}, - "address": "0xb6aD1f8b6471a7E6E62597cF7E05398696f9d258", - "transactionHash": "0xc300301f7d11b49c832952e7396c9ad8ffd6c07e7a750e892c6e9f48a5e799be" + "address": "0x4e9cb0F4ce9874d4482a58B0E92F6e7169cDbab6", + "transactionHash": "0x18804543f865202509068739509a8a081a6def0711999ddd6bd2d619b6749480" } }, "schemaVersion": "3.4.1", - "updatedAt": "2021-06-09T09:49:18.011Z", + "updatedAt": "2021-06-09T23:40:34.509Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/src/abis/Token.json b/src/abis/Token.json index 8d2533494..573b8605e 100644 --- a/src/abis/Token.json +++ b/src/abis/Token.json @@ -5134,12 +5134,12 @@ } }, "links": {}, - "address": "0x57B19BdfA40147429631a20e946A46e12c13032F", - "transactionHash": "0xa631c9da846ad323d5485bf803ad1edd632354d75c7d4a52ff0e3ed95a14e980" + "address": "0x86d3B23f05DEcB17B76fa84F9Fa15F1F50243155", + "transactionHash": "0xa2bcbcbc7df09ec835706183977f3074ff21a72ef447b4b792a6d60d3bbd44dc" } }, "schemaVersion": "3.4.1", - "updatedAt": "2021-06-09T09:49:18.004Z", + "updatedAt": "2021-06-09T23:40:34.504Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/src/contracts/EthSwap.sol b/src/contracts/EthSwap.sol index 83282e92c..e6af942b6 100644 --- a/src/contracts/EthSwap.sol +++ b/src/contracts/EthSwap.sol @@ -1,5 +1,13 @@ pragma solidity ^0.5.0; +import "./Token.sol"; + contract EthSwap { string public name = "EthSwap Instant Exchange"; -} \ No newline at end of file + Token public token; + + constructor(Token _token) public { + token = _token; + } + +}