Replies: 6 comments 4 replies
-
The problem is in your solidity file. share your solidity code |
Beta Was this translation helpful? Give feedback.
-
// what we wanna do //SPDX-License-Identifier: MIT import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; //errors /**
contract Lottery is VRFConsumerBaseV2, KeeperCompatibleInterface{
} |
Beta Was this translation helpful? Give feedback.
-
@Mathenson in your test you add double _ in expected error like this and in your solidity contract it has single _ like this so replcae this
to this
|
Beta Was this translation helpful? Give feedback.
-
@Mathenson run |
Beta Was this translation helpful? Give feedback.
-
https://github.com/Mathenson/Lottery-Sepolia/blob/master/test/unit/Lottery.test.js thanks you can PR please if you've figure out the problem |
Beta Was this translation helpful? Give feedback.
-
@Mathenson first you have to run ` !developmentChains.includes(network.name)
` |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
THIS IS MY TEST FILE
//running the uint test on the develoment chain
const { assert, expect } = require("chai")
const { getNamedAccounts, deployments, ethers, network } = require("hardhat")
//const { isCallTrace } = require("hardhat/internal/hardhat-network/stack-traces/message-trace")
const { developmentChains, networkConfig } = require("../../helper-hardhat.config")
!developmentChains.includes(network.name)
? describe.skip
: describe("Lottery Uint Tests", async function () {
let lottery, vrfCoordinatorV2Mock, deployer, interval
const chainId = network.config.chainId
THIS IS THE ERROR AM GETTING
Lottery Uint Tests
enterLottery
reject entry during calculating period:
Error: VM Exception while processing transaction: reverted with an unrecognized custom error (return data: 0x71e83137)
at . (0x5fbdb2315678afecb367f032d93f642f64180aa3)
at Lottery.performUpkeep (contracts/Lottery.sol:141)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
at HardhatNode._mineBlockWithPendingTxs (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1840:23)
at HardhatNode.mineBlock (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:517:16)
at EthModule._sendTransactionAndReturnHash (node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:1532:18)
Lottery Uint Tests
checkUpKeep
return false if the raffle isnt open:
Error: VM Exception while processing transaction: reverted with an unrecognized custom error (return data: 0x71e83137)
at . (0x5fbdb2315678afecb367f032d93f642f64180aa3)
at Lottery.performUpkeep (contracts/Lottery.sol:141)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
at HardhatNode._mineBlockWithPendingTxs (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1840:23)
at HardhatNode.mineBlock (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:517:16)
at EthModule._sendTransactionAndReturnHash (node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:1532:18)
Beta Was this translation helpful? Give feedback.
All reactions