From 4ff427048a41a9e456e5f9a079db1ca6519e954f Mon Sep 17 00:00:00 2001 From: Benjamin Degenhart Date: Tue, 19 Nov 2019 00:57:02 +0100 Subject: [PATCH] Get ready for going Rinkeby --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 35dd2de..82f9b4a 100644 --- a/index.js +++ b/index.js @@ -10,8 +10,8 @@ const title = 'FIN4OracleEngine'; const HDWalletProvider = require('@truffle/hdwallet-provider'); const Tx = require('ethereumjs-tx').Transaction; const Web3 = require('web3'); -const networkID = 0; -const networkURL = 'http://localhost:7545'; // 'https://rinkeby.infura.io/v3/' + config.INFURA_API_KEY; +const networkID = 4; +const networkURL = 'https://rinkeby.infura.io/v3/' + config.INFURA_API_KEY; const provider = new HDWalletProvider(config.ORACLE_ACCOUNT.MNEMONIC, networkURL); const web3 = new Web3(provider); const accountAddress = web3.currentProvider.addresses[0]; @@ -39,7 +39,6 @@ app.post('/sensor', (request, response) => { let callFin4OracleHub = async function(sensorID, timestamp, data, response) { console.log('Attempting to call Fin4OracleHub.receiveSensorSignal()', contractAddress, sensorID, timestamp, data); - // Fin4OracleHub.receiveSensorSignal(string memory sensorID, uint timestamp, string memory data) let callData = contract.methods.receiveSensorSignal(sensorID, timestamp, data).encodeABI(); web3.eth.getGasPrice((e, gasPrice) => {