Question : event in solidity documentation
Answered by : enchanting-eel-updhmtmth5xi
var options = { fromBlock: 0, address: web3.eth.defaultAccount, topics: ["0x0000000000000000000000000000000000000000000000000000000000000000", null, null]
};
web3.eth.subscribe('logs', options, function (error, result) { if (!error) console.log(result);
}) .on("data", function (log) { console.log(log); }) .on("changed", function (log) {
});
Source : https://docs.soliditylang.org/en/v0.8.15/contracts.html#events | Last Update : Sat, 02 Jul 22