我已经配置了我的项目的名称实验室,硬帽-以太扫描和hardhat.config.ts与塞波里亚网络作为高煤气费的高利网络。
我也可以使用hardhat.config.ts部署合同,但我无法在sepolia测试网络上验证合同。
已部署合同地址:0x6Fc8481F93A4725DA1120BEF6B1E593F7956c4
这是我的hardhat.config.ts
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
},
if (process.env.NETWORK_SEPOLIA_URL !== undefined) {
console.log("Using Sepolia network");
config.networks!.testnet = {
url: process.env.NETWORK_SEPOLIA_URL,
accounts: [process.env.SEPOLIA_PRIVATE_KEY!],
}我使用的是命令hardhat verify --constructor-args config/ContractArguments.ts
这是ContractArguments.ts
import { utils } from "ethers";
import CollectionConfig from "./CollectionConfig";
// Update the following array if you change the constructor arguments...
const ContractArguments = [
CollectionConfig.tokenName,
CollectionConfig.tokenSymbol,
utils.parseEther(CollectionConfig.whitelistSale.price.toString()),
CollectionConfig.maxSupply,
CollectionConfig.whitelistSale.maxMintAmountPerTx,
CollectionConfig.hiddenMetadataUri,
] as const;
export default ContractArguments;错误: plugin @nomiclabs/hardhat-以太扫描中的错误:不支持的网络("sepolia",chainId: 11155111)。
发布于 2023-03-29 15:34:13
我也遇到了一个类似的错误,但是将@nomiclabs/hardhat-etherscan更新到最新版本对我有效。
npm update @nomiclabs/hardhat-etherscan发布于 2023-03-27 21:44:59
正如您的错误所指出的,Sepolia不支持“硬帽子-以太扫描”。
https://ethereum.stackexchange.com/questions/148038
复制相似问题