From 2c636fbca8e6e2aa73ceb5474f201532437ea502 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Wed, 28 Feb 2024 12:30:10 -0600 Subject: [PATCH 1/8] add a redirect for anything under the `/api` route --- nginx/includes/redirects.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx/includes/redirects.conf b/nginx/includes/redirects.conf index 8b474933..ef8d9d5a 100644 --- a/nginx/includes/redirects.conf +++ b/nginx/includes/redirects.conf @@ -38,7 +38,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; @@ -49,3 +50,5 @@ 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 "^/api(.*)" "https://developers.stellar.org/platforms/soroban-rpc$1" permanent; From c98708fd3f3ce6722add8e330eea79072ee41801 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Wed, 28 Feb 2024 12:32:15 -0600 Subject: [PATCH 2/8] change the API navbar item to an external link --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 407195f0..d5ca6bd8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -109,7 +109,7 @@ const config = { position: 'left' }, { - to: '/api', + href: 'https://developers.stellar.org/platforms/soroban-rpc', label: 'API', position: 'left' }, From aaf60d6437d36d9eb976aa511755fe9e879f37d5 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Wed, 28 Feb 2024 12:32:57 -0600 Subject: [PATCH 3/8] disable the `/api` plugin-content-docs --- docusaurus.config.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index d5ca6bd8..4f5512a5 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -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', { From a5477817b7368dab9a67e870ae587b1da376b92c Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Wed, 28 Feb 2024 12:43:29 -0600 Subject: [PATCH 4/8] fix some broken links --- docs/soroban-internals/state-archival.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/soroban-internals/state-archival.mdx b/docs/soroban-internals/state-archival.mdx index 1ebfb06b..d527a931 100644 --- a/docs/soroban-internals/state-archival.mdx +++ b/docs/soroban-internals/state-archival.mdx @@ -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). @@ -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: From 586027146d6dbca8375ecc2683399363fc5e4454 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Wed, 28 Feb 2024 12:46:56 -0600 Subject: [PATCH 5/8] updating a couple other misc redirects --- nginx/includes/redirects.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nginx/includes/redirects.conf b/nginx/includes/redirects.conf index ef8d9d5a..d933ab8d 100644 --- a/nginx/includes/redirects.conf +++ b/nginx/includes/redirects.conf @@ -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; @@ -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; @@ -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; @@ -51,4 +48,6 @@ rewrite "^/docs/reference/command-line$" "https://developers.stellar.org/docs/to 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/platforms/soroban-rpc/methods/getTransaction" permanent; +rewrite "^/api/incomplete-methods$" "https://developers.stellar.org/platforms/soroban-rpc/methods" permanent; rewrite "^/api(.*)" "https://developers.stellar.org/platforms/soroban-rpc$1" permanent; From 28d756a91a55fd196de2b598c080a0cd9ecda1bd Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Mon, 4 Mar 2024 12:38:49 -0600 Subject: [PATCH 6/8] add external links to RPC providers and usage instructions --- docs/reference/rpc-list.mdx | 10 ++++++++++ docs/reference/rpc.mdx | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/docs/reference/rpc-list.mdx b/docs/reference/rpc-list.mdx index c341a136..8fdc7559 100644 --- a/docs/reference/rpc-list.mdx +++ b/docs/reference/rpc-list.mdx @@ -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. diff --git a/docs/reference/rpc.mdx b/docs/reference/rpc.mdx index 2f3cabec..bef6db92 100644 --- a/docs/reference/rpc.mdx +++ b/docs/reference/rpc.mdx @@ -1,6 +1,10 @@ --- sidebar_position: 40 title: RPC Usage +sidebar_custom_props: + migration: + href: https://developers.stellar.org/network/soroban-rpc/admin-guide + label: RPC Usage --- The RPC service allows you to communicate directly with Soroban via a [JSON RPC interface](https://soroban.stellar.org/api/). From a81e10452d0b853635cadc932f64e423930de0c6 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Mon, 4 Mar 2024 12:39:17 -0600 Subject: [PATCH 7/8] add some redirects for RPC information docs --- nginx/includes/redirects.conf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nginx/includes/redirects.conf b/nginx/includes/redirects.conf index d933ab8d..bc98b3a0 100644 --- a/nginx/includes/redirects.conf +++ b/nginx/includes/redirects.conf @@ -48,6 +48,8 @@ rewrite "^/docs/reference/command-line$" "https://developers.stellar.org/docs/to 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/platforms/soroban-rpc/methods/getTransaction" permanent; -rewrite "^/api/incomplete-methods$" "https://developers.stellar.org/platforms/soroban-rpc/methods" permanent; -rewrite "^/api(.*)" "https://developers.stellar.org/platforms/soroban-rpc$1" permanent; +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; From 1faa1b79b3bf423cafb2e7a703d01631b3a7b15a Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Mon, 4 Mar 2024 12:41:17 -0600 Subject: [PATCH 8/8] add an admonition to the rpc usage page --- docs/reference/rpc.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/rpc.mdx b/docs/reference/rpc.mdx index bef6db92..192bb1b9 100644 --- a/docs/reference/rpc.mdx +++ b/docs/reference/rpc.mdx @@ -7,6 +7,12 @@ sidebar_custom_props: 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).