const event = contractInst.Transfer({},{fromBlock: 0, toBlock: 'latest'});
events.get(function (error, result) {
if (!error) {
console.log(result);
}
});
The get callback is called immidiately and always returns an empty array.
I synced rinkeby on my local machine (fast mode):
> eth.syncing
{
currentBlock: 2695904,
highestBlock: 2695974,
knownStates: 5468913,
pulledStates: 5466381,
startingBlock: 1062319
}
All the transfer events are shown on etherscan:
https://rinkeby.etherscan.io/address/0xf736de997449df5cd756c34858747786e98bcd3d#events
EDIT:
It works if I use an external node (like using metamask to fetch web3). I'm using Geth to sync my node with the following command:
geth --rinkeby --syncmode=fast --rpc --rpcaddr "0.0.0.0" --rpccorsdomain "*" --rpcapi db,eth,net,web3,personal
To connect the node I'm doing:
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io:443'));the events should be listed right? – MarcS82 Jul 30 '18 at 06:45