Lesson 9 Error: Transaction reverted without a reason string #1809
navillanueva
started this conversation in
General
Replies: 1 comment
-
In first test it("doesn't allow entrance when raffle is calculating", async () => {
// to test this we have to be able to execute checkUpKeep and performUpKeep
await raffle.enterRaffle({ value: raffleEntranceFee }) // to be able to change the raffle state to calculating
// for a documentation of the methods below, go here: https://hardhat.org/hardhat-network/reference
await network.provider.send("evm_increaseTime", [interval.toNumber() + 1]) // so we are manually going to set the parameters for checkUpKeep to be able to run
await network.provider.request({ method: "evm_mine", params: [] })
// we pretend to be a keeper for a second
await raffle.performUpkeep([]) // changes the state to calculating for our comparison below
await expect(raffle.enterRaffle({ value: raffleEntranceFee })).to.be.revertedWith(
// is reverted as raffle is calculating
"Raffle__RaffleNotOpen"
)
}) change this line await network.provider.request({ method: "evm_mine", params: [] }) with await network.provider.send("evm_mine", []); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I keep getting this error:
when i run these two tests:
And:
I copied the contract Raffle.sol code directly from the repository of lesson 9 and it still doesn´t work. Both of the tests i also manually copied from the repo. I will include my hardhat.config.js:
And the helper-hardhat-config.js file:
Becuase i think it is the only place where the error could be, since the contract code and tests are imported from the github repo for lesson 9. Does someone know why this is happening?
Beta Was this translation helpful? Give feedback.
All reactions