I kind a timeout error while running a unit test for a lottery smart contract, I already set the mocha properly inside the hardhat config, I honestly do not know where the error is coming from

Jan 12, 2024, 1:18 PM
I created a discussion for it on github, for anyone who cares to help, here is the link to the discussion : https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/6393
Jan 12, 2024, 1:18 PM
are you sure it's "setTimeout" and not "timeout"?
i found this in one of my old scripts but.. it's old.
Instead in your code i see "setTimeout" in the mocha key
try replace this with "timeout" and retry
Jan 12, 2024, 4:23 PM
I actually used both, but I am still getting the same timeout error
I already used both, same issue
Jan 12, 2024, 5:05 PM
🤔
Jan 12, 2024, 5:05 PM
sigh 😮‍💨
Do you’ve know of any other way to run an event listener on hardhat under the chainlink VRF

The error is particularly on this line : raffle.once("WinnerPicked", async () => {}
Jan 12, 2024, 8:26 PM
You can use ethers.js directly, not hardhat
Or web3py, they have a nice websocket connector since last summer
Or ethers-rs :P
Jan 12, 2024, 8:31 PM
Alright
Thanks
Is this rust ?
Alright
Jan 12, 2024, 8:36 PM
yep
Jan 12, 2024, 8:47 PM
Ok
I’m not familiar with it
Jan 12, 2024, 11:04 PM
me neither tbh
i just used the docs made by @gakonst https://www.gakonst.com/ethers-rs/ , co-pilot on VSCode and https://rust-book.cs.brown.edu/
rust is very powerful when you need speed of execution, it's the language behind Foundry
i did a web3py vs ethers-rs and i saw 10-100x less time to execute the same logic thing
but we're talking about milliseconds
Jan 12, 2024, 11:09 PM
Yes I understand
But I just wanted to be very familiar with hardhat before delving into foundry
I understand foundry is actually the best solidity framework for testing smart contract
Jan 13, 2024, 7:45 AM

© 2024 Draquery.com All rights reserved.