Selaa lähdekoodia

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

build: Add deploy scripts
Paul Razvan Berg 4 vuotta sitten
vanhempi
commit
ffc4c489be
2 muutettua tiedostoa jossa 16 lisäystä ja 0 poistoa
  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
 $ 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
 ## 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

+ 2 - 0
package.json

@@ -65,6 +65,8 @@
     "commit": "git-cz",
     "commit": "git-cz",
     "compile": "hardhat compile",
     "compile": "hardhat compile",
     "coverage": "hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"./test/**/*.ts\"",
     "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": "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:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"",
     "lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .",
     "lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .",