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

iappmaker
  • 813
  • 2
  • 11
  • 26
  • I see some one upvoted. Can you please tell me how long you are facing this issue ? – iappmaker Mar 09 '21 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 09 '21 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 09 '21 at 16:21
  • @Majd TL ,. Could you please let me know how long you see this issue. – iappmaker Mar 09 '21 at 17:54
  • can you please try await deployer.deploy( KiiACrowdSale,_rate, _ownerAddress, this.token.address, {chainId: 3} – Majd TL Mar 09 '21 at 21:53
  • 1
    https://github.com/ethereum/go-ethereum/pull/22339 – Majd TL Mar 09 '21 at 22:19
  • Adding chainId should work . See here. Add link to project; I will try to clone and check. Try adding chainId to your truffle.config – Prashant Prabhakar Singh Mar 10 '21 at 08:02

4 Answers4

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

us_david
  • 171
  • 2
2

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

npm install -g truffle@5.3.0 --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")
Etienne
  • 301
  • 2
  • 6
0

enter image description here

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

here it's ok

Tales
  • 1