我正在尝试部署我的合同,但它会返回此错误。
松露迁移--网络萎缩--复位
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
Error: Error: Error: *** Deployment Failed ***
"Migrations" -- sender account not recognized.truffle_config.js
ropsten: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/<PROJECTID>")
},
network_id: "*",
gas: 4000000,
from: "0x4e2f89...."
}发布于 2020-02-09 11:27:44
默认情况下,
将使用从助记符生成的第一个地址的地址。如果您传入一个特定的索引,它将使用该地址。
因此,如果您使用的地址不是这个助记符中的第一个地址,则应该指定地址。
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>", indexOfYourAddress)或通过将数字放入第四参数来解锁多个地址。
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>",0, numberOfAddresses)https://stackoverflow.com/questions/59887082
复制相似问题