Lesson 10: I am not getting the recent winner #4995
-
When I yarn hardhat run scripts/mockOffchain.js --network localhost I copy the mockOffchain file from Patric's github file, yarn hardhat run scripts/mockOffchain.js --network localhost |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@umairahmed88 Leave your repository link. |
Beta Was this translation helpful? Give feedback.
-
As you are running it on networks: {
hardhat: {
chainId: 31337,
blockConfirmations: 1,
// gasPrice: 130000000000,
},
localhost: {
chainId: 31337,
blockConfirmations: 1,
}, It also seems like your |
Beta Was this translation helpful? Give feedback.
-
I am facing the same problem here; upkeepNeeded is always returning false. Could anyone help, please? |
Beta Was this translation helpful? Give feedback.
Hi @umairahmed88
As you are running it on
localhost
network, so you should define it in yourhardhat.config.js
file like below:It also seems like your
checkUpkeep
function throws false, so you can take a look at that too to print if it throws false or true and correct it if it throws fail.