Skip to content

docs: docs updates as per new changes in dive cli #9

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 27 additions & 2 deletions dive/pages/list-of-cli-command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ dive bridge [command]
| Command | Description |
| --------------------- | -------------------------------------------------|
| `btp` | Starts BTP Bridge between ChainA and ChainB
| `ibc` | Starts IBC Bridge between ChainA and ChainB




### dive bridge btp
Expand All @@ -59,7 +62,27 @@ dive bridge btp [flags]
| -------------- | ---------- | -------------------------------------------------|
| `--chainA string` | true | Mention Name of Supported Chain
| `--chainB string`| true | Mention Name of Supported Chain
| `--bridge` | false | Add this flag if icon bridge is required
| `--bmvbridge` | false | Add this flag if icon bridge is required


### dive bridge ibc

#### Description
Starts IBC Bridge between ChainA and ChainB

#### Usage

```filename="" copy
dive bridge ibc [flags]
```

#### Flags
| Flags | Required | Description |
| -------------- | ---------- | -------------------------------------------------|
| `--chainA string` | true | Mention Name of Supported Chain
| `--chainB string`| true | Mention Name of Supported Chain
| `--chainAServiceName string`| true | Mention service name if node is already running
| `--chainBServiceName string`| true | Mention service name if node is already running


### dive chain
Expand All @@ -80,6 +103,8 @@ dive chain [command]
| `eth` | Build, initialize and start a eth node
| `hardhat` | Build, initialize and start a hardhat node
|`icon` | Build, initialize and start a icon node
|`archway` | Build, initialize and start a archway node
|`neutron` | Build, initialize and start a neutron node


### dive chain icon
Expand Down Expand Up @@ -112,7 +137,7 @@ dive chain icon [command]
### dive chain icon decentralize

#### Description
Decentralise Icon Node is necessary if you want to connect your local icon node to BTP network
A Decentralise Icon Node is necessary if you want to connect your local icon node to BTP network

#### Usage

Expand Down
26 changes: 26 additions & 0 deletions dive/pages/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,30 @@ Before you begin with DIVE CLI, make sure you have the following prerequisites i

These prerequisites are essential to ensure a smooth setup and usage of DIVE CLI.

## Installing Dive CLI

### Install on MacOS

```bash filename="" copy
brew install hugobyte/tap/dive-cli
```

### Install on Linux

```bash filename="" copy
curl -L https://github.com/HugoByte/DIVE/releases/download/{latest-version}/dive-cli_{latest-version}_linux_{arch}.tar.gz
tar -xvzf dive-cli_{latest-version}_linux_{arch}.tar.gz
mv dive /usr/local/bin
rm dive-cli_{latest-version}_linux_{arch}.tar.gz
```

### Install on Windows

```powershell filename="" copy
Invoke-WebRequest -Uri "https://github.com/HugoByte/DIVE/releases/download/{latest-version}/dive-cli_{latest-version}_windows_{arch}.tar.gz" -OutFile dive.tar.gz
tar -xvzf dive.tar.gz
dive.exe
```
Replace `{latest-version}` and `{arch}` with the appropriate values for the latest version and the architecture you want to support.

Ready to dive in? Let's get started with the installation and setup process.
17 changes: 4 additions & 13 deletions dive/pages/quickstart/_meta.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"setting-up-an-eth-node": {
"title": "Setting up an eth node"
"chains": {
"title": "Setting up an local nodes"
},
"setting-up-an-icon-node": {
"title": "Setting up an icon node"
},
"setting-up-an-archway-node": {
"title": "Setting up an archway node"
},
"setting-up-a-neutron-node": {
"title": "Setting up a neutron node"
},
"setting-up-cross-chain-connection": {
"title" : "Setting up cross chain connection"
"bridges": {
"title": "Setting up an bridge between nodes"
}
}

37 changes: 37 additions & 0 deletions dive/pages/quickstart/bridges.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Setting up the Bridge
---

# Setting up the Bridge

The "bridge" command in DIVE CLI enables you to establish connections between two different blockchain chains using various supported cross-chain communication protocols. This powerful feature allows you to create a relay that connects two distinct chains and facilitates the seamless exchange of messages and data between them.

## Usage

### Dive Bridge Command

The `dive bridge` command provides a unified interface to set up cross-chain bridges. You can use it to initiate communication between different blockchain networks by choosing from the available subcommands:

```bash
dive bridge [flags]
dive bridge [command]
```

#### Available Bridge Commands

1. **BTP (Blockchain Transfer Protocol) Bridge**
- Subcommand: `btp`
- Description: Starts a BTP Bridge between ChainA and ChainB, enabling cross-chain communication via the BTP protocol.

2. **IBC (Inter-Blockchain Communication) Bridge**
- Subcommand: `ibc`
- Description: Establishes connections between Cosmos-based ChainA and ChainB, initiating cross-chain communication using the IBC protocol.

### Global Flags

- `-h, --help`: Displays help for the `dive bridge` command.
- `--verbose`: Prints logs to Stdout for detailed information during the bridge setup process.

For more detailed information about a specific bridge command, you can use the `--help` flag with the desired subcommand, e.g., `dive bridge btp --help` or `dive bridge ibc --help`.

DIVE CLI simplifies the process of creating bridges between blockchain networks, allowing you to harness the power of cross-chain communication in your decentralized applications and experiments. This feature opens up new possibilities for interoperability and data exchange between diverse blockchain ecosystems, making your development journey more versatile and exciting.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
---
title: Setting up Cross Chain Connection (ICON-ETH) using BTP Bridge
title: Setting up Cross Chain Connection using BTP Bridge
---

import { Callout } from '../../node_modules/nextra/dist/components/callout.js'
import { Callout } from '../../../node_modules/nextra/dist/components/callout.js'

# Setting up Cross Chain Connection using BTP Bridge

# Setting up Cross Chain Connection (ICON-ETH) using BTP Bridge

Follow these steps to establish a cross-chain connection between ICON and Ethereum using the BTP Bridge:
Follow these steps to establish a cross-chain connection between chains using the BTP Bridge:

## Step 1: Ensure Kurtosis Engine is Running

Before proceeding, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command:

```filename="" copy
```bash filename="" copy
kurtosis engine start
```

## Step 2: Start Two Chains (ICON and Ethereum/Hardhat) with BTP Bridge
## Step 2: Start Two Chains with BTP Bridge

To start both the ICON and Ethereum chains and establish a BTP bridge between them, run the following command:

```filename="" copy
```bash filename="" copy
dive bridge btp --chainA icon --chainB eth
```

Executing above command will generate 'dive.json' in working directory which contains service details for the 'icon' and 'eth' chains.
Similarly, To start both the ICON and Hardhat chains and establish a BTP bridge between them, run the following command:

```bash filename="" copy
dive bridge btp --chainA icon --chainB hardhat
```

Executing the above command will generate a 'dive.json' file in the working directory, The file contains service details of the running nodes and deployed contract addresses. Here's what you can find in `dive.json`:


<details>
<summary>
Example of dive.json
</summary>

```filename="" copy
```json filename="" copy
{
"bridge": "false",
"chains": {
Expand Down Expand Up @@ -83,15 +89,16 @@ Example of dive.json
}
}
```

</details>

<Callout type="info" emoji="💡">
*Tip:* By default, the bridge flag is set to false. If you need an ICON bridge, add the --bridge flag to the command.
*Tip:* By default, the bridge flag is set to false. If you need an ICON bridge, add the `--bmvbridge` or `-b` flag to the command.
</Callout>

The above command automates several essential tasks to configure and initialise the local environment:
The above command automates several essential tasks to configure and initialize the local environment:

- **Spinning up ICON and Ethereum Nodes:** DIVE automatically starts and configures the required ICON and Ethereum nodes for your local environment.
- **Spinning up Nodes:** DIVE automatically starts and configures the required ICON and Ethereum nodes for your local environment.

- **Installing Required npm Dependencies:** DIVE takes care of installing all the necessary npm dependencies for seamless operation.

Expand All @@ -102,7 +109,39 @@ The above command automates several essential tasks to configure and initialise
- **Starting the Relay:** The relay image is built and launched, actively monitoring both ICON and Ethereum chains to enable smooth message transfer between them.


## Step 3: Setup is completed
Once the process completes, your local environment with the ICON and Ethereum chains connected via the BTP bridge will be ready for testing and development.
### Running BTP Bridge for Already Running Nodes

To set up the BTP Bridge between already running ICON nodes and Ethereum, use the following command:

```bash filename="" copy
dive bridge btp --chainA icon --chainB eth --chainAServiceName <service name of icon> --chainBServiceName <service name of eth>
```

To set up the BTP Bridge between already running ICON nodes and Hardhat, use the following command:

```bash filename="" copy
dive bridge btp --chainA icon --chainB hardhat --chainAServiceName <service name of icon> --chainBServiceName <service name of hardhat>
```

<Callout type="info" emoji="💡">
*Note:* When setting up a BTP relay between already running ICON nodes and Ethereum/Hardhat, you need to decentralize the ICON node first.
</Callout>


<Callout type="info" emoji="💡">
*Note:* Service names for "chainA" and "chainB" can be found in the `services.json` file.
</Callout>


## Step 3: Setup is Completed

Once the process completes, your local environment with the chains connected via the BTP bridge will be ready for testing and development.

DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease.


<Callout type="info" emoji="💡">
*Note:* Currently, DIVE supports BTP bridge connections between ICON and Ethereum/Hardhat chains.
</Callout>

DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease. Happy developing
Happy developing!
Loading