Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IOTA Sandbox docs #1344

Merged
merged 26 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
5 changes: 5 additions & 0 deletions docs/_admonitions/_linux-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:::note Linux Commands

The commands assume you are using Linux.

:::
5 changes: 5 additions & 0 deletions docs/build/getting-started/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ module.exports = {
slug: '/tools',
},
items: [
{
type: 'link',
label: 'IOTA Sandbox',
href: '/iota-sandbox/welcome',
},
{
type: 'link',
label: 'CLI Wallet',
Expand Down
88 changes: 88 additions & 0 deletions docs/build/iota-sandbox/docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
description: Set up and get started with the IOTA Sandbox
keywords:
- how to
- setup
- sandbox
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md';

# Getting Started With the IOTA Sandbox

You can use this guide to [install](#install-the-iota-sandbox-using-docker)
and [run](#run) the [IOTA Sandbox](welcome.md).
It includes everything you need to develop your own IOTA dApps, plugins, and more.

## Install the IOTA Sandbox Using Docker

### Requirements

1. A recent release of [Docker](https://www.docker.com/). Avoid using the Docker version shipped with your OS since these are mostly out of date. You can find installation instructions in the [official Docker documentation](https://docs.docker.com/).
2. [Docker Compose CLI plugin](https://docs.docker.com/compose/install/linux/).
3. sed
4. jq
5. Make sure ports 80 and 8082 are not in use by other applications. If they are change them in the `.env` file. Optional: If you enabled the explorer profile by default it will use port 8081

### Download the Latest Release

:::note

The commands assume you are using Linux.

:::
Dr-Electron marked this conversation as resolved.
Show resolved Hide resolved

Once you have completed all the installation [requirements](#requirements), you can download the sandbox. The following command will download the latest version.

```sh
mkdir iota-sandbox && cd iota-sandbox && curl -L https://github.com/iotaledger/iota-sandbox/releases/latest/download/iota_sandbox.tar.gz | tar -zx
```

### Prepare

<LinuxCommands/>

#### Set Up Your Environment

In most cases the default setup should be enough. But you can edit the `.env` file to configure some optional settings:

```sh reference
https://github.com/iotaledger/iota-sandbox/blob/main/sandbox/.env
```

#### Bootstrap

If you haven't run the IOTA Sandbox before, you need to bootstrap it. To do that, just run the following command:

```sh
sudo ./bootstrap.sh
```

## Run

### Start the IOTA Sandbox

You can start the IOTA Sandbox by running:

```sh
docker compose up -d
```

- `-d` Instructs Docker to start the containers in the background.

:::tip Available endpoints

Once the container is up and running, you can access the node using the
available [endpoints](references/endpoints.md).

:::

### Stop the IOTA Sandbox

You can stop the IOTA Sandbox by running the following commands:

```sh
docker compose down
```
10 changes: 10 additions & 0 deletions docs/build/iota-sandbox/docs/how-tos/interact-wasp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Interact with Wasp
description: Interact with a wasp chain and configure the needed tools.
keywords:
- how to
- setup
- chain
---

The sandbox comes with a bootstrapped wasp chain and the [EVM Toolkit](https://github.com/iotaledger/evm-toolkit) preconfigured. You can find its ID and RPC url in the [Wasp Dashboard](../references/endpoints.md#dashboard-1). Together with the prefunded [L2 account](../references/keys.md#l2-account) you can use it together with tools like hardhat or ethers.js.
111 changes: 111 additions & 0 deletions docs/build/iota-sandbox/docs/references/endpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Endpoints
description: Endpoints and credentials of the IOTA Sandbox
keywords:
- api
- passwords
- users
- credentials
- endpoints
- reference
---

# Endpoints

Once you have [installed](../getting-started.md#install-the-iota-sandbox-using-docker),
[bootstrapped](../getting-started.md#bootstrap),
and [started](../getting-started.md#start-the-iota-sandbox) the IOTA Sandbox,
you can access the following endpoints:

## Hornet

### Dashboard

```plaintext
http://localhost/
```

#### Default Credentials

**Username**: `admin`
**Password**: `admin`

### API

```plaintext
http://localhost/
```

### INX

```plaintext
http://localhost:9029/
```

## Faucet

### Frontend

```plaintext
http://localhost/faucet/
```

### API

```plaintext
http://localhost/faucet/
```

## Wasp

### Dashboard

```plaintext
http://localhost/wasp/dashboard/
```

#### Default Credentials

**Username**: `wasp`
**Password**: `wasp`

### API

```plaintext
http://localhost/wasp/api/
```

## Chronicle

### API

```plaintext
http://localhost/chronicle/
```

## EVM Toolkit

:::info Port

The EVM Toolkit is available on port `8082` by default. You can change it in the `.env` file.

:::

### Frontend

```plaintext
http://localhost:8082/
```

## Grafana

### Frontend

```plaintext
http://localhost/grafana/
```

#### Default Credentials

**Username**: `admin`
**Password**: `admin`
45 changes: 45 additions & 0 deletions docs/build/iota-sandbox/docs/references/keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Keys for the IOTA Sandbox
description: Keys for the IOTA Sandbox
keywords:
- keys
- reference
---
## Keys

You can use the following pre-funded mnemonics and addresses while working with the IOTA Sandbox.

### Wallet

| Name | Value |
|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| Token mnemonic | giant dynamic museum toddler six deny defense ostrich bomb access mercy blood explain muscle shoot shallow glad autumn author calm heavy hawk abuse rally |
| Token bech32 address with `snd` HRP | snd1qqx6kw52j70ed3mr5pukt048kya86vnxp33d3czvhpp9r6rvljg922ksxeq |

### Faucet

| Name | Value |
|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Token mnemonic | average day true meadow dawn pistol near vicious have ordinary sting fetch mobile month ladder explain tornado curious energy orange belt glue surge urban |
| Token bech32 address with `snd` HRP | snd1qzu4rgaqaymc7udxfm23urh98xr2yy4cezlmpsc7808v0skahdvax882xtm |

### INX-Spammer

| Name | Value |
|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| Token mnemonic | reward addict anger tongue denial supply cattle lawn foot climb ask friend base spring ensure spike alien equal burst bitter crowd august ignore animal |
| Token bech32 address with `snd` HRP | snd1qre96hg2vhuzr7apqxeqtp8cs66ndfcjx0sdhpgr6xlhfeh0a2hzj2zmcll |

### Wasp Default Chain

| Name | Value |
|-------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| Token mnemonic | income seed actor ankle gesture sock twenty satoshi bonus sister use afraid phrase muffin purse alpha year volcano name recall slim stick sister eagle |
| Token bech32 address with `snd` HRP | snd1qqrku7yz0wd87v20qxnd7hyzunjpt36jckk5t227k93e5rhzhtqlxwk4qsu |

### L2 Account

| Name | Value |
|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Token mnemonic | echo mass dentist hood neutral claw fragile scare magnet float citizen pink order hundred village edge quality excuse donor spawn heart happy extend resist |
| EVM Address | 0xb62ea087c36eBd77Fb58174Ae162395722dE9Cb0 |
30 changes: 30 additions & 0 deletions docs/build/iota-sandbox/docs/welcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
description: The IOTA Sandbox serves as a local network designed specifically for developers.
keywords:
- sandbox
- TOC
- overview
- reference
---
# IOTA Sandbox

![IOTA Sandbox](/img/banner/banner_iota_sandbox.svg)

The IOTA Sandbox serves as a local network designed specifically for developers.
It enables prototyping and testing of smart contracts, INX plugins, and Layer 1 applications within the IOTA ecosystem.
This Sandbox offers a secure and isolated environment for developers to experiment and verify functionality prior to deploying in production settings.

:::warning For research & development only

The IOTA Sandbox is intended for research and development purposes only.
It is not for creating production-ready networks.

:::

:::tip Public Testnet

If possible,
you should use the [public testnet](https://wiki.iota.org/build/networks-endpoints/#public-testnet)
where you can experiment with confidence and community support.

:::
38 changes: 38 additions & 0 deletions docs/build/iota-sandbox/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
docs: [
{
type: 'doc',
id: 'welcome',
label: 'Welcome',
},
{
type: 'doc',
id: 'getting-started',
label: 'Getting Started',
},
{
type: 'category',
label: 'How To',
items: [
{
type: 'doc',
id: 'how-tos/interact-wasp',
},
],
},
{
type: 'category',
label: 'References',
items: [
{
type: 'doc',
id: 'references/endpoints',
},
{
type: 'doc',
id: 'references/keys',
},
],
},
],
};
13 changes: 3 additions & 10 deletions docs/maintain/hornet/2.0/docs/how_tos/using_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ keywords:

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md';

# Install HORNET using Docker

Expand Down Expand Up @@ -52,11 +53,7 @@ It includes everything required to setup a public node accessible by wallets and

## Download the latest release

:::note

The commands assume you are using Linux.

:::
<LinuxCommands/>

Once you have completed all the installation [requirements](#requirements), you can download the latest release by running the following command:

Expand All @@ -66,11 +63,7 @@ mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-s

## Prepare

:::note

The commands assume you are using Linux.

:::
<LinuxCommands/>

### 1. Generate dashboard credentials

Expand Down
Loading
Loading