I am using Web3 1.3.0. Connecting using Node. Also if I try to enter the name of my Event I get an error saying that event does not exist. This is what I get, shouldn't event have a value ?
I am using Infura.
var web3 = new Web3("wss://rinkeby.infura.io/ws/v3/xxxxxxxxxxx
myContract.getPastEvents('allEvents',{fromBlock:1},function(err,results){
console.log("err:",err);
console.log("res:",results);
});
{
address: '0x822eE9b5D26a45a37885dd2B5A56C45b710C9548',
blockHash: '0x2c242dab7c5668e998b7f01f8328092caeaaa792ad482b678389ed86dc6bb33d',
blockNumber: 7319168,
logIndex: 0,
removed: false,
transactionHash: '0x54915f09e41fed2f4b4ec8a96edfd2979621dc3dac1c66dcc1b2d427b6d040e1',
transactionIndex: 0,
id: 'log_e45f6e21',
returnValues: Result {},
event: undefined,
signature: null,
raw: {
data: '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054561676c65000000000000000000000000000000000000000000000000000000',
topics: [Array]
}
{
"address": "0x822eE9b5D26a45a37885dd2B5A56C45b710C9548",
"blockHash": "0x2c242dab7c5668e998b7f01f8328092caeaaa792ad482b678389ed86dc6bb33d",
"blockNumber": 7319168,
"logIndex": 0,
"removed": false,
"transactionHash": "0x54915f09e41fed2f4b4ec8a96edfd2979621dc3dac1c66dcc1b2d427b6d040e1",
"transactionIndex": 0,
"id": "log_e45f6e21",
"returnValues": {},
"signature": null,
"raw": {
"data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054561676c65000000000000000000000000000000000000000000000000000000",
"topics": [
"0x566651c26d6867f4a0341c33295b297504f1f8445ef05b6a80d7faa24280cd2e",
"0x0000000000000000000000000000000000000000000000000000000000000060"
]
}
},
console.log(JSON.stringify(results, null, 4));
?