updated for .env file

This commit is contained in:
PatrickAlphaC
2021-03-18 07:02:18 -04:00
parent 569ee3fc5d
commit 6d086a76c5
6 changed files with 25727 additions and 46 deletions

3
.env Normal file
View File

@@ -0,0 +1,3 @@
# This is where you add your environment variables
MNEMONIC='cat dog frog....'
RINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'

2
.env.example Normal file
View File

@@ -0,0 +1,2 @@
MNEMONIC='cat dog frog....'
RINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'

View File

@@ -28,8 +28,16 @@ Right now this repo only works with rinkeby. Run the following.
### Setup Environment Variables
You'll need a `MNEMONIC` and a rinkeby `RINKEBY_RPC_URL` environment variable. Your `MNEMONIC` is your seed phrase of your wallet. You can find an `RINKEBY_RPC_URL` from node provider services like [Infura](https://infura.io/)
Then, either set them in a `bash_profile` file or export them into your terminal like:
Then, you can create a `.env` file with the following.
```bash
MNEMONIC='cat dog frog....'
RINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'
```
Or, set them in a `bash_profile` file or export them directly into your terminal. You can learn more about [environment variables here](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html).
To run them directly in your terminal, run:
```bash
export MNEMONIC='cat dog frog....'
export RINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'

25754
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,8 @@
"dependencies": {
"@chainlink/contracts": "0.0.8",
"@openzeppelin/contracts": "^3.1.0",
"@truffle/hdwallet-provider": "^1.0.40"
"@truffle/hdwallet-provider": "^1.0.40",
"dotenv": "^8.2.0"
},
"devDependencies": {
"@chainlink/belt": "^0.0.1",

View File

@@ -1,4 +1,5 @@
const HDWalletProvider = require('@truffle/hdwallet-provider')
require('dotenv').config()
// 0x5F3313814F7FB3E11C4a240141689BA9933c5607
module.exports = {
networks: {