Skip to content

Commit

Permalink
Add Soroban operations to Stellar docs (#222)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
briwylde08 authored Sep 20, 2023
1 parent 8105ebe commit 9cfa08f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/fundamentals-and-concepts/list-of-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
6 changes: 6 additions & 0 deletions docs/tools-and-sdks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down

0 comments on commit 9cfa08f

Please sign in to comment.