-
I have been getting this error for the following piece of code. I have made all the necessary imports ( VS Code automatically did it). I have checked and deployed it on a testnet as well. I have also ensured that the "Raffle" is correctly spelt right. What have I done wrong? beforeEach(async function () {
const deployer = (await getNamedAccounts()).deployer
await deployments.fixture(["all"]) // saare scripts deployed
vrfCoordinatorV2Mock = await ethers.getContract(
"VRFCoordinatorV2Mock",
deployer
)
raffle = await ethers.getContract("Raffle", deployer)
})
describe("contructor", async function () {
it("checks to see if things are in order for us to continue", async function () {
const raffleState = raffle.getRaffleState()
assert.equal(raffleState.toString(), "0")
assert.equal(
raffle.getInterval().toString(),
networkConfig[chainId]["interval"]
)
})
}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You should check how youre exporting your deployment. Check where you write module.export in your deploy folder, check your contract name, check where you use getContract("Raffle") in your deployment file to see if you added Raffle correctly |
Beta Was this translation helpful? Give feedback.
-
Make sure you have export default class Raffle in your contract js. If yes, then check if you've imported Raffle correctly. |
Beta Was this translation helpful? Give feedback.
You should check how youre exporting your deployment. Check where you write module.export in your deploy folder, check your contract name, check where you use getContract("Raffle") in your deployment file to see if you added Raffle correctly