You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error HH210: Redefinition of task verify failed. Unsupported operation adding positional param definitions in an overridden task.
when runnig npx hardhat verify ... or other task behind adding require('@nomicfoundation/hardhat-verify') to hardhat.config.js.
This is my hardhat.config.js
require('@nomiclabs/hardhat-waffle')
// hardhat upgrade plugins
require('@nomiclabs/hardhat-ethers')
require('@openzeppelin/hardhat-upgrades')
// hardhat etherscan plugins
// require('@nomiclabs/hardhat-etherscan')
require('@nomicfoundation/hardhat-verify')
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async () => {
const accounts = await ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {...},
networks: {...},
etherscan: { // https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-etherscan#hardhat-etherscan
// Your API key for Etherscan
// Obtain one at https://etherscan.com/
apiKey: {
mainnet: '',
sepolia: '',
bsc: '',
bscTestnet: ''
}
},
}
This is the error
Error HH210: Redefinition of task verify failed. Unsupported operation adding positional param definitions in an overridden task.
HardhatError: HH210: Redefinition of task verify failed. Unsupported operation adding positional param definitions in an overridden task.
at OverriddenTaskDefinition._throwNoParamsOverrideError (/Users/bingo/workspace/contract/xxx-contract/node_modules/_hardhat@2.22.2@hardhat/src/internal/core/tasks/task-definitions.ts:758:11)
at OverriddenTaskDefinition.addOptionalPositionalParam (/Users/bingo/workspace/contract/xxx-contract/node_modules/_hardhat@2.22.2@hardhat/src/internal/core/tasks/task-definitions.ts:713:17)
at Object.<anonymous> (/Users/bingo/workspace/contract/xxx-contract/node_modules/_@nomicfoundation_hardhat-verify@2.0.5@@nomicfoundation/hardhat-verify/src/index.ts:93:4)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/Users/bingo/workspace/contract/xxx-contract/hardhat.config.js:8:1)
Version of Hardhat
2.22.2
What happened?
I got error
when runnig
npx hardhat verify ...
or other task behind addingrequire('@nomicfoundation/hardhat-verify')
to hardhat.config.js.This is my hardhat.config.js
This is the error
hardhat version:
2.22.2
@nomicfoundation/hardhat-verify version:
2.0.5
Minimal reproduction steps
require('@nomicfoundation/hardhat-verify')
to hardhat.config.js.npx hardhat verify --list-networks
Search terms
No response
The text was updated successfully, but these errors were encountered: