Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aefhm committed Oct 13, 2024
1 parent 840f376 commit 42aa9cc
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion docs/dapp/tools/localnet.md → docs/dapp/tools/localnet.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Localnet

For convenient development and testing of your dApps the Oasis team prepared
Expand Down Expand Up @@ -26,16 +29,23 @@ machine's OS.

To run the image, execute:

<Tabs>
<TabItem value="Sapphire">

```sh
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet
```

or substitute "sapphire" for "emerald"
</TabItem>
<TabItem value="Emerald">

```sh
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/emerald-localnet
```

</TabItem>
</Tabs>

After a while, running the `sapphire-localnet` will show you something like:

```
Expand Down Expand Up @@ -93,23 +103,52 @@ the wallet addresses. By passing the `-test-mnemonic` flag you can fund the
standard test accounts provided by the `hardhat node` commmand and that are
typically used for solidity unit tests.


<Tabs>
<TabItem value="Sapphire">

```sh
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
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet -test-mnemonic
```

</TabItem>
<TabItem value="Emerald">

```sh
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/emerald-localnet -to "bench remain brave curve frozen verify dream margin alarm world repair innocent" -n3
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/emerald-localnet -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/emerald-localnet -test-mnemonic
```

</TabItem>
</Tabs>

:::

:::note Running on Apple M chips

There is currently no `arm64` build available for M Macs, so you will need to
force the docker image to use the `linux/x86_64` platform, like this:

<Tabs>
<TabItem value="Sapphire">

```sh
docker run -it -p8544-8546:8544-8546 --platform linux/x86_64 ghcr.io/oasisprotocol/sapphire-localnet
```

</TabItem>
<TabItem value="Emerald">

```sh
docker run -it -p8544-8546:8544-8546 --platform linux/x86_64 ghcr.io/oasisprotocol/emerald-localnet
```

</TabItem>
</Tabs>

:::

:::danger
Expand Down

0 comments on commit 42aa9cc

Please sign in to comment.