@0xweb/hardhat 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +5 -0
- package/lib/index.js +7 -7
- package/package.json +3 -6
- package/readme.md +2 -1
package/lib/index.js
CHANGED
|
@@ -142,7 +142,7 @@ const taskArgsStore = { compileAll: false };
|
|
|
142
142
|
(0, config_1.task)(task_names_1.TASK_COMPILE, 'Compiles the entire project, building all artifacts')
|
|
143
143
|
.addOptionalParam('sources', 'Override the sources directory')
|
|
144
144
|
.addOptionalParam('artifacts', 'Override the artifacts output directory')
|
|
145
|
-
.addOptionalParam('root', 'Overrides root directory. If sources is also
|
|
145
|
+
.addOptionalParam('root', 'Overrides root directory. If sources is also overridden must be the sub-folder of the sources dir')
|
|
146
146
|
.addOptionalParam('watch', 'Re-runs compilation task on changes', false, {
|
|
147
147
|
name: 'boolean',
|
|
148
148
|
validate(argName, argumentValue) { },
|
|
@@ -155,9 +155,9 @@ const taskArgsStore = { compileAll: false };
|
|
|
155
155
|
})
|
|
156
156
|
.addOptionalParam('tsgen', 'Skip the TypeScript class generation', true, {
|
|
157
157
|
name: 'boolean',
|
|
158
|
-
validate(
|
|
159
|
-
parse(
|
|
160
|
-
if (
|
|
158
|
+
validate(key, value) { },
|
|
159
|
+
parse(key, value) {
|
|
160
|
+
if (value === '0' || value === 0 || value === false || value === 'false') {
|
|
161
161
|
return false;
|
|
162
162
|
}
|
|
163
163
|
return true;
|
|
@@ -172,7 +172,7 @@ const taskArgsStore = { compileAll: false };
|
|
|
172
172
|
// Other paths (sources, cache) will be resolved later by hardhat from config
|
|
173
173
|
const artifactsInstance = artifacts;
|
|
174
174
|
if (artifactsInstance._artifactsPath == null) {
|
|
175
|
-
console.error(`
|
|
175
|
+
console.error(`Artifacts Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
|
|
176
176
|
}
|
|
177
177
|
// Clean artifacts from previous compile
|
|
178
178
|
artifactsInstance._validArtifacts = [];
|
|
@@ -249,7 +249,7 @@ const taskArgsStore = { compileAll: false };
|
|
|
249
249
|
await runSuper();
|
|
250
250
|
});
|
|
251
251
|
async function getCompiledAbis(config, compileSolOutput) {
|
|
252
|
-
const
|
|
252
|
+
const emittedArtifacts = (0, alot_1.default)(compileSolOutput.artifactsEmittedPerJob).mapMany((a) => {
|
|
253
253
|
return (0, alot_1.default)(a.artifactsEmittedPerFile).mapMany((artifactPerFile) => {
|
|
254
254
|
return (0, alot_1.default)(artifactPerFile.artifactsEmitted).map((artifactName) => {
|
|
255
255
|
return {
|
|
@@ -261,7 +261,7 @@ async function getCompiledAbis(config, compileSolOutput) {
|
|
|
261
261
|
.toArray();
|
|
262
262
|
}).toArray();
|
|
263
263
|
}).toArray();
|
|
264
|
-
let namesHash = (0, alot_1.default)(
|
|
264
|
+
let namesHash = (0, alot_1.default)(emittedArtifacts).toDictionary(x => x.name);
|
|
265
265
|
let files = await atma_io_1.Directory.readFilesAsync(`file://${config.paths.artifacts}/`, '**.json');
|
|
266
266
|
let compileAll = taskArgsStore.compileAll;
|
|
267
267
|
let arr = files
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xweb/hardhat",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.1.
|
|
3
|
+
"description": "0xweb plugin for Hardhat",
|
|
4
|
+
"version": "0.1.17",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alex Kit",
|
|
@@ -18,15 +18,12 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"0xweb": "^0.
|
|
21
|
+
"0xweb": "^0.10.12",
|
|
22
22
|
"alot": "^0.3.0",
|
|
23
23
|
"atma-io": "^1.2.65",
|
|
24
24
|
"memd": "^0.3.10"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@nomiclabs/hardhat-etherscan": ">=3.0.3",
|
|
28
|
-
"@nomiclabs/hardhat-waffle": ">=2.0.3",
|
|
29
|
-
"@nomiclabs/hardhat-web3": ">=2.0.0",
|
|
30
27
|
"hardhat": ">=2.9.3"
|
|
31
28
|
},
|
|
32
29
|
"scripts": {
|
package/readme.md
CHANGED
|
@@ -93,8 +93,9 @@ const text = await foo.name();
|
|
|
93
93
|
|
|
94
94
|
# Additional parameters
|
|
95
95
|
|
|
96
|
-
- `npx hardhat compile --
|
|
96
|
+
- `npx hardhat compile --sources /foo/bar/qux` - compiles solidity files which are located outside the `/contracts` folder
|
|
97
97
|
- `npx hardhat compile --artifacts /dist` - set custom folder for artifacts (ABI JSONs and TS contracts)
|
|
98
98
|
- `npx hardhat compile --watch` - Compile the sources and waits to recompile on changes
|
|
99
|
+
- `npx hardhat compile --tsgen false` - Do not generate the TS classes
|
|
99
100
|
|
|
100
101
|
----
|