Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Error: *** Deployment Failed *** "Migrations" -- only replay-protected (EIP-155) transactions allowed over RPC. #4258

Closed
evm-finance opened this issue Aug 12, 2021 · 2 comments

Comments

@evm-finance
Copy link

evm-finance commented Aug 12, 2021

I cannot deploy a contract to matic mainnet using this command: "truffle migrate --network maticMainnet" because it gives the error
Error: *** Deployment Failed ***

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

at /home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Migration._deploy (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:70:1)
at Migration._load (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:56:1)
at Migration.run (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:217:1)
at Object.runMigrations (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.run (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
at runMigrations (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1)
at Object.run (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:223:1)
at Command.run (/home/ethereum/.nvm/versions/node/v16.6.1/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:172:1)

I have made no modifications to the 1_initial_migrations.js file at all, it looks like this:

const Migrations = artifacts.require("Migrations");

module.exports = function (deployer) {
  deployer.deploy(Migrations);
};

Edit, here is my truffle-config.js: const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonicSeed = '*';


module.exports = {


  networks: {

    maticMainnet: {
      provider: () => new HDWalletProvider(
        mnemonic = mnemonicSeed, 
        providerOrUrl = 'https://snowy-polished-voice.matic.quiknode.pro/c25d600e60591c4c592eceee9359b61ec55b1592/',
        chainId = 137
      ),
      network_id: 137
    },
    bscMainnet: {
      provider: () => new HDWalletProvider(
        mnemonic = mnemonicSeed, 
        providerOrUrl = 'https://patient-small-sound.bsc.quiknode.pro/e9d9c6fc165de5266e008da316e7b5220b1e1775/',
        chainId = 56
        ),
      network_id: 56, //binance
    },
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.0"
    }
  }
};

I am so dissapointed that the default way that the library sends a deployment transaction has been obsolete for almost 5 years now. Not really interested in getting help, just going to switch back to hardhat which is far superior, and uses EIP-155 transactions as a default.

  • Operating System: Windows 10 (using WSL subsystem with Ubuntu 20
  • Ethereum client: quiknode
  • Truffle version (truffle version): 5.4.5
  • node version (node --version): 16.6.1
  • npm version (npm --version): 12.0.0
@eggplantzzz
Copy link
Contributor

Hey @quantifydefi, what happens if you omit the chain id in your network configuration?

@cds-amal
Copy link
Member

cds-amal commented Feb 2, 2022

Closing for issue maintenance. Please feel free to re-open if you're still having issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants