Open
Description
If using ethers v6,some changes are needed.
Firstly, in ethers v6, getBalance function need use provider,
Change:
const winnerStartingBalance = await accounts[0].getBalance()
To:
const winnerStartingBalance = await ethers.provider.getBalance(accounts[1].address)
furthermore, in v6, the BigNumber class has been replaced with the built-in ES2020,
Change:
winnerStartingBalance.add(raffleEntryFee)
To:
winnerStartingBalance + raffleEntryFee
Originally posted by @RMTKroos in #5050 (comment)
Metadata
Metadata
Assignees
Labels
No labels