@enscribe/hardhat-enscribe 0.1.1 → 0.1.3
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/README.md +2 -15
- package/dist/src/internal/tasks/name.js +2 -2
- package/package.json +28 -29
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ hardhat-enscribe allows developers to automatically assign ENS names to their sm
|
|
|
9
9
|
- **Subname Creation**: Creates ENS subnames for your contracts
|
|
10
10
|
- **Forward Resolution**: Maps ENS names to contract addresses
|
|
11
11
|
- **Reverse Resolution**: Maps contract addresses back to ENS names
|
|
12
|
-
- **Multi-chain Support**: Works across multiple networks including Ethereum, Sepolia
|
|
12
|
+
- **Multi-chain Support**: Works across multiple networks including Ethereum, Sepolia
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
@@ -57,11 +57,6 @@ npx hardhat enscribe name <ENS_NAME> --contract <CONTRACT_ADDRESS>
|
|
|
57
57
|
npx hardhat enscribe name mycontract.mydomain.eth --contract 0x1234...5678
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
#### Name a contract on Linea
|
|
61
|
-
```bash
|
|
62
|
-
npx hardhat enscribe name mycontract.mydomain.eth --contract 0x1234...5678 --chain linea
|
|
63
|
-
```
|
|
64
|
-
|
|
65
60
|
### Command Options
|
|
66
61
|
|
|
67
62
|
- `name` (required): The ENS name to assign (e.g., `mycontract.mydomain.eth`)
|
|
@@ -74,8 +69,6 @@ The plugin supports the following networks:
|
|
|
74
69
|
|
|
75
70
|
- **Ethereum Mainnet** (`mainnet`)
|
|
76
71
|
- **Sepolia Testnet** (`sepolia`) - Default
|
|
77
|
-
- **Linea Mainnet** (`linea`)
|
|
78
|
-
- **Linea Sepolia** (`linea-sepolia`)
|
|
79
72
|
|
|
80
73
|
## Contract Requirements
|
|
81
74
|
|
|
@@ -142,13 +135,7 @@ networks: {
|
|
|
142
135
|
chainType: "l1",
|
|
143
136
|
url: configVariable("SEPOLIA_RPC_URL"),
|
|
144
137
|
accounts: [configVariable("SEPOLIA_PRIVATE_KEY")],
|
|
145
|
-
}
|
|
146
|
-
linea: {
|
|
147
|
-
type: "http",
|
|
148
|
-
chainType: "l2",
|
|
149
|
-
url: configVariable("LINEA_RPC_URL"),
|
|
150
|
-
accounts: [configVariable("LINEA_PRIVATE_KEY")],
|
|
151
|
-
},
|
|
138
|
+
}
|
|
152
139
|
}
|
|
153
140
|
```
|
|
154
141
|
|
|
@@ -9,11 +9,11 @@ import publicResolverABI from "../abi/PublicResolver.js";
|
|
|
9
9
|
import reverseRegistrarABI from "../abi/ReverseRegistrar.js";
|
|
10
10
|
import { isAddressEmpty, isAddressValid, parseNormalizedName, logMetric, } from "../utils.js";
|
|
11
11
|
import { getContractAddresses } from "../config/contracts.js";
|
|
12
|
-
import {
|
|
12
|
+
import { randomUUID } from "crypto";
|
|
13
13
|
// Global contracts object - will be initialized based on chain
|
|
14
14
|
let contracts = {};
|
|
15
15
|
const opType = 'hh-enscribe-nameexisting';
|
|
16
|
-
const corelationId =
|
|
16
|
+
const corelationId = randomUUID();
|
|
17
17
|
const taskName = async (args, hre) => {
|
|
18
18
|
// console.log(args);
|
|
19
19
|
if (args.contract == null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enscribe/hardhat-enscribe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A Hardhat v3 plugin to name smart contracts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,38 +22,37 @@
|
|
|
22
22
|
"node": ">=18.0.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"viem": "^2.37.8"
|
|
26
|
-
"uuid": "^11.1.0"
|
|
25
|
+
"viem": "^2.37.8"
|
|
27
26
|
},
|
|
28
27
|
"peerDependencies": {
|
|
29
28
|
"hardhat": "^3.0.0"
|
|
30
29
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "rimraf dist && tsc -p tsconfig.json",
|
|
48
|
-
"lint": "eslint . --ext .ts",
|
|
49
|
-
"format": "prettier --write .",
|
|
50
|
-
"test": "vitest run",
|
|
51
|
-
"test:unit": "vitest run src/internal/tasks/name.test.ts",
|
|
52
|
-
"test:integration": "vitest run test/enscribe.integration.test.ts",
|
|
53
|
-
"test:hardhat": "vitest run test/enscribe.hardhat.test.ts",
|
|
54
|
-
"test:all": "pnpm run test:unit && pnpm run test:integration"
|
|
55
|
-
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@nomicfoundation/hardhat-viem": "^3.0.0",
|
|
32
|
+
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
|
|
33
|
+
"@types/chai": "^4.3.11",
|
|
34
|
+
"@types/mocha": "^10.0.6",
|
|
35
|
+
"@types/node": "^20.0.0",
|
|
36
|
+
"chai": "^4.3.11",
|
|
37
|
+
"eslint": "^9.0.0",
|
|
38
|
+
"hardhat": "3.0.0",
|
|
39
|
+
"prettier": "^3.0.0",
|
|
40
|
+
"rimraf": "^6.0.0",
|
|
41
|
+
"ts-node": "^10.9.2",
|
|
42
|
+
"typescript": "^5.0.0",
|
|
43
|
+
"vitest": "^1.6.0"
|
|
44
|
+
},
|
|
56
45
|
"publishConfig": {
|
|
57
46
|
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "rimraf dist && tsc -p tsconfig.json",
|
|
50
|
+
"lint": "eslint . --ext .ts",
|
|
51
|
+
"format": "prettier --write .",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:unit": "vitest run src/internal/tasks/name.test.ts",
|
|
54
|
+
"test:integration": "vitest run test/enscribe.integration.test.ts",
|
|
55
|
+
"test:hardhat": "vitest run test/enscribe.hardhat.test.ts",
|
|
56
|
+
"test:all": "pnpm run test:unit && pnpm run test:integration"
|
|
58
57
|
}
|
|
59
|
-
}
|
|
58
|
+
}
|