From e1e989986fe2799cf431e191584b83222f8368dc Mon Sep 17 00:00:00 2001 From: Roman Storm Date: Thu, 1 Aug 2019 17:19:52 -0700 Subject: [PATCH] skip migrations --- migrations/1_initial_migration.js | 3 +++ package.json | 1 + truffle-config.js | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index c0dea38..a0ff0ca 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -2,5 +2,8 @@ const Migrations = artifacts.require('Migrations') module.exports = function(deployer) { + if(deployer.network === 'mainnet') { + return + } deployer.deploy(Migrations) } diff --git a/package.json b/package.json index fe1c328..ff087fe 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "build:contract": "npx truffle compile", "test": "npx truffle test", "migrate": "npx truffle migrate --network kovan --reset", + "migrate:mainnet": "npx truffle migrate --network mainnet --reset", "migrate:dev": "npx truffle migrate --network development --reset", "browserify": "npx browserify cli.js -o index.js --exclude worker_threads", "eslint": "npx eslint --ignore-path .gitignore .", diff --git a/truffle-config.js b/truffle-config.js index c10f5ea..cf2b05c 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -51,6 +51,15 @@ module.exports = { // timeoutBlocks: 200, skipDryRun: true }, + mainnet: { + provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, 'https://mainnet.infura.io/v3/c7463beadf2144e68646ff049917b716'), + network_id: 1, + gas: 5000000, + gasPrice: utils.toWei('2', 'gwei'), + // confirmations: 0, + // timeoutBlocks: 200, + skipDryRun: true + }, // Useful for private networks // private: {