[英]INFURA: sender account not recognized
I am trying to deploy my contract but it returns this error我正在尝试部署我的合同,但它返回此错误
truffle migrate --network ropsten --reset松露迁移 --network ropsten --reset
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
Error: Error: Error: *** Deployment Failed ***
"Migrations" -- sender account not recognized.
truffle_config.js truffle_config.js
ropsten: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/<PROJECTID>")
},
network_id: "*",
gas: 4000000,
from: "0x4e2f89...."
}
By default, the HDWalletProvider will use the address of the first address that's generated from the mnemonic.默认情况下,HDWalletProvider 将使用从助记词生成的第一个地址的地址。 If you pass in a specific index, it'll use that address instead.如果您传入特定索引,它将使用该地址。
So if you are using address that isn't the first address from this mnemonic you should ether specify the address所以如果你使用的地址不是这个助记符的第一个地址,你应该指定地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>", indexOfYourAddress)
or unlock multiple addresses by putting number to the forth parameter或者通过将数字放在第四个参数来解锁多个地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>",0, numberOfAddresses)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.