Browse Source

build: Add deploy scripts

SauravKanchan 4 years ago
parent
commit
8baee47c71
2 changed files with 17 additions and 1 deletions
  1. 14 0
      README.md
  2. 3 1
      package.json

+ 14 - 0
README.md

@@ -87,6 +87,20 @@ Delete the smart contract artifacts, the coverage reports and the Hardhat cache:
 $ yarn clean
 $ yarn clean
 ```
 ```
 
 
+### Deploy 
+
+Deploy the contracts to hardhat test network.
+
+```sh
+$ yarn deploy 
+```
+
+Deploy the contracts to a specific network.
+
+```sh
+$ yarn deploy:network ropsten 
+```
+
 ## Syntax Highlighting
 ## Syntax Highlighting
 
 
 If you use VSCode, you can enjoy syntax highlighting for your Solidity code via the
 If you use VSCode, you can enjoy syntax highlighting for your Solidity code via the

+ 3 - 1
package.json

@@ -71,6 +71,8 @@
     "prettier": "prettier --config .prettierrc --write \"**/*.{js,json,md,sol,ts}\"",
     "prettier": "prettier --config .prettierrc --write \"**/*.{js,json,md,sol,ts}\"",
     "prettier:list-different": "prettier --config .prettierrc --list-different \"**/*.{js,json,md,sol,ts}\"",
     "prettier:list-different": "prettier --config .prettierrc --list-different \"**/*.{js,json,md,sol,ts}\"",
     "test": "hardhat test",
     "test": "hardhat test",
-    "typechain": "hardhat typechain"
+    "typechain": "hardhat typechain",
+    "deploy": "hardhat run scripts/deploy.ts",
+    "deploy:network": "hardhat run scripts/deploy.ts --network"
   }
   }
 }
 }