Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Soroban operations to Stellar docs #222

Merged
merged 3 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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