You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Subscribing to an event of a contract deployed to a ganache blockchain-client using events.EventName or events[eventSignature] throws an error. The syntax follows the example of the web3 docs (https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#id38).
Description
Subscribing to an event of a contract deployed to a ganache blockchain-client using events.EventName or events[eventSignature] throws an error. The syntax follows the example of the web3 docs (https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#id38).
Expected behavior
Executing this code should print the "successfully caught event" message multiple times to the console.
Actual behavior
Following error message is printed:
myContract.events.SomethingHappened is not a function
If I use events.AllEvents the command works as expected.
Steps to reproduce the behavior
let web3 = new Web3.providers.WebsocketProvider("ws://localhost:8545");
let myContract = new web3.eth.Contract(abi, address);
Error Logs
Versions
The text was updated successfully, but these errors were encountered: