Hi there,
I’m trying to deploy my smart contracts to Ropsten test network using hdwallet provider and Infura but I’ve been going crazy because of this error I cannot solve:
Starting migrations…
Network name: ‘ropsten’
Network id: 3
Block gas limit: 8000000 (0x7a1200)
1_initial_migration.js
Deploying ‘Migrations’
Error: *** Deployment Failed ***
“Migrations” – senderAddress.toLowerCase is not a function.
My truffle-config.js file configuration is the following:
const HDWalletProvider = require(‘@truffle/hdwallet-provider’);
const infuraKey = “keynumber”
const fs = require(‘fs’);
const mnemonic = fs.readFileSync(“.secret”).toString().trim();
module.exports = {
ropsten: {
provider: () =>
new HDWalletProvider(mnemonic, https://ropsten.infura.io/v3/${infuraKey}
),
network_id: 3, // Ropsten’s id
from: ganache first address,
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},
}
Could someone give a me a hint? Any help will be very appreciated!