diff --git a/README.md b/README.md index 877aaee..19c6545 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ To get average, run `node test-contract-1.js` with updated IP address and contra # Known bugs -1. Random number is hard-coded. Using randao is an option. +1. Random number is hard-coded. Using `randao` is an option. 2. Any list member can initiate addition of numbers. The addition should be initated by list owner. 3. Calculation of average happens if all members have not provided their numbers for addition. 4. Running total is saved on the blockchain and therefore, publicly visible. diff --git a/js/deploy-contract.js b/js/deploy-contract.js index 2b29216..56d9cef 100644 --- a/js/deploy-contract.js +++ b/js/deploy-contract.js @@ -1,11 +1,11 @@ var Web3 = require('web3'); var fs = require('fs'); // -var ethHttpProvider = new Web3.providers.HttpProvider("http://18.221.29.91:8545"); +var ethHttpProvider = new Web3.providers.HttpProvider("http://18.xxx.xxx.xxx:8545"); var web3 = new Web3(ethHttpProvider); -var abiFile = fs.readFileSync('/Users/nsubrahm/wrkspc-sol/lister/lister/bin/sol/Lister.abi').toString(); +var abiFile = fs.readFileSync('Lister.abi').toString(); var abiDef = JSON.parse(abiFile); -var byteCode = fs.readFileSync('/Users/nsubrahm/wrkspc-sol/lister/lister/bin/sol/Lister.bin').toString(); +var byteCode = fs.readFileSync('Lister.bin').toString(); // var listContract = web3.eth.contract(abiDef); var deployedContract = listContract.new(['A'], diff --git a/js/test-contract-0.js b/js/test-contract-0.js index be561ca..b660966 100644 --- a/js/test-contract-0.js +++ b/js/test-contract-0.js @@ -1,8 +1,8 @@ var Web3 = require('web3'); var fs = require('fs'); // -var web3 = new Web3(new Web3.providers.HttpProvider("http://18.221.29.91:8545")); -var abiFile = fs.readFileSync('/Users/nsubrahm/wrkspc-sol/lister/lister/bin/sol/Lister.abi').toString(); +var web3 = new Web3(new Web3.providers.HttpProvider("http://18.xxx.xxxx.xxx:8545")); +var abiFile = fs.readFileSync('Lister.abi').toString(); var abiDef = JSON.parse(abiFile); var ListingContract = web3.eth.contract(abiDef); var contractInstance = ListingContract.at('0x2a30f190a7d5abd6070d9ed5ec06fb4ab410bcc0'); diff --git a/js/test-contract-1.js b/js/test-contract-1.js index 6cfe8b0..d5282fa 100644 --- a/js/test-contract-1.js +++ b/js/test-contract-1.js @@ -1,8 +1,8 @@ var Web3 = require('web3'); var fs = require('fs'); // -var web3 = new Web3(new Web3.providers.HttpProvider("http://18.221.29.91:8545")); -var abiFile = fs.readFileSync('/Users/nsubrahm/wrkspc-sol/lister/lister/bin/sol/Lister.abi').toString(); +var web3 = new Web3(new Web3.providers.HttpProvider("http://18.xxx.xxx.xxx:8545")); +var abiFile = fs.readFileSync('Lister.abi').toString(); var abiDef = JSON.parse(abiFile); var ListingContract = web3.eth.contract(abiDef); var contractInstance = ListingContract.at('0x2a30f190a7d5abd6070d9ed5ec06fb4ab410bcc0');