Explorar o código

docs: polish README

chore: use "const" instead of "let" to fix linting errors
Paul Razvan Berg %!s(int64=2) %!d(string=hai) anos
pai
achega
1db1c844ed
Modificáronse 3 ficheiros con 15 adicións e 18 borrados
  1. 11 14
      README.md
  2. 2 2
      package.json
  3. 2 2
      tasks/greet.ts

+ 11 - 14
README.md

@@ -150,23 +150,22 @@ $ pnpm deploy:contracts"
 
 ### Tasks
 
-#### Set Greeting
+#### Deploy Greeter
 
-Call the set greeting task on ganache network
+Deploy a new instance of the Greeter contract via a task:
 
 ```sh
-$ pnpm task:setGreeting --network ganache --greeting "Bonjour, le monde!" --account 3
+$ pnpm task:deployGreeter --network ganache --greeting "Bonjour, le monde!"
 ```
 
-#### Deploy a new Greeter contract
+#### Set Greeting
 
-Deploy a new instance of the Greeter contract via a task
+Run the `setGreeting` task on the Ganache network:
 
 ```sh
-$ pnpm task:deployGreeter --network ganache --greeting "Bonjour, le monde!"
+$ pnpm task:setGreeting --network ganache --greeting "Bonjour, le monde!" --account 3
 ```
 
-
 ## Tips
 
 ### Syntax Highlighting
@@ -183,23 +182,21 @@ on/off.
 
 ## Local development with Ganache
 
-### Install ganache
+### Install Ganache
 
 ```sh
-$ npm i -g ganache"
+$ npm i -g ganache
 ```
 
-### Run a local blockchain using ganache
+### Run a Development Blockchain
 
 ```sh
-$ ganache -s test"
+$ ganache -s test
 ```
 
 > The `-s test` passes a seed to the local chain and makes it deterministic
 
-Make sure to set the mnemonic in your `.env` file to that of the instance running with ganache
-
-
+Make sure to set the mnemonic in your `.env` file to that of the instance running with Ganache.
 
 ## License
 

+ 2 - 2
package.json

@@ -71,14 +71,14 @@
     "compile": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat compile",
     "coverage": "hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"test/**/*.ts\" && pnpm typechain",
     "deploy:contracts": "hardhat deploy",
-    "task:setGreeting": "hardhat task:setGreeting",
-    "task:deployGreeter": "hardhat task:deployGreeter",
     "lint": "pnpm lint:sol && pnpm lint:ts && pnpm prettier:check",
     "lint:sol": "solhint --max-warnings 0 \"contracts/**/*.sol\"",
     "lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .",
     "postinstall": "DOTENV_CONFIG_PATH=./.env.example pnpm typechain",
     "prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"",
     "prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\"",
+    "task:deployGreeter": "hardhat task:deployGreeter",
+    "task:setGreeting": "hardhat task:setGreeting",
     "test": "hardhat test",
     "typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain"
   }

+ 2 - 2
tasks/greet.ts

@@ -9,9 +9,9 @@ task("task:setGreeting")
   .addParam("greeting", "Say hello, be nice")
   .addParam("account", "Specify which account [0, 9]")
   .setAction(async function (taskArguments: TaskArguments, hre) {
-    let { ethers, deployments } = hre;
+    const { ethers, deployments } = hre;
 
-    let Greeter = await deployments.get("Greeter");
+    const Greeter = await deployments.get("Greeter");
 
     const signers: SignerWithAddress[] = await ethers.getSigners();