Skip to content

Lesson 10 | contract.on("WinnerPicked") doesnt work #4868

Discussion options

You must be logged in to vote

After searching a bit, i didnt find anything but kind people in discord helped me
### const { chainId: chainIdHex, enableWeb3, isWeb3Enabled } = useMoralis()

` const checkEvents = async () => {

    const provider = await enableWeb3()
    const raffle = new ethers.Contract(raffleAddress, abi, provider)

    raffle.on("RaffleEnter", () => {})
    raffle.on("RequestedRaffleWinner",() => {})
    raffle.on("WinnerPicked", () => {})
}`

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@AstroUserName
Comment options

@Leekkelly
Comment options

@AstroUserName
Comment options

@Leekkelly
Comment options

@Leekkelly
Comment options

Answer selected by AstroUserName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants