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

chore(docs): docs cleanup #1763

Merged
merged 2 commits into from
Aug 26, 2024
Merged
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
8 changes: 8 additions & 0 deletions docs/content/build-xdapp/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Build",
"position": 1,
"link": {
"type": "generated-index",
"description": "Build your first xdapp and get inspired"
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
sidebar_position: 1
slug: /
---

# 3-Minute Cross-Chain dApp
# My First XDapp

This QuickStart guide will run through how to start an Omni XApp in less than 3 minutes.
This QuickStart guide will run through how to start an Omni XDApp (cross-chain decentralized app) in 5 minutes.

In this guide you will:

Expand All @@ -23,8 +24,6 @@ First, install the Omni CLI by running the following command:
curl -sSfL https://raw.githubusercontent.com/omni-network/omni/main/scripts/install_omni_cli.sh | sh -s
```

You may otherwise install from source by following the steps shown in the [Omni CLI Tools section](../../tools/cli/cli.md).

### Step 2: Scaffold a new project

Next, create a new directory for your project and scaffold a new project using the Omni CLI:
Expand Down Expand Up @@ -110,7 +109,7 @@ mock_arb: 0x8464135c8F25Da09e49BC8782676a84730C318bC
</details>

```bash
cast send 0x8464135c8F25Da09e49BC8782676a84730C318bC 'greet(string)' 'Yay in 3 minutes!' --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d --rpc-url http://localhost:8001 --value 1ether
cast send 0x8464135c8F25Da09e49BC8782676a84730C318bC 'greet(string)' 'Yay in 5 minutes!' --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d --rpc-url http://localhost:8001 --value 1ether
```

### Step 6: Check the Greet
Expand All @@ -123,7 +122,7 @@ cast call 0x8464135c8F25Da09e49BC8782676a84730C318bC "lastGreet():(address,strin

### 🎉 Done 🎉

You have successfully deployed and interacted with an Omni XApp in less than three minutes!
You have successfully deployed and interacted with an Omni XApp in less than five minutes!

<figure align="center">
<img src="/img/cat.png" alt="gg wp" width="350" height="350" />
Expand Down
92 changes: 92 additions & 0 deletions docs/content/build-xdapp/showcase-dapps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
sidebar_position: 3
---

import GitHubCodeBlock from '@site/src/components/GitHubCodeBlock/GitHubCodeBlock';

# Showcase



## Cross-stake

An example xchain staking app that allows ERC20 deposits on multiple chains.
https://github.com/kevinhalliday/xstake

<GitHubCodeBlock url="https://github.com/kevinhalliday/xstake/blob/main/src/XStaker.sol"/>


## Ethereum to Omni bridge

OMNI is an ERC-20 token on Layer 1, and we understand that developers and users need a seamless way to transfer it to the Omni EVM for gas payments. To address this, we've developed a bridge that utilizes the Omni protocol, ensuring smooth and secure token transfers.


### Omni to Ethereum
<GitHubCodeBlock url="https://github.com/omni-network/omni/blob/main/contracts/core/src/token/OmniBridgeL1.sol"/>

### Ethereum to Omni
<GitHubCodeBlock url="https://github.com/omni-network/omni/blob/main/contracts/core/src/token/OmniBridgeNative.sol" />


## What else?

:::tip
Get inspired by the following ideas. Looking forward to seeing your PRs on https://github.com/omni-network/awesome-omni
:::

<div class="grid-wrapper">
<div class="grid-rfp">
<div class="rfp-grid-cell">
### NFT Community Backed Stablecoin
Take a heavily community / social-backed asset and use it as a stablecoin. $CULT (Remelia NFT family) or other strong NFT community-backed token could be used as initial collateral source.
</div>
<div class="rfp-grid-cell">
### Real Estate Index Synthetics / Perps
GMX-style perps that track commercial and residential real estate indices from major global cities. Pooled collateral model.
</div>
<div class="rfp-grid-cell">
### TikTok Perps
GMX-style perps that track hashtags, sounds, follower counts on TikTok clone (or pulled from actual TikTok API) application.
</div>
<div class="rfp-grid-cell">
### Twitch Livestream Spot / Perps Betting
Betting markets for Twitch livestreams – i.e., Fortnite already allows players to bet on their own number of kills in a match. Could create live lines / markets, revenue share / portion of total pool goes back to streamer.
</div>
<div class="rfp-grid-cell">
### Weather Betting
Spot / leverage / perps trading on weather – i.e., will it rain in X city on Y day (futures), will it rain in X and Y cities on the same day (parlay), over/under on temperatures, will temperature be above/below X on Y day of the week.
</div>
<div class="rfp-grid-cell">
### Rocket Game
Game which displays an ascending rocket that explodes at a “random” point in time with an increasing multiplier / reward until explosion. Allow for social live betting on the side for greater social coordination.
</div>
<div class="rfp-grid-cell">
### Synthetic Asset Management
GMX-style spot / perps on commonly traded ETFs and mutual funds or foreign stocks / commodities.
</div>
<div class="rfp-grid-cell">
### Google Search Predictions
Trending search markets on Google, binary predictions on if X or Y word/phrase will have more searches on Z day, week, month.
</div>
<div class="rfp-grid-cell">
### VC / Angel Perps
Perps / synthetics that bucket VC-portfolio tokens or angel allocations – i.e., Paradigm = $UNI, $DYDX, Panterra = $INJ, $OMNI, Multicoin = $SOL, $SEI.
</div>
<div class="rfp-grid-cell">
### Frictionless NFTs
Launchpad for [xERC-721s](https://www.openliquidity.org/research-eips/eip-7611) as mechanism to most easily create chain-agnostic NFTs / POAPs, SBTs, in-game assets.
</div>
<div class="rfp-grid-cell">
### Universal Launchpad
Chain-agnostic crowdfunding launchpad platform that pulls deposits from any L2 and creates tokens that can be traded across all L2s.
</div>
<div class="rfp-grid-cell">
### Chain-Agnostic Casino
Chain-agnostic casino games that allow users to deposit collateral and participate in on-chain games from any Ethereum L2 without the need to bridge, manage multiple assets, wallets, etc.
</div>
<div class="rfp-grid-cell">
### Ultra Simple Binary Markets
Single-market app that pulls deposits from every chain – best suited for one massive event (i.e., presidential election). Painfully simple frontend with deposit contracts.
</div>
</div>
</div>
44 changes: 44 additions & 0 deletions docs/content/build-xdapp/testnet-omega.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 4
---

# Omni Omega Testnet

### Have Questions?

Join our developer Telegram channel [here](https://t.me/+zDWsRVjLXzZkOTIx)!

### Overview

This document lays out relevant developer resources for the Omni Omega testnet. Please read below for necessary RPC URLs, Explorers, Tools, Libraries and Documentation.


### General Information

Contracts can be deployed to the Omni EVM RPC listed below. This will require having some testnet **$OMNI**. To obtain some either join the Telegram group or reach out to the team.

### RPC URLs

| **Chain Name** | **Chain ID** | RPC URL |
| --- | --- | --- |
| Omni Omega | 164 | [See on ChainList](https://chainlist.org/chain/164) |
| Ethereum Holesky | 17000 | [See on ChainList](https://chainlist.org/chain/17000) |
| Arbitrum Sepolia | 421614 | [See on ChainList](https://chainlist.org/chain/421614) |
| Optimism Sepolia | 11155420 | [See on ChainList](https://chainlist.org/chain/11155420) |
| Base Sepolia | 84532 | [See on ChainList](https://chainlist.org/chain/84532) |

### Resources

| **Resource** | **Address** |
| --- | --- |
| Archive Node(s) RPC | Available upon request |
| Omni EVM Explorer | [https://omega.omniscan.network](https://omega.omniscan.network/) |
| Omni EVM Faucet | [https://faucet.omni.network](https://faucet.omni.network/) |
| Omni status page | [https://status.omni.network](https://status.omni.network/) |


### Contract addresses

| Contract | Address | Note |
| --- | --- | --- |
| Portal | `0xcB60A0451831E4865bC49f41F9C67665Fc9b75C3` | Our Portal contracts have a single, unified contract address across the Omni EVM and all supported rollups. |
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
sidebar_position: 3
sidebar_label: Example
sidebar_position: 2
---

import GitHubCodeBlock from '@site/src/components/GitHubCodeBlock/GitHubCodeBlock';

# Hello World Contracts
# XDapp walkthrough

Here's an example of a simple cross-chain contract set for setting and getting a string. This contract lets you send greetings from a rollup chain to a global storage contract deployed on Omni. Two main contracts are used in this example:
Let's see what's happening under the hood. This contract lets you send greetings from a rollup chain to a global storage contract deployed on Omni. Two main contracts are used in this example:

1. `Greeter` - A contract deployed on a rollup that sends greetings to the Omni EVM.
2. `GreetingBook` - A contract deployed on the Omni EVM that stores greetings from all supported chains.
Expand All @@ -16,8 +15,6 @@ Here's an example of a simple cross-chain contract set for setting and getting a

<GitHubCodeBlock url="https://github.com/omni-network/hello-world-template/blob/48ff2f5277b4c144802c1ffa894a03ac071f02fc/src/Greeter.sol" />

### Walkthrough

Let's walk through this step by step.

First, inherit from `XApp`.
Expand Down Expand Up @@ -54,8 +51,6 @@ function greet(string calldata greeting) external payable {

<GitHubCodeBlock url="https://github.com/omni-network/hello-world-template/blob/eb02c55bc8ef92c09e7cb6e40420353e41e2841c/src/GreetingBook.sol" />

### Walkthrough

Similar to `Greeter`, we inherit from `XApp`.

```solidity
Expand Down
44 changes: 0 additions & 44 deletions docs/content/develop/contracts.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/content/develop/introduction.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/content/develop/omni-evm.md

This file was deleted.

29 changes: 0 additions & 29 deletions docs/content/develop/state.md

This file was deleted.

Loading
Loading