Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Improve structure of dev env #20

Closed
wants to merge 10 commits into from
Closed

Conversation

nksazonov
Copy link
Contributor

@nksazonov nksazonov commented Oct 14, 2022

Closes #13. Part of #11.

@nksazonov nksazonov force-pushed the feature/dev-env-structure branch from 8077638 to e4e73a5 Compare October 14, 2022 14:46
@nksazonov nksazonov requested a review from plsthink October 14, 2022 14:47
Copy link
Contributor

@plsthink plsthink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remove /.openzepplin/
  • Remove ./addresses/hardhat-accounts.json (folder too), since this is not used anymore on both our repo and dependent repositories

@nksazonov
Copy link
Contributor Author

nksazonov commented Oct 14, 2022

  • Remove ./addresses/hardhat-accounts.json (folder too), since this is not used anymore on both our repo and dependent repositories

We need this file as it stores addresses and private keys generated from a mnemonic (specified at hardhat.config.ts) to be able to interact with local hardhat network. We don't use default hardhat accounts (whose private keys are specified on generation) to mitigate damage made by accidental crypto transfer to those accounts as there are bots listening to their balance updates. Thus, in case of their top up, any crypto would be momentarily drained (because private keys are publicly known). So if we accidentally transfer crypto on accounts we generated ourselves, we can securely return it.

Also it is worth noting that these accounts are used by back-end team when testing State Channels SDK.

Thus, whether to remove this folder and file or not depends on whether we will use our customised hardhat accounts or a default ones.

@nksazonov
Copy link
Contributor Author

  • Remove /.openzepplin/

This folder stores files with addresses of proxies and implementations of openzeppelin/contract-upgradeable deployments. Without this file it is impossible to interact or upgrade the contract.

Docs about .openzeppelin folder:
https://docs.openzeppelin.com/upgrades-plugins/1.x/#how-plugins-work

The plugins will keep track of all the implementation contracts you have deployed in an .openzeppelin folder in the project root, as well as the proxy admin. You will find one file per network there. It is advised that you commit to source control the files for all networks except the development ones (you may see them as .openzeppelin/unknown-*.json).

So whether to keep this folder or not depends on our usage of openzeppelin-upgrades, like Yellow token.

@nksazonov nksazonov closed this Oct 17, 2022
@nksazonov nksazonov deleted the feature/dev-env-structure branch October 17, 2022 09:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve structure of dev env
2 participants