PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

Can't deploy 99-deploy-storage-fun.js #27

Closed eszymi closed 2 years ago

eszymi commented 2 years ago

When I run command

yarn hardhat deploy --tags storage

I'm getting error

Deploying FunWithStorage and waiting for confirmations...
deploying "FunWithStorage" (tx: 0xf2ce2ca8b8683ca2c6cf0b485fc0881c410149a34ac64c5c6ae9a853175ee4b4)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 227342 gas
Logging storage...
An unexpected error occurred:

Error: ERROR processing /home/szymon/hh-fcc/hardhat-fund-me-fcc/deploy/99-deploy-storage-fun.js:
InvalidArgumentsError: Errors encountered in param 1: Invalid value "0x0000000000000000000000000000000000000000000000000000000000000000" supplied to : QUANTITY
    at validateParams (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/jsonrpc/types/input/validation.ts:64:13)
    at EthModule._getStorageAtParams (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:688:26)
    at EthModule.processRequest (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:184:49)
    at HardhatNetworkProvider._send (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:194:31)
    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 HardhatNetworkProvider.request (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:117:18)
    at EthersProviderWrapper.send (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
    at DeploymentsManager.executeDeployScripts (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:19)
    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 DeploymentsManager.runDeploy (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:5)
    at SimpleTaskDefinition.action (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat-deploy/src/index.ts:438:5)
    at Environment._runTaskDefinition (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
    at SimpleTaskDefinition.action (/home/szymon/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat-deploy/src/index.ts:584:32)
error Command failed with exit code 1.

I found that problem is in file 99-deploy-storage-fun.js. More precisely in function inside for loop

await ethers.provider.getStorageAt( funWithStorage.address, i )

When I delete this function or change it to something other I don't have error.

How should I fix this error?

eszymi commented 2 years ago

I deleted whole project and downloaded it again from github. And this time there is not any error. The issue is closed.