Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/modern-zebras-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fake-scope/fake-pkg": patch
---

fix: compiler versions & imports
docs: add local node command
4 changes: 3 additions & 1 deletion cli/src/templates/default/hardhat/ts/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ npx hardhat build
npx hardhat test
```

### Node
### Local node
```sh
npx hardhat node
```

This will launch a JSON-RPC server locally at `http://127.0.0.1:8545`

### Help
```sh
npx hardhat --help
Expand Down
13 changes: 13 additions & 0 deletions cli/src/templates/default/hardhat/ts/mocha-ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ npx hardhat test solidity
npx hardhat test mocha
```

### Launch a local Hardhat node

To start a local Hardhat network node (an in-process Ethereum simulator), run:

```sh
npx hardhat node
```

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.

In a separate terminal, you can then deploy or test against the local node by specifying the `--network localhost` option if needed:


### Deploy

Deploy to a local chain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export default defineConfig({
solidity: {
profiles: {
default: {
version: "0.8.28",
version: "0.8.30",
},
production: {
version: "0.8.28",
version: "0.8.30",
settings: {
optimizer: {
enabled: true,
Expand Down
12 changes: 12 additions & 0 deletions cli/src/templates/default/hardhat/ts/node-runner-viem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ npx hardhat test solidity
npx hardhat test nodejs
```

### Launch a local Hardhat node

To start a local Hardhat network node (an in-process Ethereum simulator), run:

```sh
npx hardhat node
```

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.

In a separate terminal, you can then deploy or test against the local node by specifying the `--network localhost` option if needed:

### Deploy

Deploy to a local chain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ pragma solidity ^0.8.30;

import {CounterFacet} from "../facets/CounterFacet.sol";
import {Diamond} from "../Diamond.sol";
import {DiamondInspectFacet} from "@perfect-abstractions/compose/facets/diamond/DiamondInspectFacet.sol";
import {DiamondUpgradeFacet} from "@perfect-abstractions/compose/facets/diamond/DiamondUpgradeFacet.sol";
import {Test} from "forge-std/Test.sol";

contract CounterTest is Test {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

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

export default buildModule("CounterDiamondModule", (m) => {
const counterFacet = m.contract("CounterFacet");
Expand Down
Loading