Skip to content

Commit

Permalink
feat(): use dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
midgerate committed May 7, 2022
1 parent 1103a9e commit 8672734
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Includes a working demo of client and smart contract integrated together. Clean
1. Clone the repo
2. In both sc and client folders install deps (yarn install)
3. In the sc directory -
- Create a new file .env and copy the contents of .env.example
- Run a hardhat node `yarn hardhat`
- Deploy to hardhat network `yarn deploy`
- Copy the address from console.
Expand Down
3 changes: 3 additions & 0 deletions sc/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WALLET_MNEMONIC=""
RINKEBY_PROJECT_URI="https://eth-rinkeby.alchemyapi.io/v2/xxxxxxxxxxxxxxxxxxxxxx"
ETHERSCAN_API_KEY="XXXXXXXXXXXXXXXXXXXXXX"
3 changes: 0 additions & 3 deletions sc/.envrc

This file was deleted.

3 changes: 0 additions & 3 deletions sc/.envrc.example

This file was deleted.

4 changes: 3 additions & 1 deletion sc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ yarn-error.log*
#Hardhat files
cache
artifacts
*/types/typechain
*/types/typechain

.env
1 change: 1 addition & 0 deletions sc/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import '@typechain/hardhat'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import { HardhatUserConfig } from 'hardhat/types'
import 'dotenv/config'

// Currently we do not have waffle. We might need it later for better testing support

Expand Down
3 changes: 3 additions & 0 deletions sc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@
"hooks": {
"pre-commit": "pretty-quick --staged && npm run lint"
}
},
"dependencies": {
"dotenv": "^16.0.0"
}
}
5 changes: 5 additions & 0 deletions sc/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,11 @@ dom-walk@^0.1.0:
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"
integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==

dotenv@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.0.tgz#c619001253be89ebb638d027b609c75c26e47411"
integrity sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==

dotignore@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905"
Expand Down

0 comments on commit 8672734

Please sign in to comment.