From 699f66aab550ceee26c69cdd85041617e6d2e6eb Mon Sep 17 00:00:00 2001 From: Awais Bin Kaleem <51041559+AwaisBinKaleem@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:14:43 +0500 Subject: [PATCH 1/6] set port and hostname --- docs/src/content/hardhat-runner/docs/getting-started/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 55b9dcbeed..a53e11327b 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -325,6 +325,8 @@ By default, Hardhat will spin up a new in-memory instance of Hardhat Network on To run Hardhat Network in this way, run `npx hardhat node`: +To run Hardhat Network on specific port and allow traffic from specifid address in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`: + ``` $ npx hardhat node Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/ From e220efed44a7db27e8ff1090a33c12d139eb9bbd Mon Sep 17 00:00:00 2001 From: Awais Bin Kaleem <51041559+AwaisBinKaleem@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:27:22 +0500 Subject: [PATCH 2/6] allow all traffic to rpc with zero address --- docs/src/content/hardhat-runner/docs/getting-started/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index a53e11327b..7ba03ce7d2 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -325,7 +325,7 @@ By default, Hardhat will spin up a new in-memory instance of Hardhat Network on To run Hardhat Network in this way, run `npx hardhat node`: -To run Hardhat Network on specific port and allow traffic from specifid address in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`: +To run Hardhat Network on specific port and allow traffic from specifid address in this way, run `npx hardhat node --hostname 0.0.0.0 --port 8545`: ``` $ npx hardhat node From d297be978e2f1d54efb4b1f2c9c9181dee817737 Mon Sep 17 00:00:00 2001 From: Awais Bin Kaleem <51041559+AwaisBinKaleem@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:07:40 +0500 Subject: [PATCH 3/6] Update Docs index.md --- .../src/content/hardhat-runner/docs/getting-started/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 7ba03ce7d2..94297d1b1b 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -325,8 +325,6 @@ By default, Hardhat will spin up a new in-memory instance of Hardhat Network on To run Hardhat Network in this way, run `npx hardhat node`: -To run Hardhat Network on specific port and allow traffic from specifid address in this way, run `npx hardhat node --hostname 0.0.0.0 --port 8545`: - ``` $ npx hardhat node Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/ @@ -358,6 +356,9 @@ npx hardhat ignition deploy ./ignition/modules/Lock.js --network localhost :::: +To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`: +`--hostname 0.0.0.0` will allow access to rpc from any external ip. + Congrats! You have created a project and compiled, tested and deployed a smart contract. Show us some love by starring [our repository on GitHub!](https://github.com/NomicFoundation/hardhat)️ From bbc16eea815a3ecda524203f8ce1834219a7cc36 Mon Sep 17 00:00:00 2001 From: Awais Bin Kaleem <51041559+AwaisBinKaleem@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:16:13 +0500 Subject: [PATCH 4/6] fix typo --- docs/src/content/hardhat-runner/docs/getting-started/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 94297d1b1b..4baeb01e7d 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -356,7 +356,7 @@ npx hardhat ignition deploy ./ignition/modules/Lock.js --network localhost :::: -To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`: +To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`:

`--hostname 0.0.0.0` will allow access to rpc from any external ip. Congrats! You have created a project and compiled, tested and deployed a smart contract. From a3e732d0d39e3ef69f167ae76b753c5905996871 Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Fri, 13 Sep 2024 23:43:53 +0000 Subject: [PATCH 5/6] Fix linter errors --- docs/src/content/hardhat-runner/docs/getting-started/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 4baeb01e7d..4ab071a282 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -356,8 +356,7 @@ npx hardhat ignition deploy ./ignition/modules/Lock.js --network localhost :::: -To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`:

-`--hostname 0.0.0.0` will allow access to rpc from any external ip. +To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`:

`--hostname 0.0.0.0` will allow access to rpc from any external ip. Congrats! You have created a project and compiled, tested and deployed a smart contract. From ff74f1d13678b28b701e35ca40f9c6c8b777d8bb Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Fri, 13 Sep 2024 23:54:37 +0000 Subject: [PATCH 6/6] Improve the docs a bit --- docs/src/content/hardhat-runner/docs/getting-started/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 4ab071a282..5e57f6fb8d 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -356,7 +356,9 @@ npx hardhat ignition deploy ./ignition/modules/Lock.js --network localhost :::: -To run Hardhat Network on specific port and allow traffic from specific address add hostname in this way, run `npx hardhat node --hostname 127.0.0.1 --port 8545`:

`--hostname 0.0.0.0` will allow access to rpc from any external ip. +To run Hardhat Network on specific port and allow incoming requests from a specific network interface or hostname, run `npx hardhat node --hostname 127.0.0.1 --port 8545`. + +If you want to allow incoming requests from anywhere, including external ips, use `--hostname 0.0.0.0`. Congrats! You have created a project and compiled, tested and deployed a smart contract.