Skip to content

Commit

Permalink
IP addresses and file paths obfuscated.
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramErgoSum committed Aug 29, 2017
1 parent 2411fc8 commit 180fb52
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 3 additions & 3 deletions js/deploy-contract.js
Original file line number Diff line number Diff line change
@@ -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'],
Expand Down
4 changes: 2 additions & 2 deletions js/test-contract-0.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
4 changes: 2 additions & 2 deletions js/test-contract-1.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 180fb52

Please sign in to comment.