Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Setup initial hardhat deployments #424

Open
wants to merge 5 commits into
base: build/hardhat-compile
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
import '@nomiclabs/hardhat-waffle'
import 'dotenv/config'
import {HardhatUserConfig} from 'hardhat/config'
import {NetworkUserConfig} from 'hardhat/types'

const infuraApiKey = process.env.INFURA_API_KEY

if (!infuraApiKey) {
throw new Error('Please set your INFURA_API_KEY in a .env file.')
}

const mnemonic = process.env.MNEMONIC

if (!mnemonic) {
throw new Error('Please set your MNEMONIC in a .env file.')
}

function createNetworkConfig(network: string): NetworkUserConfig {
const url: string = 'https://' + network + '.infura.io/v3/' + infuraApiKey
return {
accounts: {
mnemonic,
},
url,
}
}

export default {
networks: {
kovan: createNetworkConfig('kovan'),
mainnet: createNetworkConfig('mainnet'),
rinkeby: createNetworkConfig('rinkeby'),
ropsten: createNetworkConfig('ropsten'),
},
solidity: {
version: '0.6.10',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
version: '0.6.10',
},
}
} as HardhatUserConfig
7 changes: 0 additions & 7 deletions migrations/1_initial_migration.js

This file was deleted.

57 changes: 0 additions & 57 deletions migrations/2_deploy_contracts.js

This file was deleted.

29 changes: 0 additions & 29 deletions migrations/3_setup_ownership.js

This file was deleted.

Loading