@0xweb/hardhat 0.1.19 → 0.1.20
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/lib/index.js +2 -1
- package/package.json +2 -2
- package/readme.md +6 -6
- package/.vscode/settings.json +0 -5
package/lib/index.js
CHANGED
|
@@ -157,8 +157,9 @@ const taskArgsStore = { compileAll: false };
|
|
|
157
157
|
compilationArgs.artifacts = _path_1.$path.join(compilationArgs.package, 'artifacts');
|
|
158
158
|
}
|
|
159
159
|
if (compilationArgs.sources == null) {
|
|
160
|
-
compilationArgs.sources = _path_1.$path.join(compilationArgs.
|
|
160
|
+
compilationArgs.sources = _path_1.$path.join(compilationArgs.package, 'contracts');
|
|
161
161
|
}
|
|
162
|
+
config.paths.cache = _path_1.$path.join(compilationArgs.package, 'cache');
|
|
162
163
|
}
|
|
163
164
|
// Re-set Artifacts Path manually, as Hardhat initializes the Artifacts Instance before this task runs.
|
|
164
165
|
// Other paths (sources, cache) will be resolved later by hardhat from config
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xweb/hardhat",
|
|
3
3
|
"description": "0xweb plugin for Hardhat",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.20",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alex Kit",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"0xweb": "^0.10.
|
|
21
|
+
"0xweb": "^0.10.13",
|
|
22
22
|
"alot": "^0.3.0",
|
|
23
23
|
"atma-io": "^1.2.65",
|
|
24
24
|
"memd": "^0.3.10"
|
package/readme.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# [`
|
|
1
|
+
# [`0xweb`](https://0xweb.org) plugin for [Hardhat](https://hardhat.org/)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
----
|
|
5
|
-
[](https://badge.fury.io/js/0xc%2Fhardhat)
|
|
6
6
|
[](https://circleci.com/gh/0xweb-org/hardhat)
|
|
7
7
|
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ The plugin generates `0xWeb` classes for compiled solidity contracts, making the
|
|
|
21
21
|
# install 0xweb
|
|
22
22
|
$ npm i 0xweb -g
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# initialize 0xweb and hardhat project
|
|
25
25
|
$ 0xweb init --hardhat
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -41,7 +41,6 @@ contract Foo {
|
|
|
41
41
|
name = _name;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
> Plugin adds also ability to specify the `sources` folder. As per default this is `/contracts/**.sol`
|
|
@@ -54,7 +53,7 @@ $ npx hardhat compile --sources ./any/directory/
|
|
|
54
53
|
|
|
55
54
|
> `example.ts`
|
|
56
55
|
```ts
|
|
57
|
-
import { Foo } from '
|
|
56
|
+
import { Foo } from '0xc/hardhat/Foo/Foo.ts'
|
|
58
57
|
import { HardhatProvider } from '@dequanto/hardhat/HardhatProvider'
|
|
59
58
|
|
|
60
59
|
// automatically deploys the contract to hardhat chain
|
|
@@ -76,7 +75,7 @@ If the contract is already deployed, initialize the contract with the Address as
|
|
|
76
75
|
|
|
77
76
|
> `example.ts`
|
|
78
77
|
```ts
|
|
79
|
-
import { Foo } from '
|
|
78
|
+
import { Foo } from '0xc/hardhat/Foo/Foo.ts'
|
|
80
79
|
import { EthWeb3Client } from '@dequanto/clients/EthWeb3Client'
|
|
81
80
|
|
|
82
81
|
|
|
@@ -97,5 +96,6 @@ const text = await foo.name();
|
|
|
97
96
|
- `npx hardhat compile --artifacts /dist` - set custom folder for artifacts (ABI JSONs and TS contracts)
|
|
98
97
|
- `npx hardhat compile --watch` - Compile the sources and waits to recompile on changes
|
|
99
98
|
- `npx hardhat compile --tsgen false` - Do not generate the TS classes
|
|
99
|
+
- `npx hardhat compile --package path/to/package/folder` - You can split your project into packages, and with the command compile the contracts in a package, the sources will be searched in that directory, and the artifacts output will be written to that directory
|
|
100
100
|
|
|
101
101
|
----
|