Skip to content

Commit

Permalink
adding details to Soroban operations
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Dec 1, 2023
1 parent 2eafb8d commit 1e639f3
Showing 1 changed file with 55 additions and 3 deletions.
58 changes: 55 additions & 3 deletions docs/fundamentals-and-concepts/list-of-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,56 @@ 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
**Threshold**: Medium
**Result**: `InvokeHostFunctionResult`
**Parameters**:

| Parameters | Type | Description |
| --- | --- | --- |
| Host Function | HostFunction | The host function to invoke |
| Auth | Soroban Authorization Entry | Per-address authorizations for this host function. |

**Possible errors**:

| Error | Code | Description |
| --- | --- | --- |
| INVOKE_HOST_FUNCTION_MALFORMED | -1 | One or more of the inputs to the operation was malformed. |
| INVOKE_HOST_FUNCTION_TRAPPED | -2 | The function invocation trapped in the Soroban runtime. |
| INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED | -3 | The function invocation could not complete within the currently configured resource constraints of the network. |
| INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED | -4 | A ledger entry required for this function's footprint is in an archived state, and must be restored. |
| INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE | -5 | The refundable Soroban fee provided was not sufficient to pay for the compute resources required by this function invocation. |

## Extend Footprint TTL

:::info

Soroban is currently live on Testnet, so this operation is only usable on Testnet.

:::

Bump the expiration ledger of entries for Soroban smart contracts with the `BumpFootprintExpirationOp`.
Extend the TTL of entries for Soroban smart contracts with the `ExtendFootprintTTLOp`. This operation Extends the TTL of the entries specified in the `readOnly` footprint so they will live at least `extendTo` ledgers from last closed ledger.

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).

**Threshold**: Medium
**Result**: `ExtendFootprintTTLResult`
**Parameters**:

| Parameters | Type | Description |
| --- | --- | --- |
| Ext | ExtensionPoint | Reserved for later use. |
| Extend To | integer | The number of ledgers to ensure entries live on from the last closed ledger. |

**Possible errors**:

| Error | Code | Description |
| --- | --- | --- |
| EXTEND_FOOTPRINT_TTL_MALFORMED | -1 | One or more of the inputs to the operation was malformed. |
| EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED | -2 | The TTL extension could not be completed within the currently configured resource constraints of the network. |
| EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE | -3 | The refundable Soroban fee provided was not sufficient to pay for TTL extension of the specified ledger entries. |

## Restore Footprint

:::info
Expand All @@ -707,8 +743,24 @@ Soroban is currently live on Testnet, so this operation is only usable on Testne

:::

Make expired Soroban smart contract entries accessible again by restoring them with `RestoreFootprintOp`.
Make archived Soroban smart contract entries accessible again by restoring them with `RestoreFootprintOp`. This operation restores the archived entries specified in the `readWrite` footprint.

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).

**Threshold**: Medium
**Result**: `RestoreFootprintResult`
**Parameters**:

| Parameters | Type | Description |
| --- | --- | --- |
| Ext | ExtensionPoint | Reserved for later use. |

**Possible errors**:

| Error | Code | Description |
| --- | --- | --- |
| RESTORE_FOOTPRINT_MALFORMED | -1 | One or more of the inputs to the operation was malformed. |
| RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED | -2 | The archive restoration could not be completed within the currently configured resource constraints of the network. |
| RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE | -3 | The refundable Soroban fee provided was not sufficient to pay for archive restoration of the specified ledger entries. |

0 comments on commit 1e639f3

Please sign in to comment.