INFURA:无法识别发件人帐户
INFURA: sender account not recognized
我正在尝试部署我的合约,但是 returns 这个错误
truffle migrate --network ropsten --reset
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...."
}
By default, the HDWalletProvider will use the address of the first
address that's generated from the mnemonic. If you pass in a specific
index, it'll use that address instead.
因此,如果您使用的地址不是此助记符的第一个地址,您应该指定地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>", indexOfYourAddress)
或者通过在第四个参数中输入数字来解锁多个地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>",0, numberOfAddresses)
我正在尝试部署我的合约,但是 returns 这个错误
truffle migrate --network ropsten --reset
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...."
}
By default, the HDWalletProvider will use the address of the first address that's generated from the mnemonic. If you pass in a specific index, it'll use that address instead.
因此,如果您使用的地址不是此助记符的第一个地址,您应该指定地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>", indexOfYourAddress)
或者通过在第四个参数中输入数字来解锁多个地址
HDWalletProvider(mnemonic, "ropsten.infura.io/v3/<PROJECTID>",0, numberOfAddresses)