New here, following the amazing tutorials in the learn section got this error when migrating my first contract on Rinkeby testnet:
Deploying 'Migrations'
----------------------
Error: *** Deployment Failed ***
"Migrations" -- Unable to decode sender address from transaction: Incompatible EIP155-based V 38 and chain id 4. See the Common parameter of the Transaction constructor to set the chain id..
Environment
Truffle v5.3.4
Details
Code to reproduce
npx truffle migrate --network rinkeby
Wondering if I am doing something wrong and what to do to get it right…
Thanks!
Hello Tigrecode,
Does your contract compile? When you migrate to rinkeby, do you have the correct API key?
Hi @Yoshiko ! Thank you for answering
The compilation step runs smoothly, I could test the contract locally. Also, the Alchemy API seems to be working fine, I had sucess connecting with “npx truffle console --network rinkeby” and funding the test account.
Here is the full response I am getting:
$ npx truffle migrate --network rinkeby
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'rinkeby'
> Network id: 4
> Block gas limit: 10003745 (0x98a521)
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
Error: *** Deployment Failed ***
"Migrations" -- Unable to decode sender address from transaction: Incompatible EIP155-based V 38 and chain id 4. See the Common parameter of the Transaction constructor to set the chain id..
at /home/tigrecode/code/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at Migration._deploy (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:74:1)
at Migration._load (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
at Migration.run (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:212:1)
at Object.runMigrations (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.run (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
at runMigrations (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:263:1)
at Object.run (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:228:1)
at Command.run (/home/tigrecode/code/node_modules/truffle/build/webpack:/packages/core/lib/command.js:140:1)
Truffle v5.3.4 (core: 5.3.4)
Node v14.16.1
This may be a question for truffle support. I don’t use truffle so it’s really hard to give assistance. If you get a solution from truffle support, please update us. https://www.trufflesuite.com/community
After trying with Infura and getting some errors found a turn around with the Infura community that worked for AlchemyAPI also. The solution was downgrade to @truffle/hdwallet-provider@1.2.2 and everything worked! Thanks for the atention @Yoshiko ! 