diff --git a/.changeset/modern-zebras-peel.md b/.changeset/modern-zebras-peel.md new file mode 100644 index 00000000..5ede1185 --- /dev/null +++ b/.changeset/modern-zebras-peel.md @@ -0,0 +1,6 @@ +--- +"@fake-scope/fake-pkg": patch +--- + +fix: compiler versions & imports +docs: add local node command diff --git a/cli/src/templates/default/hardhat/ts/minimal/README.md b/cli/src/templates/default/hardhat/ts/minimal/README.md index 69224a4b..164983d5 100644 --- a/cli/src/templates/default/hardhat/ts/minimal/README.md +++ b/cli/src/templates/default/hardhat/ts/minimal/README.md @@ -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 diff --git a/cli/src/templates/default/hardhat/ts/mocha-ethers/README.md b/cli/src/templates/default/hardhat/ts/mocha-ethers/README.md index 24cc1a46..382231d7 100644 --- a/cli/src/templates/default/hardhat/ts/mocha-ethers/README.md +++ b/cli/src/templates/default/hardhat/ts/mocha-ethers/README.md @@ -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: diff --git a/cli/src/templates/default/hardhat/ts/mocha-ethers/hardhat.config.ts b/cli/src/templates/default/hardhat/ts/mocha-ethers/hardhat.config.ts index 57c4dd2a..00733d97 100644 --- a/cli/src/templates/default/hardhat/ts/mocha-ethers/hardhat.config.ts +++ b/cli/src/templates/default/hardhat/ts/mocha-ethers/hardhat.config.ts @@ -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, diff --git a/cli/src/templates/default/hardhat/ts/node-runner-viem/README.md b/cli/src/templates/default/hardhat/ts/node-runner-viem/README.md index 5fb2ca80..7d617aec 100644 --- a/cli/src/templates/default/hardhat/ts/node-runner-viem/README.md +++ b/cli/src/templates/default/hardhat/ts/node-runner-viem/README.md @@ -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: diff --git a/cli/src/templates/default/hardhat/ts/node-runner-viem/contracts/tests/CounterFacet.t.sol b/cli/src/templates/default/hardhat/ts/node-runner-viem/contracts/tests/CounterFacet.t.sol index a6f3b5e8..053588b5 100644 --- a/cli/src/templates/default/hardhat/ts/node-runner-viem/contracts/tests/CounterFacet.t.sol +++ b/cli/src/templates/default/hardhat/ts/node-runner-viem/contracts/tests/CounterFacet.t.sol @@ -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 { diff --git a/cli/src/templates/default/hardhat/ts/node-runner-viem/ignition/modules/Counter.ts b/cli/src/templates/default/hardhat/ts/node-runner-viem/ignition/modules/Counter.ts index 3a4678e8..0f6234f4 100644 --- a/cli/src/templates/default/hardhat/ts/node-runner-viem/ignition/modules/Counter.ts +++ b/cli/src/templates/default/hardhat/ts/node-runner-viem/ignition/modules/Counter.ts @@ -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");