I have the following config in my hardhat config file
hardhat: {
forking: {
url: my-alchemy-url,
},
}
when i run hardhat test i get the following error
Error: Invalid signature v value
at Object.exports.ecrecover (node_modules/hardhat/node_modules/ethereumjs-util/src/signature.ts:46:11)
at new ForkTransaction (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkTransaction.ts:32:26)
at ForkBlockchain._processRemoteBlock (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts:250:9)
at ForkBlockchain._getBlockByNumber (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts:226:17)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at ForkBlockchain.getLatestBlock (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts:40:19)
at HardhatNode.takeSnapshot (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:645:20)
at HardhatNode._runInPendingBlockContext (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1421:24)
at HardhatNode.estimateGas (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:459:20)
at EthModule._estimateGasAction (node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:396:9)
at HardhatNetworkProvider.request (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:100:18)
at EthersProviderWrapper.send (node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
I am also experiencing this issue, but with the hardhat network(not ganache). I'm thinking they might be related. No matter what I try, it always seems to come back to:
npx hardhat test
Contract - Deployed
1) "before each" hook for "Should provide sanity"
0 passing (5s)
1 failing
1) Contract - Deployed
"before each" hook for "Should provide sanity":
Error: Invalid signature v value
at Object.exports.ecrecover (node_modules/ethereumjs-util/src/signature.ts:46:11)
at new ForkTransaction (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkTransaction.ts:32:26)
at ForkBlockchain._processRemoteBlock (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts:250:9)
at ForkBlockchain._getBlockByNumber (node_modules/hardhat/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts:226:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! eons@1.0.0 test: `npx hardhat test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2021-09-22T13_38_48_243Z-debug.log
My-MacBook-Pro:project me$
As far as code to reproduce, here is my hardhat config setting for the mainnet fork:
Yes that is the error i am getting. I'm unsure why. I'm following the direction then running yarn test and i just get invalid signature V soon as i send a transaction