-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs/cli): add tools section and fix cli devnet commands (#985)
This PR adds a tools section to the docs. Also fixes omni CLI devnet commands. task: https://app.asana.com/0/1206208509925075/1207188240612896/f
- Loading branch information
Showing
12 changed files
with
239 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 4 | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Run the Client | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Developer Commands | ||
|
||
## Scaffolding a Templated Project | ||
|
||
The `developer new` command is used to scaffold a new project from a template. The command can be called from your new project directory with: | ||
|
||
```bash | ||
omni developer new | ||
``` | ||
|
||
This will scaffold a new Forge project with an [`XGreeter`](../../develop/xapp/example.md#xgreeter-contract) contract | ||
accompanied by simple mocked testing and a multi-chain deployment script. | ||
|
||
## Starting a Local Devnet | ||
|
||
:::info Docker Required | ||
|
||
Docker is required to run the local development network. If you don't have Docker installed, you can download it from the [official Docker website](https://docs.docker.com/get-docker/). | ||
|
||
::: | ||
|
||
The `devnet start` command is used to start a local development network. The command can be called from your project directory with: | ||
|
||
```bash | ||
omni devnet start | ||
``` | ||
|
||
This will start a local development network with a single Omni validator node and Omni EVM, two (rollup) anvil nodes and a relayer node. | ||
|
||
All EVM nodes have the same rich accounts as anvils nodes regularly do. | ||
|
||
Configuration files are created in `~/.omni/devnet`. | ||
|
||
## Get Local Devnet Information | ||
|
||
The `devnet info` command is used to obtain information about the local development network. The command can be called from your project directory with: | ||
|
||
```bash | ||
omni devnet info | ||
``` | ||
|
||
This will display information about the local development network, including the chain ID, RPC URLs, and Portal contract addresses. | ||
|
||
## Clean Up Local Devnet | ||
|
||
The `devnet clean` command is used to clean up the local development network. The command can be called from your project directory with: | ||
|
||
```bash | ||
omni devnet clean | ||
``` | ||
|
||
This will stop and remove the local development network containers and clean up the configuration files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Operator Commands | ||
|
||
## Registering as an Operator | ||
|
||
Registers EigenLayer operator to Omni using the `operator.yml` file. | ||
|
||
```bash | ||
omni operator register --config-file ~/path/to/operator.yaml | ||
``` | ||
|
||
Performs a contract call to the RPC URL found in the configuration file to register the operator (using the address variables in the file). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Updating | ||
|
||
This guide will walk you through the process of updating your Omni CLI to the latest version. | ||
|
||
## Update from Binary | ||
|
||
Similar to installation, locate the old binary in your `$PATH` and replace it with the new binary. You can download the latest release from the [GitHub releases page](https://github.com/omni-network/omni/releases/). | ||
|
||
## Update from Script | ||
|
||
You can also update the Omni CLI using the installation script, which will overwrite the binary with the latest version: | ||
|
||
```bash | ||
curl -sSfL https://raw.githubusercontent.com/omni-network/omni/main/scripts/install_omni_cli.sh | sh -s | ||
``` | ||
|
||
## Update from Source | ||
|
||
If you have the Omni monorepo, you can update it by installing it from the `main` branch: | ||
|
||
<Tabs> | ||
<TabItem value="source" label="src with make"> | ||
```bash | ||
git clone https://github.com/omni-network/omni.git | ||
cd omni | ||
make install-cli | ||
``` | ||
</TabItem> | ||
<TabItem value="go" label="src with go"> | ||
```bash | ||
git clone https://github.com/omni-network/omni.git | ||
cd omni | ||
go install ./cli/cmd/omni | ||
``` | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Contract and dApp Helpers | ||
|
||
Omni includes the following Solidity helpers to help you develop your Omni projects: | ||
|
||
- [`XApp`](../../develop/xapp/installation.md) - A base contract that provides a set of common functions and variables for your contracts. | ||
- [`XGreeter`](../../develop/xapp/example.md#xgreeter-contract) - A simple contract that demonstrates how to use the `XApp` contract. | ||
- [`XGreeter Template`](https://github.com/omni/omni-forge-template) - A template that you can use to scaffold a new project with an `XGreeter` contract. Used by the Omni CLI `developer new` command. | ||
- [`XRegistry`](https://github.com/omni-network/omni/blob/main/contracts/src/protocol/XRegistry.sol) - A contract that provides a registry for contracts to register themselves. | ||
|
||
## Awesome Omni Examples and Templates | ||
|
||
See the [Awesome Omni](https://github.com/omni-network/awesome-omni) repo for a list of Omni examples and templates that you can use to get started with your Omni projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Omni Tools | ||
|
||
Omni Tools is a collection of tools that help you manage your Omni projects. | ||
|
||
It includes the following tools: | ||
|
||
- [Omni CLI](cli/cli.md) - A command-line interface for managing your Omni projects, interacting with the network as an operator. | ||
- [Omni Contracts](contracts/contracts.md) - Smart contracts that you can use while developing your Omni projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters