From 7201416878cdcf1e7a7787ae883bd7c4f6fe8b76 Mon Sep 17 00:00:00 2001 From: Andrew Fleming Date: Tue, 1 Nov 2022 22:01:16 -0400 Subject: [PATCH] Create .env with `nile init` and remove example.env (#265) * remove example.env * create .env with nile init * add nile init setup description * remove explicit .env write * Create .env * add private key * add line --- README.md | 9 +++++++-- example.env | 2 -- src/nile/base_project/.env | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 example.env create mode 100644 src/nile/base_project/.env diff --git a/README.md b/README.md index 0b335674..307f79a3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,13 @@ nile init ⛵️ Nile project ready! Try running: ``` +`nile init` builds the project structure by: + +- Creating directories for `contracts` and `tests`. +- Populating these directories with test modules. +- Generating a `.env` to store private key aliases. +- Setting up a `node.json` for initializing a local node. + ## Usage ### `node` @@ -130,8 +137,6 @@ Deploy an Account associated with a given private key. To avoid accidentally leaking private keys, this command takes an alias instead of the actual private key. This alias is associated with an environmental variable of the same name, whose value is the actual private key. -You can find an example `.env` file in `example.env`. These are private keys only to be used for testing and never in production. - ```sh nile setup diff --git a/example.env b/example.env deleted file mode 100644 index 0e295c9d..00000000 --- a/example.env +++ /dev/null @@ -1,2 +0,0 @@ -PKEY1=1234 -PKEY2=5678 diff --git a/src/nile/base_project/.env b/src/nile/base_project/.env new file mode 100644 index 00000000..2726fa6c --- /dev/null +++ b/src/nile/base_project/.env @@ -0,0 +1 @@ +PRIVATE_KEY = 0xe3e70682c2094cac629f6fbed82c07cd