openscan-hardhat-links 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/README.md +15 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,11 +14,19 @@ In your `hardhat.config.ts` file, import the plugin and add it to the `plugins`
14
14
 
15
15
  ```ts
16
16
  import { defineConfig } from "hardhat/config";
17
- import myPlugin from "openscan-hardhat-links";
17
+ import openScanPlugin from "openscan-hardhat-links";
18
18
 
19
19
  export default defineConfig({
20
- plugins: [myPlugin],
20
+ plugins: [openScanPlugin],
21
+ networks: {
22
+ ...
23
+ },
24
+ openScan: {
25
+ url: "http://localhost:3030",
26
+ chainId: 31337,
27
+ },
21
28
  });
29
+
22
30
  ```
23
31
 
24
32
  ## Features
@@ -46,29 +54,6 @@ npx hardhat node
46
54
 
47
55
  The OpenScan Explorer will automatically launch and your browser will open to the explorer interface. All subsequent transactions will include OpenScan links in the console output
48
56
 
49
- ### Configuration
50
-
51
- The plugin works out of the box with zero configuration required. The following settings are hardcoded:
52
-
53
- - **Port**: 3030 (fixed, not configurable)
54
- - **Auto-open browser**: Always enabled
55
- - **Webapp path**: Automatically detected from plugin installation
56
-
57
- You can optionally configure the OpenScan URL and chain ID if you want to customize the link format:
58
-
59
- ```ts
60
- import { defineConfig } from "hardhat/config";
61
- import myPlugin from "openscan-hardhat-links";
62
-
63
- export default defineConfig({
64
- plugins: [myPlugin],
65
- openScan: {
66
- url: "http://localhost:3030", // Optional: default is http://localhost:3030
67
- chainId: 31337, // Optional: default is 31337
68
- },
69
- });
70
- ```
71
-
72
57
  ## How It Works
73
58
 
74
59
  ### Webapp Launch
@@ -90,23 +75,16 @@ The plugin uses the `onRequest` network hook to intercept all JSON-RPC requests.
90
75
  ## Requirements
91
76
 
92
77
  - Hardhat 3.x
93
- - Node.js 18+
78
+ - Node.js 24+
94
79
  - Port 3030 must be available
95
80
 
96
81
  ## Troubleshooting
97
82
 
98
- ### Port 3030 Already in Use
83
+ ### Port 8545 or 3030 Already in Use
99
84
 
100
- If you see an error about port 3030 being in use, you need to free up that port:
85
+ If you see an error about port 8545 or 3030 being in use, you need to free up that port:
101
86
 
102
87
  ```bash
103
- # Find process using port 3030
104
- lsof -i:3030
105
-
106
- # Kill the process
107
- kill -9 <PID>
88
+ kill -9 $(lsof -t -i:8545)
89
+ kill -9 $(lsof -t -i:3030)
108
90
  ```
109
-
110
- ### Browser Doesn't Open Automatically
111
-
112
- The plugin attempts to open your default browser automatically. If this fails, you can manually navigate to <http://localhost:3030>.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openscan-hardhat-links",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Hardhat 3 plugin to display OpenScan links",
5
5
  "license": "MIT",
6
6
  "type": "module",