insight-api icon indicating copy to clipboard operation
insight-api copied to clipboard

qtumcore-node says erc20Config is empty

Open raineroviir opened this issue 7 years ago • 4 comments

error from qtumcore-node console:

[2018-02-18T22:31:55.939Z] warn: erc20Config is empty

I am attempting to use the tokens api - and I am not having success. I figure I haven't configured my node correctly to be able to do that, but let me know if that is off. I figure it is right because I have no erc20 tokens/contracts saved in my mongodb and of course the tokens api calls would return not found for something they can't find. I currently have this as my erc20Config in my qtumcore-node.json file:

      "erc20Config": {
          "updateFromBlockHeight": 0
      },

So qtumcore-node is complaining that my config is empty, is there a parameter I'm not passing in that is required for it to start recording to mongodb? I haven't had a real chance to look at the logic on how the mongodb saves happen but I will do that next

raineroviir avatar Feb 20 '18 03:02 raineroviir

Looks like the config is actually erc20, not erc20Config

https://github.com/qtumproject/insight-api/blob/580e13f82b87555aea30d51e93ac1864874c174a/lib/index.js#L79

Although after getting it to finally run, I'm running into this :(

[2018-03-13T15:20:13.985Z] error: [ERC20WATCHER] Update Error { RPCError: Events indexing disabled at Qtum._wrapRPCError (/opt/qtum/node_modules/qtumcore-node/lib/services/qtumd.js:548:13) at /opt/qtum/node_modules/qtumcore-node/lib/services/qtumd.js:2574:34 at IncomingMessage. (/opt/qtum/node_modules/qtumd-rpc/lib/index.js:107:7) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) code: -32603 }

if you get it working let us know! this and discord seem to be dead

mcalfin avatar Mar 13 '18 15:03 mcalfin

[2018-03-14T05:05:43.713Z] info: [ERC20WATCHER] Start... It worked! Nice!

As for [ERC20WATCHER] Update Error { RPCError: Events indexing disabled

I'm not 100% sure about this, but try setting all these indexes in your qtum.conf file:

Not sure which one is the events indexing but hopefully that will do it.

txindex=1 addressindex=1 addrindex=1 timestampindex=1 spentindex=1

raineroviir avatar Mar 14 '18 05:03 raineroviir

in case anyone ever ends up here with this same issue, the fixed turned out to be adding the following to qtum.conf

logevents=1

mcalfin avatar Mar 14 '18 06:03 mcalfin

in case anyone ever ends up here with this same issue, the fixed turned out to be adding the following to qtum.conf

logevents=1

anyway for using logevents=1 you must use reindex=1 too

ahsandev2019 avatar Feb 06 '21 10:02 ahsandev2019