我试图验证我的部署合同从松露和得到“以太扫描没有支持网络塞波利亚与链id 11155111”错误。因此,我与以太扫描一起工作,并将我的合同部署在塞波里亚测试网上。
我该如何解决这个问题?
我的松露-config.js
const apikeys = require("./chains/apikeys");
const keys = require("./keys.json");
module.exports = {
plugins: ["truffle-plugin-verify"],
api_keys:{
etherscan: "myApiEtherScan"
},
contracts_build_directory: "./public/contracts",
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
sepolia: {
provider: () =>
new HDWalletProvider(
keys.PRIVATE_KEY,
keys.INFURA_SEPOLIA_URL,
),
network_id: 11155111,
gas:5221975,
gasPrice:20000000000,
confirmations: 3,
timeoutBlocks:200,
skipDryRun: true
}
},
compilers: {
solc: {
version: "0.8.16",
settings: {
optimizer: {
enabled: true, // Default: false
runs: 1000 // Default: 200
}
}
}
},
};发布于 2022-10-26 22:42:21
插件松露-插件验证没有Sepolia链支持
我将sepolia api url和etherscan添加到常量中,它可以工作。
const API_URLS = {
...
11155111: 'https://api-sepolia.etherscan.io/api',
...
}
const EXPLORER_URLS = {
...
11155111: 'https://sepolia.etherscan.io/address',
...
}https://stackoverflow.com/questions/74084912
复制相似问题