Truffle appends '-fork' to networkName when migrating to rinkeby

Open zeppelin seems to be appending “-fork” to the networkName when migrating to rinkeby. Output from my console is below.

Migrations dry-run (simulation)
> Network name:    'rinkeby-fork'
> Network id:      4
> Block gas limit: 10000000 (0x989680)

:computer: Environment

openzeppelin cli version 2.8.2
truffle version ^5.1.25
truffle/hdwallet-provider 1.0.35

From my truffle config:

    ropsten: {
      provider: () => new HDWalletProvider(MNEMONIC, `${INFURA_ID}`),
      network_id: 3,
      gas: 5500000,
      confirmations: 2,
      timeoutBlocks: 200,
      skipDryRun: true
    rinkeby: {
      provider: () => new HDWalletProvider(MNEMONIC, `${INFURA_ID}`),
      network_id: 4,
      gas: 6400000,
      gasPrice: 5000000000 // 5GWEI


Deploying to ropsten works just fine but I’m unable to deploy to rinkeby. The error I’m getting is “Error: Given network ‘rinkeby-fork’ is not defined in your truffle-config.js file”

Any ideas? I wish I could provide more information but it seems like somethings happening under the hood that I don’t understand. Any and all information would be helpful.

1 Like

Hi @samhatem,

Welcome to the community :wave:

Truffle is performing a dry run simulation when you do npx truffle migrate --network rinkeby.

Your ropsten network configuration has skipDryRun: true.
Your rinkeby doesn’t, so it have this set, so it is doing a dry run.

The default is (default: false for public nets )

For details on this, see the Truffle documentation:

I wasn’t sure how you were using OpenZeppelin CLI. Please ask all the questions that you need.

Thank you! Does truffle cache my config? I thought I tried skipping a dry run on rinkeby yesterday and it didn’t work. I just tried it again and got it to work, though.

1 Like

Hi @samhatem,

As far as I know Truffle just uses what is in your truffle-config.js unless you specify the option to skip.
See the Truffle documentation on migrate:

--skip-dry-run : Skip the test migration performed before the real migration.