1

truffle deploy (aka truffle migrate) is documented here.

I'm doing the following sequence:

  1. Starting a local Ganache node
  2. Running truffle deploy

I'd expect this sequence to yield the exact same output (i.e., same contract addresses, same transaction hashes, and same gas costs) every time it is executed.

However, I clearly see a different output every time I execute it.

My question is - why? Is there some sort of randomness used by truffle deploy?

Here is my relevant configuration:

  1. ganache-cli --port=8545 --gasLimit=0xfffffffffff
  2. truffle deploy --network=production

The production network is configured in file truffle-config.js as follows:

module.exports = {
    networks: {
        production: {
            host:       "127.0.0.1",
            port:       8545,
            network_id: "*",          // Match any network id
            gasPrice:   100000000000, // Gas price used for deploys
            gas:        6721975,      // Gas limit used for deploys
        }
    }
};

Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.