I am trying to access an event from my contract to observe in Javascript. I expect to get c.QuantumPilotKeyPurchased but that is undefined
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
let c = new web3.eth.Contract(abi, keyaddress);
console.log(c.events);
console.log(c.QuantumPilotKeyPurchased);
Output:
node server.js
{ QuantumPilotKeyPurchased: [Function: bound ],
'0x55985f5332be13e699aaa51a5d3c003941f60e74af84533ebab5626b72cf3f51': [Function: bound ],
'QuantumPilotKeyPurchased(address)': [Function: bound ],
allEvents: [Function: bound ] }
undefined
See the above^
Why is this happening?