Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

[Stellar Merge] Redirects for Soroban RPC pages #757

Merged
merged 9 commits into from
Mar 5, 2024
10 changes: 10 additions & 0 deletions docs/reference/rpc-list.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
sidebar_position: 50
title: RPC Providers
sidebar_custom_props:
migration:
href: https://developers.stellar.org/network/soroban-rpc/rpc-providers
label: RPC Providers
---

:::danger These are not the droids you're looking for

This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/network/soroban-rpc/rpc-providers) for the most up-to-date information

:::

## Ecosystem Providers

Multiple infrastructure providers have made Soroban RPC endpoint services available, and offer plans ranging from free to high throughput endpoints. These providers can be used for development, testing, and production.
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/rpc.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
sidebar_position: 40
title: RPC Usage
sidebar_custom_props:
migration:
href: https://developers.stellar.org/network/soroban-rpc/admin-guide
label: RPC Usage
---

:::danger These are not the droids you're looking for

This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/network/soroban-rpc/admin-guide) for the most up-to-date information

:::

The RPC service allows you to communicate directly with Soroban via a [JSON RPC interface](https://soroban.stellar.org/api/).

For example, you can build an application and have it [send a transaction](https://soroban.stellar.org/api/methods/sendTransaction), [get ledger](https://soroban.stellar.org/api/methods/getLedgerEntries) and [event data](https://soroban.stellar.org/api/methods/getEvents), or [simulate transactions](https://soroban.stellar.org/api/methods/simulateTransaction).
Expand Down
4 changes: 2 additions & 2 deletions docs/soroban-internals/state-archival.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ We've done our best to build tooling around state archival in both the Soroban R

Both restoring and extending the TTL of ledger entries follows a three-step process regardless of their nature (contract data, instances, etc.):

1. **Identify the ledger entries**. This usually means acquiring them from a Soroban RPC server as part of your initial transaction simulation (see the [transaction simulation docs](contract-interactions/transaction-simulation.mdx) and the [`simulateTransaction`](/api/methods/simulateTransaction) RPC method).
1. **Identify the ledger entries**. This usually means acquiring them from a Soroban RPC server as part of your initial transaction simulation (see the [transaction simulation docs](contract-interactions/transaction-simulation.mdx) and the [`simulateTransaction`](https://developers.stellar.org/platforms/soroban-rpc/methods/simulateTransaction) RPC method).

2. **Prepare your operation**. This means describing the ledger entries within the corresponding operation (i.e. `ExtendFootprintTTLOp` or `RestoreFootprintOp`) and its ledger footprint (the `SorobanTransactionData` field), then simulating it to fill out fee and resource usage information (when restoring, you usually have simulation results already).

Expand Down Expand Up @@ -382,7 +382,7 @@ flowchart LR

We need **both** to be live for our contract calls to work.

Let's work through how these can be recovered. The recovery process is slightly different: while we don't need simulation to figure out the footprints, we do need to do an additional ledger entry fetch. We can leverage [`Contract.getFootprint()`](https://stellar.github.io/js-stellar-sdk/Contract.html#getFootprint) to get the ledger key used by a given contract instance, but that won't give us its backing WASM code. For that, we'll recreate [this example](/api/methods/getLedgerEntries#requesting-a-contracts-wasm-code) here.
Let's work through how these can be recovered. The recovery process is slightly different: while we don't need simulation to figure out the footprints, we do need to do an additional ledger entry fetch. We can leverage [`Contract.getFootprint()`](https://stellar.github.io/js-stellar-sdk/Contract.html#getFootprint) to get the ledger key used by a given contract instance, but that won't give us its backing WASM code. For that, we'll recreate [this example](https://developers.stellar.org/platforms/soroban-rpc/methods/getLedgerEntries#requesting-a-contracts-wasm-code) here.

We also need simulation to figure out the fees for our restoration. This, however, can be easily covered by the SDK's [`Server.prepareTransaction`](https://stellar.github.io/js-stellar-sdk/Server.html#prepareTransaction) helper, which will do simulation and assembly for us:

Expand Down
26 changes: 13 additions & 13 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ const config = {
},
plugins: [
"docusaurus-plugin-sass",
[
'@docusaurus/plugin-content-docs',
{
id: 'api',
path: 'api',
routeBasePath: 'api',
sidebarPath: require.resolve('./sidebarsApi.js'),
editUrl: "https://github.com/stellar/soroban-docs/tree/main/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
},
],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'api',
// path: 'api',
// routeBasePath: 'api',
// sidebarPath: require.resolve('./sidebarsApi.js'),
// editUrl: "https://github.com/stellar/soroban-docs/tree/main/",
// showLastUpdateTime: true,
// showLastUpdateAuthor: true,
// },
// ],
[
'@docusaurus/plugin-content-docs',
{
Expand Down Expand Up @@ -109,7 +109,7 @@ const config = {
position: 'left'
},
{
to: '/api',
href: 'https://developers.stellar.org/platforms/soroban-rpc',
label: 'API',
position: 'left'
},
Expand Down
12 changes: 8 additions & 4 deletions nginx/includes/redirects.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
rewrite "^/api/methods/getLedgerEntry$" "/api/methods/getLedgerEntries" permanent;
rewrite "^/docs/category/examples$" "/docs/tutorials" permanent;
rewrite "^/docs/getting-started/run-rpc$" "/docs/reference/rpc" permanent;
rewrite "^/docs/category/tutorials$" "/docs/tutorials" permanent;
Expand All @@ -12,7 +11,6 @@ rewrite "^/docs/category/fundamentals-and-concepts$" "/docs/category/soroban-int
rewrite "^/docs/built-in-contracts/token$" "/docs/tokens/stellar-asset-contract" permanent;
rewrite "^/docs/getting-started/deploy-to-a-local-network$" "/docs/getting-started/deploy-to-testnet" permanent;
rewrite "^/docs/getting-started/deploy-to-futurenet$" "/docs/getting-started/deploy-to-testnet" permanent;
rewrite "^/api/incomplete-methods$" "/api/methods" permanent;
rewrite "^/docs/tutorials/testing$" "/docs/soroban-internals/debugging" permanent;
rewrite "^/docs/category/how-to-guides$" "/docs/guides" permanent;
rewrite "^/docs/getting-started/connect-freighter-wallet$" "/docs/reference/freighter" permanent;
Expand All @@ -23,7 +21,6 @@ rewrite "^/docs/guides/cli/wrap-token$" "/docs/guides/cli/deploy-stellar-asset-c
# BEGIN re-structure redirects
rewrite "^/sorobanathon" "/" permanent;
rewrite "^/docs/reference/interfaces/token-interface" "/docs/tokens/token-interface" permanent;
rewrite "^/methods/getTransaction$" "/api/methods/getTransaction" permanent;
rewrite "^/docs/category/getting-started$" "/docs/getting-started/setup" permanent;
rewrite "^/docs/tutorials/stellar-asset-contract" "/docs/tokens/stellar-asset-contract" permanent;
rewrite "^/docs/category/migrating-from-evm$" "/docs/migrate/evm/introduction-to-solidity-and-rust" permanent;
Expand All @@ -38,7 +35,8 @@ rewrite "^/docs/fundamentals-and-concepts/interacting-with-contracts$" "/docs/so
rewrite "^/docs/(basic|advanced)-tutorials(/.*)$" "/docs/tutorials$2" permanent;
rewrite "^/docs/fundamentals-and-concepts(/.*)$" "/docs/soroban-internals$1" permanent;
rewrite "^/docs/notes" "/meetings" permanent;
# BEGIN merge redirects
##### BEGIN merge redirects
# developer tools and SDK
rewrite "^/docs/developer-tools" "https://developers.stellar.org/docs/tools/developer-tools" permanent;
rewrite "^/docs/SDKs/rust$" "https://developers.stellar.org/docs/tools/sdks/library" permanent;
rewrite "^/docs/reference/sdks/write-contracts" "https://developers.stellar.org/docs/tools/sdks" permanent;
Expand All @@ -49,3 +47,9 @@ rewrite "^/reference/soroban-cli$" "https://developers.stellar.org/docs/tools/de
rewrite "^/docs/reference/command-line$" "https://developers.stellar.org/docs/tools/developer-tools#soroban-cli" permanent;
rewrite "^/docs/reference/soroban-cli$" "https://developers.stellar.org/docs/tools/developer-tools#soroban-cli" permanent;
rewrite "^/docs/reference/data-providers" "https://developers.stellar.org/docs/tools/developer-tools#block-explorers" permanent;
# soroban rpc
rewrite "^/methods/getTransaction$" "https://developers.stellar.org/network/soroban-rpc/methods/getTransaction" permanent;
rewrite "^/api/incomplete-methods$" "https://developers.stellar.org/network/soroban-rpc/methods" permanent;
rewrite "^/api(.*)" "https://developers.stellar.org/network/soroban-rpc$1" permanent;
rewrite "^/docs/reference/rpc$" "https://developers.stellar.org/network/soroban-rpc/admin-guide" permanent;
rewrite "^/docs/reference/rpc-list$" "https://developers.stellar.org/network/soroban-rpc/rpc-providers" permanent;
Loading