the API eth.getPastLogs()
requires 4 topics to match the log indexing capabilities of the EVM. It appears to require a full 32 byte number for the match to work. i.e.
eth.getPastLogs((fromBlock:0, toBlock: 'latest', address '0xabc',
topics: [ null, '0x25', null, null ] })
will not find a topic that has
`0x0000000000000000000000000000000000000000000000000000000000000025`
in it
but this will match said topic:
eth.getPastLogs((fromBlock:0, toBlock: 'latest', address '0xabc',
topics: [ null,'0x0000000000000000000000000000000000000000000000000000000000000025', null, null ] })
So first question - is this a bug, and second question, how do I get bignumber.js to force an output of all 32 bytes? toString(16) doesn't give me the leading zeros or the '0x'. Do I have to write a special function or is there one there already in web3.js and I just can't find it?