Skip to content

Commit a06e729

Browse files
authored
Merge pull request #1032 from oasisprotocol/andrej/feature/update-localnet-docs
docs: Update localnet docs
2 parents 9ba6288 + 3e8b31a commit a06e729

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

docs/dapp/tools/localnet.mdx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ of a:
1818
- single key manager node,
1919
- PostgreSQL instance,
2020
- Oasis Web3 gateway with transaction indexer and enabled Oasis RPCs,
21+
- Oasis Nexus indexer and Explorer frontend,
2122
- helper script which populates the account(s) for you.
2223

2324
:::note Hardware requirements
@@ -51,19 +52,19 @@ docker run -it -p8544-8548:8544-8548 ghcr.io/oasisprotocol/emerald-localnet
5152
After a while, running the `sapphire-localnet` will show you something like:
5253

5354
```console
54-
sapphire-localnet 2024-11-22-git502678f (oasis-core: 24.3, sapphire-paratime: 0.9.0-testnet, oasis-web3-gateway: 5.1.0)
55+
sapphire-localnet 2024-11-29-gite748a1a (oasis-core: 24.3, sapphire-paratime: 0.9.0-testnet, oasis-web3-gateway: 5.1.0)
5556

5657
* No ROFLs detected.
5758
* Starting oasis-net-runner with sapphire...
58-
* Waiting for Postgres to start.
59-
* Waiting for Oasis node to start.......
59+
* Waiting for Postgres to start...
60+
* Waiting for Oasis node to start.....
6061
* Waiting for Envoy proxy to start.
6162
* Starting oasis-web3-gateway...
6263
* Bootstrapping network (this might take a minute)....
6364
* Waiting for key manager......
6465
* Creating database 'nexus'
6566
* Waiting for Nexus to start.
66-
* Waiting for Explorer to start.....
67+
* Waiting for Explorer to start.
6768
* Populating accounts...
6869

6970
Available Accounts
@@ -93,7 +94,7 @@ WARNING: The chain is running in ephemeral mode. State will be lost after restar
9394
* Web3 RPC listening on http://localhost:8545 and ws://localhost:8546. Chain ID: 0x5afd.
9495
* Nexus API listening on http://localhost:8547.
9596
* Localnet Explorer available at http://localhost:8548.
96-
* Container start-up took 73 seconds, node log level is set to warn.
97+
* Container start-up took 69 seconds, node log level is set to warn.
9798
```
9899

99100
Those familiar with local dApp environments will find the output above similar
@@ -109,12 +110,13 @@ The [Oasis GRPC][oasis-rpc] endpoint is exposed on:
109110

110111
- `http://localhost:8544`
111112

112-
The local explorer you can visit at:
113-
114-
- [http://localhost:8548](http://localhost:8548)
115-
116113
[oasis-rpc]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/oasis-node/rpc.md
117114

115+
In addition to these, the Nexus API is available on `http://localhost:8547`
116+
and an Explorer instance on `http://localhost:8548`.
117+
These can be disabled by passing `--no-explorer` or setting the environment
118+
variable `OASIS_DOCKER_START_EXPLORER` to `no`.
119+
118120
By default, the Localnet docker image will populate the first five accounts
119121
derived from the standard test mnemonic, compatible with `hardhat node`.
120122
These accounts are typically used for Solidity unit tests. If you prefer
@@ -126,8 +128,8 @@ derived addresses to fund.
126128
<TabItem value="Sapphire">
127129

128130
```sh
129-
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet -to "bench remain brave curve frozen verify dream margin alarm world repair innocent" -n3
130-
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
131+
docker run -it -p8544-8548:8544-8548 ghcr.io/oasisprotocol/sapphire-localnet -to "bench remain brave curve frozen verify dream margin alarm world repair innocent" -n3
132+
docker run -it -p8544-8548:8544-8548 ghcr.io/oasisprotocol/sapphire-localnet -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
131133
```
132134

133135
</TabItem>
@@ -178,8 +180,8 @@ contract and wallet balance will be lost after you quit the Docker container!
178180
## GitHub Actions
179181

180182
You can easily integrate localnet into your CI/CD workflow. Use the example
181-
GitHub Action configuration to start a Sapphire or Emerald stack, fund the
182-
first two test accounts, and expose the necessary ports for testing.
183+
GitHub Action configuration to start a Sapphire or Emerald stack and expose
184+
the necessary ports for testing.
183185

184186
<Tabs>
185187
<TabItem value="Sapphire">
@@ -195,7 +197,7 @@ jobs:
195197
- 8545:8545
196198
- 8546:8546
197199
env:
198-
OASIS_DEPOSIT_BINARY: /oasis-deposit -n 2
200+
OASIS_DOCKER_START_EXPLORER: no
199201
options: >-
200202
--rm
201203
--health-cmd="test -f /CONTAINER_READY"
@@ -216,7 +218,7 @@ jobs:
216218
- 8545:8545
217219
- 8546:8546
218220
env:
219-
OASIS_DEPOSIT_BINARY: /oasis-deposit -n 2
221+
OASIS_DOCKER_START_EXPLORER: no
220222
options: >-
221223
--rm
222224
--health-cmd="test -f /CONTAINER_READY"

0 commit comments

Comments
 (0)