You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
Hardhat made awesome with a flexible CLI to help run test, deploy and more.
4
+
Hardhat made awesome with a flexible CLI to help run tests, deploy and more.
5
5
6
6
## How to install this package
7
7
### 1. Install this package
@@ -37,33 +37,35 @@ cd hardhat-awesome-cli
37
37
npm link
38
38
```
39
39
40
-
in the hardhat project you want to use this plugin
40
+
in the hardhat project, you want to use this plugin
41
41
42
42
```
43
43
npm link hardhat-awesome-cli
44
44
```
45
45
</details>
46
46
47
47
## CLI features
48
-
- Run tests (Allow you yo run test on all files or specific files in test/)
49
-
- Run scripts (Allow you yo run script on specific files in scripts/)
50
-
- Select scripts and tests to run (Allow you to select a script to execure and all or one test to perform afterward)
48
+
- Run tests (Allow you you to run tests on all files or specific files in test/)
49
+
- Run scripts (Allow you you to run scripts on specific files in scripts/)
50
+
- Select scripts and tests to run (Allow you to select a script to execute and all or one test to perform afterward)
51
51
- Run coverage tests (Available only if solidity-coverage is installed and available as a task)
52
52
- Setup chains, RPC and accounts
53
53
- Add/Remove chains from the chain selection
54
54
- Set RPC Url, private key or mnemonic for all or one chain
55
-
- Add a custom chain to the current chain selection)
55
+
- Add a custom chain to the current chain selection (currently these custom chains are not getting injected into hardhat networks)
56
56
- More settings
57
-
- Exclude test file from the tests selection list
58
-
- Exclude script file from the scripts selection list
57
+
- Exclude the test file from the tests selection list
58
+
- Exclude the script file from the scripts selection list
59
59
- Install/Uninstall other Hardhat plugins (Still not very stable)
60
-
- Create Mock contracts + (Deployment scripts and tests scripts (currently only for MockERC20))
60
+
- Create Mock contracts + (Deployment scripts and tests scripts (Missing test for MockProxyAdmin and MockTransparentUpgradeableProxy))
61
61
- MockERC20
62
62
- MockERC721
63
63
- MockERC1155
64
64
- MockERC20Upgradeable
65
65
- MockERC721Upgradeable
66
66
- MockERC1155Upgradeable
67
+
- MockProxyAdmin
68
+
- MockTransparentUpgradeableProxy
67
69
- Get account balance
68
70
69
71
### Current chain support
@@ -75,18 +77,24 @@ npm link hardhat-awesome-cli
75
77
- Polygon - Mainnet (chainId 137)
76
78
- Polygon - Mumbai (chainId 80001)
77
79
78
-
In 'More settings' you can also add custom chain, or create a issue or pull request to add other chains.
80
+
In 'More settings' you can also add a custom chain, create an issue or pull request to add other chains.
79
81
80
82
## Helper tools
81
83
Tools that you can use in your scripts and tests to make your life easier
82
84
83
85
### Address Book
84
86
87
+
Create (if it does not exist) contractsAddressDeployed.json and contractsAddressDeployedHistory.json to store all the contracts you deployed, with the name of the contract, the contract address, the network name, the deployer address and the deployment date. The first file (contractsAddressDeployed.json) stores only the last contract for a given contract name and network name, while the second file (contractsAddressDeployedHistory.json) keeps a log of all the contracts deployed.
88
+
89
+
You can then retrieve your contract address in your tests scripts to run test on deployed contracts on live chains for example.
- Add @openzeppelin/contracts || @openzeppelin/contracts-upgradeable if not already installed
128
+
- Offer to create deployment scripts (use addressBook.saveContract() to save the deployed contract in contractsAddressDeployed.json and contractsAddressDeployedHistory.json)
129
+
- Offer to create test scripts
119
130
- Tool to log all contracts deploy on each chain (1 unique contractName/chain + full log) and retrieve them (not tested yet)
0 commit comments