9

I am trying to migrate the code which is already tested in mainnet to ropsten network. I wonder why it is throwing the below strange error. We as a team unable to find a solution for this for past 2 days.

Any assistance in this regard will be very helpful

Error message from truffle

Error:  *** Deployment Failed ***

"Migrations" -- only replay-protected (EIP-155) transactions allowed over RPC.

at C:\Users\****\AppData\Roaming\nvm\v8.11.4\node_modules\truffle\build\webpack:\packages\deployer\src\deployment.js:364:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Truffle v5.1.12 (core: 5.1.12)
Node v8.11.4

2_deploy_crowdsale.js

await deployer.deploy(
  KiiACrowdSale,
  _rate, 
  _ownerAddress, 
  this.token.address
);

error after adding the await deployer.deploy( KiiACrowdSale, _rate, _ownerAddress, this.token.address,{chainId: 3} ); enter image description here

7
  • I see some one upvoted. Can you please tell me how long you are facing this issue ?
    – iappmaker
    Mar 9, 2021 at 15:33
  • is the project somewhere on GitHub, maybe if you share at least the steps then someone could help more. have you changed the chain Id or can you add the chain id somehow to the deployment or configuration of truffle?
    – Majd TL
    Mar 9, 2021 at 16:05
  • by the way, I see many peoples having a similar problem. it seems like the latest geth update caused this problem..
    – Majd TL
    Mar 9, 2021 at 16:21
  • @Majd TL ,. Could you please let me know how long you see this issue.
    – iappmaker
    Mar 9, 2021 at 17:54
  • 1

4 Answers 4

3

Here is what I did to solve my problem:

Change dependency of hdwallet-provider from 1.0.17 to 1.4.0. 

Relace the following line in package.json:

"truffle-hdwallet-provider": "1.0.17"

To

    "@truffle/hdwallet-provider": "^1.4.0"

You won't get the error anymore if you have the same issue!

David

1
2

I had this issue with truffle version 5.0.5, updating truffle to version 5.3.0 fixed the issue!

npm install -g [email protected] --save

0

In my package.json I replaced the

"truffle-hdwallet-provider": "1.0.17"

with

"@truffle/hdwallet-provider": "^1.4.0"

Also in my truffle-config, I used

const HDWalletProvider = require("@truffle/hdwallet-provider")
0

enter image description here

  • Change for "@truffle/hdwallet-provider": "^1.4.0"
  • npm install
  • truffle migrate --network matic

here it's ok

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.