Browse Source

merge: pull request #39 from SauravKanchan/deploy-script

build: Add deploy scripts
Paul Razvan Berg 4 năm trước cách đây
mục cha
commit
ffc4c489be
2 tập tin đã thay đổi với 16 bổ sung0 xóa
  1. 14 0
      README.md
  2. 2 0
      package.json

+ 14 - 0
README.md

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

+ 2 - 0
package.json

@@ -65,6 +65,8 @@
     "commit": "git-cz",
     "compile": "hardhat compile",
     "coverage": "hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"./test/**/*.ts\"",
+    "deploy": "hardhat run scripts/deploy.ts",
+    "deploy:network": "hardhat run scripts/deploy.ts --network",
     "lint": "yarn run lint:sol && yarn run lint:ts && yarn run prettier:list-different",
     "lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"",
     "lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .",