trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.31k forks source link

Error "Migrations" -- invalid sender when I deploy to BSC testnet #3939

Closed Dutch-TS-Dev closed 3 years ago

Dutch-TS-Dev commented 3 years ago

I have created a standard OpenZeppelin ERC721PresetMinterPauserAutoId NFT smart contract. I have tested locally and it works, and I am trying to deploy it to the public testnet now. But then I get the following error: "Migrations" -- invalid sender. I used the following tutorial: https://docs.binance.org/smart-chain/developer/ERC721.html

I hope somebody can help me : )

shoenseiwaso commented 3 years ago

Possible dupe of #3935, #3913

gabriellee82 commented 3 years ago

using @truffle/hdwallet-provider V1.2.3 works for me.

shoenseiwaso commented 3 years ago

using @truffle/hdwallet-provider V1.2.3 works for me.

@gabriellee82 which node provider/node version are you using?

gabriellee82 commented 3 years ago

Hi, I am using the following on windows 10:

Truffle v5.2.5 (core: 5.2.5) Solidity v0.5.16 (solc-js) Node v15.11.0 Web3.js v1.2.9

on BSC testnet.

shoenseiwaso commented 3 years ago

Which BSC Testnet node provider (or your own node)? And do you know the BSC node version?

I realize now that these issues might not be linked - I have not looked at if the BSC fork has implemented the chain ID enforcement or not...

jerrkill commented 3 years ago

Obviously it is caused by hdwallet-provider, just switch hdwallet-provider back to 1.2.2. It looks like below

...
"@truffle/hdwallet-provider": "1.2.2",
...
gabriellee82 commented 3 years ago

Which BSC Testnet node provider (or your own node)? And do you know the BSC node version?

I realize now that these issues might not be linked - I have not looked at if the BSC fork has implemented the chain ID enforcement or not...

This is my truffle-config.js

  provider: () => new HDWalletProvider(mnemonic, `https://data-seed-prebsc-1-s1.binance.org:8545`),
  network_id: 97,
  confirmations: 10,
  timeoutBlocks: 200,
  skipDryRun: true
gabriellee82 commented 3 years ago

Obviously it is caused by hdwallet-provider, just switch hdwallet-provider back to 1.2.2. It looks like below

...
"@truffle/hdwallet-provider": "1.2.2",
...

Yes, seems like v1.2.4 is not working.

Dutch-TS-Dev commented 3 years ago

Meanwhile I fixed it by downgrading, as mentioned by @gabriellee82 . @gabriellee82 could you tell me why this is 'obvious'? Usually when one has not upgraded it would seem obvious to me that something doesn't work, not downgrading : )