Skip to content

Commit

Permalink
Merge pull request #1058 from oasisprotocol/rube/split-sapphire-guide
Browse files Browse the repository at this point in the history
docs: Revamp dapp to build
  • Loading branch information
rube-de authored Jan 17, 2025
2 parents 140c155 + 01cee79 commit e9b3346
Show file tree
Hide file tree
Showing 106 changed files with 368 additions and 333 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ link checker in `package.json`._
### Documentation structure

`docs` folder contains markdown files of the documentation. Each subfolder
represents a documentation **part** (general, node, dApp, paratime, core etc.).
represents a documentation **part** (general, node, build, paratime, core etc.).
Each markdown file inside a part corresponds to a **chapter** (subchapter for a
markdown file inside a subfolder) and each subtitle of a chapter is called a
**section** (subsection etc.).
Expand Down Expand Up @@ -191,7 +191,7 @@ the redirection.
There are three kinds of image assets used in the docs.

1. Screenshots, photos, non-technical figures go into `images/` folder
on the part-level (i.e. `docs/dapp/images`). External repositories may use
on the part-level (i.e. `docs/build/images`). External repositories may use
own images in their respective folder.
2. [Mermaid](https://mermaid-js.github.io) diagrams (preferred tool for
sequence diagrams, flowcharts and other technical material) live in
Expand Down Expand Up @@ -225,7 +225,7 @@ and their usage including the articles:
The consensus layer only supports the Ed25519 signature scheme.
- Emerald
- dApp
Emerald supports writing dApps. DApp is a modern distributed application.
Sapphire supports writing dApps. DApp is a modern distributed application.
- key manager
- key manager node
- Mainnet
Expand Down
34 changes: 13 additions & 21 deletions docs/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chains and how to use unique Oasis features.
findSidebarItem('/general/manage-tokens/cli/'),
]} />

## Create dApp
## Build on Oasis

Contains learning material for the smart contract developers. Since the Oasis
platform is best known for confidentiality, the most notable ParaTime is
Expand All @@ -26,29 +26,21 @@ encryption**. The Oasis team also prepared a set of libraries called the
[Oasis Privacy Layer] to **bridge existing dApps running on other chains** to
use the unique Sapphire's confidentiality.

The part also covers other ParaTimes such as the non-confidential
[Oasis Emerald] and Wasm-compatible, confidential [Oasis Cipher].
Our [Runtime OFfchain Logic (ROFL)][ROFL] enables you to **build secure applications running
offchain** in a trusted environment (TEE) and that seamlessly communicate with
Oasis Sapphire. This is ideal for trusted oracles, compute-expensive tasks
in AI or as a backend for interactive games.

<DocCardList items={[
findSidebarItem('/dapp/sapphire/'),
findSidebarItem('/dapp/opl/'),
findSidebarItem('/dapp/tools/other-paratimes/emerald/'),
findSidebarItem('/dapp/tools/other-paratimes/cipher/'),
findSidebarItem('/build/sapphire/'),
findSidebarItem('/build/opl/'),
findSidebarItem('/build/rofl/'),
findSidebarItem('/build/tools/'),
]} />

[Oasis Sapphire]: dapp/sapphire/README.mdx
[Oasis Privacy Layer]: dapp/opl/README.mdx
[Oasis Emerald]: dapp/tools/other-paratimes/emerald/README.mdx
[Oasis Cipher]: dapp/tools/other-paratimes/cipher/README.mdx

## Build ROFL

Runtime OFfchain Logic (ROFL) enables you to build secure applications running
offchain in a trusted environment (TEE) and that seamlessly communicate with
Oasis Sapphire. This is ideal for trusted oracles, compute-expensive tasks
in AI or as a backend for interactive games.

<DocCard item={findSidebarItem('/rofl/')} />
[Oasis Sapphire]: ./build/sapphire/README.mdx
[Oasis Privacy Layer]: ./build/opl/README.mdx
[ROFL]: ./build/rofl/README.mdx

## Get Involved

Expand Down Expand Up @@ -83,7 +75,7 @@ Apart from the Sapphire, Emerald, Cipher and the Key manager ParaTimes,
you can also write, compile, sign and deploy your own ParaTime on the Oasis
Network. This part describes the knobs you need to use to do so.

<DocCard item={findSidebarItem('/paratime/')} />
<DocCard item={findSidebarItem('/build/tools/build-paratime/')} />

## Develop Core

Expand Down
23 changes: 18 additions & 5 deletions docs/dapp/README.mdx → docs/build/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,36 @@ import DocCard from '@theme/DocCard';
import DocCardList from '@theme/DocCardList';
import {findSidebarItem} from '@site/src/sidebarUtils';

# Create dApp
# Build on Oasis

![Oasis architectural design including ParaTime and consensus layers](../general/images/architecture/technology_scalability.svg)

The [Oasis architecture] is designed to have a simple, robust consensus layer
on top which connects handful of ParaTimes executing smart contracts.

## Sapphire

[Sapphire] is the primary ParaTime. It is EVM-compatible and allows you to
write both confidential and non-confidential smart contracts.

For an overview of the other ParaTimes, refer to the [Other ParaTimes] chapter.

<DocCard item={findSidebarItem('/build/sapphire/')} />

[Oasis architecture]: ../general/oasis-network/README.mdx
[Sapphire]: https://github.com/oasisprotocol/docs/blob/main/docs/dapp/sapphire/README.mdx
[Sapphire]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/README.mdx
[Other ParaTimes]: ./tools/other-paratimes/README.mdx

## Oasis Privacy Layer
## ROFL

Runtime OFfchain Logic (ROFL) enables you to build secure applications running
offchain in a trusted environment (TEE) and that seamlessly communicate with
Oasis Sapphire. This is ideal for trusted oracles, compute-expensive tasks
in AI or as a backend for interactive games.

<DocCard item={findSidebarItem('/build/rofl/')} />

## Oasis Privacy Layer (OPL)

In addition to building fully native dApps running on one of the Oasis
ParaTimes, you can also add privacy to your existing dApps running on other,
Expand All @@ -34,7 +47,7 @@ integrating bridges and wrapping the OpenZeppelin ERC2771 contract on top of
Sapphire, demonstrates best practices for writing confidential smart contracts
and working examples for you to explore and extend.

<DocCard item={findSidebarItem('/dapp/opl/')} />
<DocCard item={findSidebarItem('/build/opl/')} />

## Consensus Layer RPC Endpoints

Expand Down Expand Up @@ -72,7 +85,7 @@ Public gRPC endpoints (in alphabetic order):

| Name (Provider) | Mainnet URL | Testnet URL |
|----------------------------------------------|---------------------------|-------------------------------|
| Oasis Scan ([Bit Cat]) | https://www.oasisscan.com | https://testnet.oasisscan.com |
| Oasis Scan ([Bit Cat]) | `https://www.oasisscan.com` | `https://testnet.oasisscan.com` |
| Oasis Explorer ([Oasis Protocol Foundation]) | *Coming soon* | *Coming soon* |

[Bit Cat]: https://www.bitcat365.com/
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
10 changes: 5 additions & 5 deletions docs/dapp/opl/README.mdx → docs/build/opl/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For more information about OPL and to catch the latest news, please visit the
[official OPL page].

[official OPL page]: https://oasisprotocol.org/opl
[Sapphire]: ../sapphire/README.mdx
[Sapphire]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/README.mdx

## How OPL Works

Expand All @@ -40,7 +40,7 @@ messages, please visit our [Gasless Transactions chapter].

:::

[Gasless Transactions chapter]: ../sapphire/gasless.md
[Gasless Transactions chapter]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/develop/gasless.md

## Message Bridges

Expand All @@ -65,9 +65,9 @@ enables seamless state transitions across multiple chains.
## Examples

<DocCardList items={[
findSidebarItem('/dapp/opl/opl-sdk/ping-example'),
findSidebarItem('/dapp/opl/celer/ping-example'),
findSidebarItem('/dapp/opl/router-protocol/pingpong-example'),
findSidebarItem('/build/opl/opl-sdk/ping-example'),
findSidebarItem('/build/opl/celer/ping-example'),
findSidebarItem('/build/opl/router-protocol/pingpong-example'),
]} />

[OPL SDK]: ./opl-sdk/README.md
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The only prerequisite is a set-up Metamask account.
If you're new to Remix, follow our basic guide for using Remix
[here][dapp-remix].

[dapp-remix]: /dapp/tools/remix.md
[dapp-remix]: ../../tools/remix.md

:::

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The only prerequisite is a set-up Metamask account.
If you're new to Remix, follow our basic guide for using Remix
[here][dapp-remix].

[dapp-remix]: /dapp/tools/remix.md
[dapp-remix]: ../../tools/remix.md

:::

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The only prerequisite is a set-up Metamask account.
If you're new to Remix, follow our basic guide for using Remix
[here][dapp-remix].

[dapp-remix]: /dapp/tools/remix.md
[dapp-remix]: ../../tools/remix.md

:::

Expand Down Expand Up @@ -281,7 +281,7 @@ For detailed instructions on fee payer approval, see our [approval guide].

[Router faucet]: https://faucet.routerprotocol.com/
[feepayer]: https://testnet.routerscan.io/feePayer
[approval guide]: /dapp/opl/router-protocol/approve
[approval guide]: ./approve.md

## Executing PingPong

Expand Down
4 changes: 2 additions & 2 deletions docs/rofl/README.mdx → docs/build/rofl/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This chapter will teach you how to build your own ROFL app with the help of the
[Oasis Runtime SDK].

<DocCardList items={[
findSidebarItem('/rofl/prerequisites'),
findSidebarItem('/rofl/app'),
findSidebarItem('/build/rofl/prerequisites'),
findSidebarItem('/build/rofl/app'),
]} />

[Oasis Runtime SDK]:
Expand Down
1 change: 1 addition & 0 deletions docs/build/rofl/app.mdx
1 change: 1 addition & 0 deletions docs/build/rofl/deployment.md
1 change: 1 addition & 0 deletions docs/build/rofl/prerequisites.md
1 change: 1 addition & 0 deletions docs/build/rofl/rofl.svg
1 change: 1 addition & 0 deletions docs/build/rofl/trust-root.md
File renamed without changes.
10 changes: 5 additions & 5 deletions docs/dapp/tools/README.mdx → docs/build/tools/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Oasis.
## See also

<DocCardList items={[
findSidebarItem('/dapp/tools/abi-playground'),
findSidebarItem('/dapp/tools/verification'),
findSidebarItem('/dapp/tools/localnet'),
findSidebarItem('/dapp/tools/band'),
findSidebarItem('/dapp/tools/remix'),
findSidebarItem('/build/tools/abi-playground'),
findSidebarItem('/build/tools/verification'),
findSidebarItem('/build/tools/localnet'),
findSidebarItem('/build/tools/band'),
findSidebarItem('/build/tools/remix'),
]} />
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Interacting with contracts
description: Interacting with contracts in the browser
---

# ABI Playground
Expand Down
6 changes: 5 additions & 1 deletion docs/dapp/tools/band.md → docs/build/tools/band.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Integrating BAND Oracle
---
description: A guide to integrate the Band Oracle
---

# Band Oracle

<p style={{width: '100%'}}>
<iframe style={{margin: 'auto', display:'block'}} width="560" height="315" src="https://www.youtube.com/embed/cwe6P5MvIfk?si=4QFRA8yJ2PCZB5fq" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ This chapter will teach you how to build your own ParaTime with [Oasis Runtime
SDK].

<DocCardList items={[
findSidebarItem('/paratime/prerequisites'),
findSidebarItem('/paratime/minimal-runtime'),
findSidebarItem('/paratime/modules'),
findSidebarItem('/paratime/reproducibility'),
findSidebarItem('/build/tools/build-paratime/prerequisites'),
findSidebarItem('/build/tools/build-paratime/minimal-runtime'),
findSidebarItem('/build/tools/build-paratime/modules'),
findSidebarItem('/build/tools/build-paratime/reproducibility'),
findSidebarItem('https://api.docs.oasis.io/rust/oasis_runtime_sdk'),
]} />

Expand Down
1 change: 1 addition & 0 deletions docs/build/tools/build-paratime/minimal-runtime.md
1 change: 1 addition & 0 deletions docs/build/tools/build-paratime/modules.md
1 change: 1 addition & 0 deletions docs/build/tools/build-paratime/prerequisites.md
1 change: 1 addition & 0 deletions docs/build/tools/build-paratime/reproducibility.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: A Docker container that simulates a local Sapphire blockchain
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Learn more by exploring the ParaTimes below!

| | EVM-compatible | Oasis Wasm |
|---------------------:|-------------------------------------------------------|-----------------------------------------------------|
| **Confidential** | <DocCard item={findSidebarItem('/dapp/sapphire/')} /> | <DocCard item={findSidebarItem('/dapp/tools/other-paratimes/cipher/')} /> |
| **Non-Confidential** | <DocCard item={findSidebarItem('/dapp/tools/other-paratimes/emerald/')} /> | |
| **Confidential** | <DocCard item={findSidebarItem('/build/sapphire/')} /> | <DocCard item={findSidebarItem('/build/tools/other-paratimes/cipher/')} /> |
| **Non-Confidential** | <DocCard item={findSidebarItem('/build/tools/other-paratimes/emerald/')} /> | |

[Sapphire]: https://github.com/oasisprotocol/docs/blob/main/docs/dapp/sapphire/README.mdx
[Sapphire]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ confidential smart contract in Rust and deploy it on Cipher, read the related
Oasis Contract SDK chapters:

<DocCard item={
findSidebarItem('/dapp/tools/other-paratimes/cipher/prerequisites')
findSidebarItem('/build/tools/other-paratimes/cipher/prerequisites')
} />

<DocCard item={
findSidebarItem('/dapp/tools/other-paratimes/cipher/hello-world')
findSidebarItem('/build/tools/other-paratimes/cipher/hello-world')
} />

<DocCard item={
findSidebarItem('/dapp/tools/other-paratimes/cipher/confidential-smart-contract')
findSidebarItem('/build/tools/other-paratimes/cipher/confidential-smart-contract')
} />

## See also
Expand All @@ -55,8 +55,8 @@ Oasis Contract SDK chapters:
findSidebarItem('/general/manage-tokens/'),
findSidebarItem('/node/run-your-node/paratime-node'),
findSidebarItem('/node/run-your-node/paratime-client-node'),
findSidebarItem('/dapp/tools/other-paratimes/emerald/'),
findSidebarItem('/dapp/sapphire/'),
findSidebarItem('/build/tools/other-paratimes/emerald/'),
findSidebarItem('/build/sapphire/'),
]} />

[Oasis Contract SDK]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ and wish to be added to these docs, open an issue at

:::

[github.com/oasisprotocol/docs]: https://github.com/oasisprotocol/docs
[github.com/oasisprotocol/docs]: https://github.com/oasisprotocol/docs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ See crucial network information [here][network].
findSidebarItem('/node/run-your-node/paratime-node'),
findSidebarItem('/node/run-your-node/paratime-client-node'),
findSidebarItem('/node/web3'),
findSidebarItem('/dapp/sapphire/'),
findSidebarItem('/dapp/tools/other-paratimes/cipher/'),
findSidebarItem('/build/sapphire/'),
findSidebarItem('/build/tools/other-paratimes/cipher/'),
]} />
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dedicated RPC endpoints, consider the following providers (in alphabetic order):

| Name/Provider | Mainnet URL | Testnet URL | EIP-3091 compatible |
|-----------------------------|-------------------------------------------|-------------------------------------------|---------------------|
| [Oasis Explorer][Oasis Protocol Foundation] | https://explorer.oasis.io/mainnet/emerald | https://explorer.oasis.io/testnet/emerald | Yes |
| [Oasis Explorer][Oasis Protocol Foundation] | `https://explorer.oasis.io/mainnet/emerald` | `https://explorer.oasis.io/testnet/emerald` | Yes |
| Oasis Scan ([Bit Cat]) | [https://www.oasisscan.com/paratimes/000…87f](https://www.oasisscan.com/paratimes/000000000000000000000000000000000000000000000000e2eaa99fc008f87f) | [https://testnet.oasisscan.com/paratimes/000…ca7](https://testnet.oasisscan.com/paratimes/00000000000000000000000000000000000000000000000072c8215e60d5bca7) | No |

[Bit Cat]: https://www.bitcat365.com/
Expand Down
6 changes: 3 additions & 3 deletions docs/dapp/tools/remix.md → docs/build/tools/remix.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Remix web IDE
description: A guide for the Remix web IDE
---

# Remix
Expand Down Expand Up @@ -87,13 +87,13 @@ Note that Remix operates without a Sapphire client, meaning transactions and
queries are unencrypted and unsigned by default. To make use of Sapphire's
confidential features, refer to our [Quickstart Tutorial].

[Quickstart Tutorial]: https://docs.oasis.io/dapp/sapphire/quickstart
[Quickstart Tutorial]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/quickstart.mdx

Should you have any questions, do not hesitate to share them with us on the
[#dev-central Discord channel][discord].

[localnet]: ./localnet.mdx
[network page]: https://docs.oasis.io/dapp/sapphire/network#rpc-endpoints
[network page]: https://github.com/oasisprotocol/docs/blob/main/docs/build/sapphire/network.mdx#rpc-endpoints
[Remix]: https://remix.ethereum.org
[Remix documentation]: https://remix-ide.readthedocs.io/en/latest/
[metamask]: ../../general/manage-tokens/README.mdx#metamask
Expand Down
File renamed without changes.
Loading

0 comments on commit e9b3346

Please sign in to comment.