diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8625bdb --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +PRIVATE_KEY= +ETHERSCAN_API_KEY= +MAINNET_ENDPOINT_URL=https://mainnet.infura.io/v3/9b2d9ce8681f477199d092f7e77658c5 \ No newline at end of file diff --git a/.gitignore b/.gitignore index b3eb773..850310c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules coverage coverage.json build +.env \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c29f41e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ + +### First step +Rename `.env.example` to `.env` and put your parameters there. \ No newline at end of file diff --git a/package.json b/package.json index 86658a9..f986cf3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "license": "MIT", "dependencies": { "@openzeppelin/contracts": "^3.3.0", + "dotenv": "^10.0.0", "eth-gas-reporter": "^0.2.22", "truffle-plugin-verify": "^0.5.7" }, diff --git a/truffle-config.js b/truffle-config.js index 2e083d2..841d817 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,7 +1,8 @@ const HDWalletProvider = require('@truffle/hdwallet-provider'); -const privateKey = ''; -const etherscanAPIKey = '' -const mainnetEndpointUrl = 'https://mainnet.infura.io/v3/9b2d9ce8681f477199d092f7e77658c5'; +require('dotenv').config(); +const privateKey = process.env.PRIVATE_KEY; +const etherscanAPIKey = process.env.PRIVATE_KEY; +const mainnetEndpointUrl = process.env.MAINNET_ENDPOINT_URL; module.exports = { networks: {