1

Using the following code, i am trying to retrieve events:

var invoiceAbi = invoiceContractAbi;

var invoiceAddress = invoiceContractAddressAddress;

var invoiceInterface = web3.eth.contract(invoiceAbi).at(invoiceAddress);

var invoiceEvent = invoiceInterface.invoiceFinanced({}, { fromBlock: 15971, toBlock: 'latest' });


var i = 0;

invoiceEvent.watch(function (error, result) {
console.log(i++ + ": " + JSON.stringify(result));
});

I ve used actual abi and contract address. Once i run the following command, i get an error:

var invoiceEvent = invoiceInterface.invoiceFinanced({}, { fromBlock: 15971, toBlock: 'latest' });

Error:

invalid address
at web3.js:3887:15
at web3.js:3713:20
at web3.js:4939:28
at web3.js:4938:12
at web3.js:4964:18
at web3.js:4989:23
at web3.js:4055:16
at web3.js:4141:16
at <anonymous>:1:20

What should i do?

  • What is invoiceContractAddressAddress? What it contains? – Badr Bellaj Dec 21 '16 at 10:17
  • It is a good practice that accepting the answer as correct if it helped you resolved the issue. That is the whole point of SE none of the answers for your questions are marked as correct. FYI, if youre not aware of it. – niksmac Dec 22 '16 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.