Closed AngeloPauli closed 3 years ago
Possible dup of #3936.
We released some changes that might have fixed this problem in v5.3.0. Can anyone confirm that this is fixed or that it still is an issue on current Truffle?
Worked fine with "@truffle/hdwallet-provider": "1.2.6"
and "truffle": "5.3.0"
.
Provider config:
provider: function () {
return new HDWalletProvider({
privateKeys: [PRIVATE_KEY],
providerOrUrl: ETH_HOSTNAME,
})
},
Closing this as I believe it is resolved on the most recent version of @truffle/hdwallet-provider
Hello, I am trying to deploy my contracts to the Ropsten Testnet (Infura). The Account which is shown in the Simulation is fine. I've read online that I should downgrade to HDWalletProvider 1.2.2, but this didn't solve my issue. The simulation works just fine so I am really not sure what the issue is.
Hopefully, someone can help me:)
Error Message: angelo@angelo-X570-GAMING-X:~/Schreibtisch/Blockchain_Dev/Tokenprojekt$ truffle deploy --network ropsten_infura
Compiling your contracts...
Migrations dry-run (simulation)
1_initial_migration.js
Deploying 'Migrations'
2_deploy_contracts.js
Deploying 'MyToken'
Deploying 'KycContract'
Deploying 'MyTokenSale'
Summary
Starting migrations...
1_initial_migration.js
Deploying 'Migrations'
Error: Deployment Failed
"Migrations" -- invalid sender.
Truffle v5.2.4 (core: 5.2.4) Node v12.21.0
truffle-config.js:
const path = require("path"); require("dotenv").config({path: "./.env"}); const HDWalletProvider = require("@truffle/hdwallet-provider"); const AccountIndex = 0;
module.exports = { // See http://truffleframework.com/docs/advanced/configuration // to customize your Truffle configuration! contracts_build_directory: path.join(__dirname, "client/src/contracts"), networks: { development: { port: 7545, host: "127.0.0.1", network_id: 5777 }, ganache_local: { provider: function() { return new HDWalletProvider(process.env.MNEMONIC, "http://127.0.0.1:7545", AccountIndex) }, network_id: 5777 }, goerli_infura: { provider: function() { return new HDWalletProvider(process.env.MNEMONIC, "https://goerli.infura.io/v3/85fd59c2d0d64c2fb71d21b4b4ab266a", AccountIndex) }, network_id: 5 }, ropsten_infura: { provider: function() { return new HDWalletProvider(process.env.MNEMONIC, "https://ropsten.infura.io/v3/85fd59c2d0d64c2fb71d21b4b4ab266a", AccountIndex) }, network_id: 3 } }, compilers: { solc: { version: "0.6.1" } } };