Replies: 3 comments 4 replies
-
Most of the code looks good but now you're testing your code in a testnet, there's no need to mock the Chainlink nodes. Changes: A. const winnerStartingBalance = await accounts[0].getBalance();
console.log(winnerStartingBalance);
const tx = await raffle.enterRaffle({ value: raffleEntranceFee });
console.log(tx);
const transactionResponse = await raffle.performUpkeep([]);
const txReceipt = await transactionResponse.wait(1);
const requestId = txReceipt.events[1].args.requestId;
console.log(requestId);
await tx.wait(1);
console.log("time to wait now"); Needs to look like this: // enter the raffle
console.log("Entering Raffle...");
const tx = await raffle.enterRaffle({ value: raffleEntranceFee });
await tx.wait(1);
console.log("Time to wait...");
const winnerStartingBalance = await accounts[0].getBalance(); In a testnet and mainnet you only need to enter the Raffle and from that point the Chainlink nodes will take over to call B. You also need to import chai at the beginning of the test: const { assert } = require("chai") |
Beta Was this translation helpful? Give feedback.
-
Recheck Link tokens on vrf and upkeep, also recheck upkeep consumer |
Beta Was this translation helpful? Give feedback.
-
well, I did not register the chainlink keeper using custom logic. that's why it was sticking. now event is picked in the promise . but now ne error is coming AssertionError: expected '345593590257924432' to equal '345770912272949262' |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
stage testing failing. testing stucks at await tx.wait(1);
Beta Was this translation helpful? Give feedback.
All reactions