Skip to content

Commit 44d1030

Browse files
authored
Merge pull request #320 from maxnorm/cli
fix cli issues
2 parents 2c3b4f8 + 33519f4 commit 44d1030

7 files changed

Lines changed: 38 additions & 7 deletions

File tree

.changeset/modern-zebras-peel.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@fake-scope/fake-pkg": patch
3+
---
4+
5+
fix: compiler versions & imports
6+
docs: add local node command

cli/src/templates/default/hardhat/ts/minimal/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ npx hardhat build
2323
npx hardhat test
2424
```
2525

26-
### Node
26+
### Local node
2727
```sh
2828
npx hardhat node
2929
```
3030

31+
This will launch a JSON-RPC server locally at `http://127.0.0.1:8545`
32+
3133
### Help
3234
```sh
3335
npx hardhat --help

cli/src/templates/default/hardhat/ts/mocha-ethers/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ npx hardhat test solidity
3838
npx hardhat test mocha
3939
```
4040

41+
### Launch a local Hardhat node
42+
43+
To start a local Hardhat network node (an in-process Ethereum simulator), run:
44+
45+
```sh
46+
npx hardhat node
47+
```
48+
49+
This will launch a JSON-RPC server locally at `http://127.0.0.1:8545` with unlocked test accounts and pre-funded balances. Your contracts can be deployed and tested against this running network by configuring your scripts or commands to use the local endpoint.
50+
51+
In a separate terminal, you can then deploy or test against the local node by specifying the `--network localhost` option if needed:
52+
53+
4154
### Deploy
4255

4356
Deploy to a local chain:

cli/src/templates/default/hardhat/ts/mocha-ethers/hardhat.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export default defineConfig({
66
solidity: {
77
profiles: {
88
default: {
9-
version: "0.8.28",
9+
version: "0.8.30",
1010
},
1111
production: {
12-
version: "0.8.28",
12+
version: "0.8.30",
1313
settings: {
1414
optimizer: {
1515
enabled: true,

cli/src/templates/default/hardhat/ts/node-runner-viem/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ npx hardhat test solidity
3838
npx hardhat test nodejs
3939
```
4040

41+
### Launch a local Hardhat node
42+
43+
To start a local Hardhat network node (an in-process Ethereum simulator), run:
44+
45+
```sh
46+
npx hardhat node
47+
```
48+
49+
This will launch a JSON-RPC server locally at `http://127.0.0.1:8545` with unlocked test accounts and pre-funded balances. Your contracts can be deployed and tested against this running network by configuring your scripts or commands to use the local endpoint.
50+
51+
In a separate terminal, you can then deploy or test against the local node by specifying the `--network localhost` option if needed:
52+
4153
### Deploy
4254

4355
Deploy to a local chain:

cli/src/templates/default/hardhat/ts/node-runner-viem/contracts/tests/CounterFacet.t.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ pragma solidity ^0.8.30;
33

44
import {CounterFacet} from "../facets/CounterFacet.sol";
55
import {Diamond} from "../Diamond.sol";
6-
import {DiamondInspectFacet} from "@perfect-abstractions/compose/facets/diamond/DiamondInspectFacet.sol";
7-
import {DiamondUpgradeFacet} from "@perfect-abstractions/compose/facets/diamond/DiamondUpgradeFacet.sol";
86
import {Test} from "forge-std/Test.sol";
97

108
contract CounterTest is Test {

cli/src/templates/default/hardhat/ts/node-runner-viem/ignition/modules/Counter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
22

3-
import { DiamondInspectFacet } from "@perfect-abstractions/compose/facets/diamond/DiamondInspectFacet.sol";
4-
import { DiamondUpgradeFacet } from "@perfect-abstractions/compose/facets/diamond/DiamondUpgradeFacet.sol";
3+
import { DiamondInspectFacet } from "@perfect-abstractions/compose/diamond/DiamondInspectFacet.sol";
4+
import { DiamondUpgradeFacet } from "@perfect-abstractions/compose/diamond/DiamondUpgradeFacet.sol";
55

66
export default buildModule("CounterDiamondModule", (m) => {
77
const counterFacet = m.contract("CounterFacet");

0 commit comments

Comments
 (0)