Skip to main content
Bumped by Community user
added 28 characters in body
Source Link
Rob Hitchens
  • 55.6k
  • 11
  • 91
  • 146

I am trying to read events from a contract already deployed on the blockchain. The event might return uint which is has the indexed property.

First I was using web3 from metamask and worked normally, but I want to use infura now, independently if the user has metamask or not. So I created the websocket but when I try to read I get this error: Error: Returned values aren't valid, did it run Out of Gas.

Searching on the web some people say is because the returned value from the event has the property indexed, I could change the contract, but do not feel like I should.

Has anyone else came across this type of error?

I am using vue... The way I am calling the event is:

getADN() { let ADNCreated = this.$store.state.contractADN().getPastEvents('allEvents', { fromBlock:0, toBlock: 'latest' }, function(error, events){ console.log("error:", error); }).then(function(events){ console.log(events) // same results as the optional callback above });

getADN() {
  let ADNCreated = this.$store.state.contractADN().getPastEvents('allEvents', {
      fromBlock:0,
      toBlock: 'latest'
  }, function(error, events){ console.log("error:", error); }).then(function(events){
    console.log(events) // same results as the optional callback above
  });

As you can see there is nothing much special about it.

I am trying to read events from a contract already deployed on the blockchain. The event might return uint which is has the indexed property.

First I was using web3 from metamask and worked normally, but I want to use infura now, independently if the user has metamask or not. So I created the websocket but when I try to read I get this error: Error: Returned values aren't valid, did it run Out of Gas.

Searching on the web some people say is because the returned value from the event has the property indexed, I could change the contract, but do not feel like I should.

Has anyone else came across this type of error?

I am using vue... The way I am calling the event is:

getADN() { let ADNCreated = this.$store.state.contractADN().getPastEvents('allEvents', { fromBlock:0, toBlock: 'latest' }, function(error, events){ console.log("error:", error); }).then(function(events){ console.log(events) // same results as the optional callback above });

As you can see there is nothing much special about it.

I am trying to read events from a contract already deployed on the blockchain. The event might return uint which is has the indexed property.

First I was using web3 from metamask and worked normally, but I want to use infura now, independently if the user has metamask or not. So I created the websocket but when I try to read I get this error: Error: Returned values aren't valid, did it run Out of Gas.

Searching on the web some people say is because the returned value from the event has the property indexed, I could change the contract, but do not feel like I should.

Has anyone else came across this type of error?

I am using vue... The way I am calling the event is:

getADN() {
  let ADNCreated = this.$store.state.contractADN().getPastEvents('allEvents', {
      fromBlock:0,
      toBlock: 'latest'
  }, function(error, events){ console.log("error:", error); }).then(function(events){
    console.log(events) // same results as the optional callback above
  });

As you can see there is nothing much special about it.

Source Link

Problem reading events, with web3 v1.0 beta 36 and infura

I am trying to read events from a contract already deployed on the blockchain. The event might return uint which is has the indexed property.

First I was using web3 from metamask and worked normally, but I want to use infura now, independently if the user has metamask or not. So I created the websocket but when I try to read I get this error: Error: Returned values aren't valid, did it run Out of Gas.

Searching on the web some people say is because the returned value from the event has the property indexed, I could change the contract, but do not feel like I should.

Has anyone else came across this type of error?

I am using vue... The way I am calling the event is:

getADN() { let ADNCreated = this.$store.state.contractADN().getPastEvents('allEvents', { fromBlock:0, toBlock: 'latest' }, function(error, events){ console.log("error:", error); }).then(function(events){ console.log(events) // same results as the optional callback above });

As you can see there is nothing much special about it.