From 9cfa08f6da78855776765fbb68c5877ed84253a9 Mon Sep 17 00:00:00 2001 From: Bri Wylde <92327786+briwylde08@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:08:19 -0600 Subject: [PATCH] Add Soroban operations to Stellar docs (#222) * Incorporate Soroban into the Stellar docs - Add three Soroban operations - Add Soroban to encyclopedia - Add Soroban RPC to Stellar Stack * update operations * remove Soroban enc entry Soroban has been pulled out to main nav --- .../list-of-operations.mdx | 30 +++++++++++++++++++ docs/tools-and-sdks.mdx | 6 ++++ 2 files changed, 36 insertions(+) diff --git a/docs/fundamentals-and-concepts/list-of-operations.mdx b/docs/fundamentals-and-concepts/list-of-operations.mdx index 9309a86d5..8dfe40f51 100644 --- a/docs/fundamentals-and-concepts/list-of-operations.mdx +++ b/docs/fundamentals-and-concepts/list-of-operations.mdx @@ -664,3 +664,33 @@ Learn more about liquidity pools: [Liquidity Pools Encyclopedia Entry](../encycl | LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED | -3 | Insufficient balance for the pool shares. | | LIQUIDITY_POOL_WITHDRAW_LINE_FULL | -4 | The withdrawal would exceed the trustline limit for one of the assets. | | LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM | -5 | Unable to withdraw enough to satisfy the minimum price. | + +## Invoke Host Function + +Invoke and deploy Soroban smart contracts with `InvokeHostFunctionOp`. + +The `InvokeHostFunctionOp` can be used to perform the following Soroban operations: + +- Invoke contract functions: `HOST_FUNCTION_TYPE_INVOKE_CONTRACT` +- Upload Wasm of the contracts: `HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM` +- Deploy new contracts using the uploaded Wasm or built-in implementations: `HOST_FUNCTION_TYPE_CREATE_CONTRACT` + +Note that Soroban transactions can only contain one operation per transaction. + +Learn more in the [Soroban docs](https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#invokehostfunctionop). + +## Bump Footprint Expiration + +Bump the expiration ledger of entries for Soroban smart contracts with the `BumpFootprintExpirationOp`. + +Note that Soroban transactions can only contain one operation per transaction. + +Learn more in the [Soroban docs](https://soroban.stellar.org/docs/fundamentals-and-concepts/state-expiration#bumpfootprintexpirationop). + +## Restore Footprint + +Make expired Soroban smart contract entries accessible again by restoring them with `RestoreFootprintOp`. + +Note that Soroban transactions can only contain one operation per transaction. + +Learn more in the [Soroban docs](https://soroban.stellar.org/docs/fundamentals-and-concepts/state-expiration#restorefootprintop). diff --git a/docs/tools-and-sdks.mdx b/docs/tools-and-sdks.mdx index 1bb3af2cb..c064f5ed5 100644 --- a/docs/tools-and-sdks.mdx +++ b/docs/tools-and-sdks.mdx @@ -69,6 +69,12 @@ Interact with the Stellar network using the SDK in your preferred language. The Each SDK has its own source code and documentation. Learn how to use a specific SDK by referring to the documentation- most docs offer practical examples that demonstrate how to construct and submit transactions and interact with Horizon endpoints. +:::note + +Find the Soroban smart contract platform's SDKs in the [Soroban docs](https://soroban.stellar.org/docs/category/sdks). + +::: + ### JavaScript [Source](https://github.com/stellar/js-stellar-sdk) | [Docs](https://stellar.github.io/js-stellar-sdk/)