Skip to content

Commit

Permalink
Dev UX improvements (Tenderly + env cleanup + config cleanup) (#281)
Browse files Browse the repository at this point in the history
* hardhat/tenderly changes

* Ignore local deployments

* Ignore local deployments

* Update readme

* Cleanup hardhat config

* Cleanup package json

* Remove unwanted deployments

* Update Readme

* remove tenderly yaml

* Update hardhat configs

* Clean up readme

* Change project name

* Add tenderly.yaml

* package-lock changes

* cleanup gitignore

* remove gas and gasPrice

* npx is not needed

* set defaultNetwork to hardhat
  • Loading branch information
SkandaBhat authored Aug 4, 2021
1 parent 503998d commit dbd8bb2
Show file tree
Hide file tree
Showing 137 changed files with 170 additions and 334,771 deletions.
2 changes: 1 addition & 1 deletion .env.ganache → .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MNEMONIC=square include clarify skin garden tube tide eight eternal grit hybrid library

# Ethereum Network
NETWORK=ganache
NETWORK=local

# Provider HOST & PORT for deployment
PROVIDER_HOST=127.0.0.1
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ build/
coverage/
coverage.json
cache/
deployed/ganache
deployed/goerli/abi
deployed/matic/abi
deployed/mumbai/abi
abi
.env
.env.goerli
.env.matic_mumbai_testnet
.env.mumbai
node_modules/
.DS_Store
.previous-deployment-addresses
.contract-deployment.tmp.json
deployments
deployed/local
deployments
35 changes: 11 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,14 @@ For Mac, use `brew install jq` or for the most recent version use `brew install

# Deployment

##### Local Deployment using ganache cli/gui
1. Run Ganache CLI/GUI (You can modify port in `hardhat.config.js`)
2. Provide provider host & port in `.env.ganache`
3. Run command `deploy:ganache`

##### Goerli Deployment using ganache cli/gui
1. Create `.env.goerli` file (Refs - `.env.tpl`), provide `mnemonic` & `provider` for deployment.
2. Run command `deploy:goerli`

# Migration guide
1. Run `npm run deploy:goerli`
2. `cd ../cli && git add . && git commit -m 'redeploy' && git push`
3. `cd ../synthetic-assets`
4. Change the delegator address in `synthetic-assets/migrations/2_deploy.js`
5. `truffle migrate --reset --network goerli`
6. `git add . && git commit -m 'redeploy' && git push`
7. `cd ../dashboard`
8. `git add . && git commit -m 'redeploy' && git push`
9. In remote server:
1. `cd cli && git pull`
2. `pm2 stop all`
3. Run first 5 lines in file cli/misc/deploy.sh for stakers to stake
4. `pm2 start all` once staked
##### Local Deployment using hardhat
1. Run hardhat node (`npx hardhat node`)
2. Run command `deploy:hardhat`
3. Use tenderly to track local transactions: https://github.com/Tenderly/tenderly-cli#export

##### Polygon Mumbai Testnet Deployment
1. Create `.env.mumbai` file (Refs - `.env.tpl`), provide `mnemonic` & `provider` for deployment.
2. Run command `deploy:mumbai`

# Running tests
Run `npm run test`
Expand All @@ -54,4 +39,6 @@ Run `npm run lint`
Run `npm run lint:sol:fix`

# Addresses
Deployed contract addresses can be found [here](deployed/goerli/addresses.json)
We are currently live on Polygon Mumbai Testnet.

Deployed contract addresses can be found [here](deployed/mumbai/addresses.json)

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit dbd8bb2

Please sign in to comment.