Binance Testnet Deployment Error: Could not create addresses from your mnemonic or private key(s)

Hi. I was trying to deploy my contract to Binance Smart Chain Testnet and I got this error.

Error: Could not create addresses from your mnemonic or private key(s). Please check that your inputs are correct.
https://pastebin.pl/view/b732beb9

My Truffle Config File
https://pastebin.pl/view/c0ea2082

My .env File
ETHERSCAN_API_KEY=https://data-seed-prebsc-1-s1.binance.org:8545/ INFURA_API_KEY=https://data-seed-prebsc-1-s1.binance.org:8545/ PRIVATE_KEYS="94916477xxxxx57ad13xxd9fe5f94456e412xxf5388014fxxxxxxxed" DEV_ADDRESS="0xxxxx43EBCab9xxxCeC9d9e2a491xxxxxxC"

1 Like

It seems like a problem about the package @truffle/hdwallet-provider, maybe the problem is the line 13: privateKeys.split(','), according to its doc, if you want to pass an array of private keys, I think you should use like following:

const privateKeys = [
  "75xx45",
  "85xx45",
];
//start at address_index 0 and load both addresses
provider = new HDWalletProvider(privateKeys, "http://localhost:8545", 0, 2); 
1 Like

i used a new method.

https://privatebin.net/?254c6ef263e77875#Ex8EAPSEKKS7Pc7DP5igGKKBoSqDcsPL53MEFPcLfX3F

But getting a silly error.
https://privatebin.net/?8caa5c9ad72ba63e#CoxZDMiBz2hBGf8wyYeXTNoQczEyRLQ45z9A5idYZ4bm

1 Like

Hi @Bsc_Talk,

If you are having issues configuring to connect to a network, I suggest looking at Connecting to public test networks.

I did that using another technique thanks.

1 Like