Would very much appreciate assistance here. I first attempted debugging the chainlink side but then went to try to execute perform upkeep through hh console and noticed that I am not able to execute it successfully.
Went through these steps:
hh deploy --network goerli
hh console --network goerli
const { ethers, deployments } = require('hardhat');
await deployments.fixture('all');
const deployer = (await ethers.getSigners())[0];
const Raffle = await ethers.getContract('Raffle', deployer);
await Raffle.enterRaffle({ value: ethers.utils.parseEther("0.01") })
// This line must return true
await Raffle.checkUpkeep([]);
// Then try to perform by yourself
await Raffle.performUpkeep([]);
checkUpkeep() at this point returns [ true, '0x', upkeepNeeded: true ]
executing performUpkeep() returns:
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted", method="estimateGas", transaction={"from":"0x97A08B37AbD78275fD84A803fBfAF87fBe6c64AF","to":"0x0b2145adf128F63902ea6F84d29e41BE8154f569","data":"0x4585e33b00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000","accessList":null}, error={"name":"ProviderError","_stack":"ProviderError: HttpProviderError\n at HttpProvider.request (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)\n at LocalAccountsProvider.request (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/providers/accounts.ts:187:34)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at EthersProviderWrapper.send (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)","code":3,"_isProviderError":true,"data":"0xf0019fe600000000000000000000000000000000000000000000000000000000000017100000000000000000000000000b2145adf128f63902ea6f84d29e41be8154f569"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)
at step (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
at EthersProviderWrapper.<anonymous> (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:642:20)
at checkError (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:78:20)
at Logger.throwError (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at Logger.makeError (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@ethersproject/logger/src.ts/index.ts:269:28) {
reason: 'execution reverted',
code: 'UNPREDICTABLE_GAS_LIMIT',
method: 'estimateGas',
transaction: {
from: '0x97A08B37AbD78275fD84A803fBfAF87fBe6c64AF',
to: '0x0b2145adf128F63902ea6F84d29e41BE8154f569',
data: '0x4585e33b00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000',
accessList: null
},
error: ProviderError: HttpProviderError
at HttpProvider.request (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
at LocalAccountsProvider.request (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/providers/accounts.ts:187:34)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at EthersProviderWrapper.send (/Users/sam/Documents/hh-fcc/hardhat-smartcontract-lottery-fcc/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
}
I tried upping the gas limit in network config but it did not seem to do anything:
I am calling performUpkeep() with the deployer address. In case the issue was with the deployer address, I tried calling again from deployer address after changing performUpkeep to public instead of external and it didn't change the outcome
Here's a link to my repo https://github.com/samwise00/hardhat-smartcontract-lottery-fcc
Would very much appreciate assistance here. I first attempted debugging the chainlink side but then went to try to execute perform upkeep through hh console and noticed that I am not able to execute it successfully.
Went through these steps:
hh deploy --network goerli
hh console --network goerli
checkUpkeep() at this point returns
[ true, '0x', upkeepNeeded: true ]
executing performUpkeep() returns:
I tried upping the gas limit in network config but it did not seem to do anything:
I am calling performUpkeep() with the deployer address. In case the issue was with the deployer address, I tried calling again from deployer address after changing performUpkeep to public instead of external and it didn't change the outcome Here's a link to my repo https://github.com/samwise00/hardhat-smartcontract-lottery-fcc
Thanks all