Skip to main content

How-To Guides

This section provides step-by-step instructions to help users complete specific tasks associated with developing on Stellar. These tasks can include instructions for goals related to writing contracts, interacting with contracts, building applications, using Stellar operations, setting up infrastructure, and more.

Contract Conventions

Using __check_auth in interesting ways

Making cross-contract calls

Deploy a contract from installed Wasm bytecode using a deployer contract

Deploy a SAC for a Stellar asset using code

Organize contract errors with an error enum type

Extend a deployed contract’s TTL with code

Upgrading Wasm bytecode for a deployed contract

Write metadata for your contract

Dapp Development

Use Docker to build and run dapps

Comprehensive frontend guide for Stellar dapps

Initialize a dapp using scripts

Create a frontend for your dapp using React

Develop contract initialization frontend templates

Implement state archival in dapps

Work with contract specs in Java, Python, and PHP

Events

Consume previously ingested events

Ingest events published from a contract

Publish events from a Rust contract

Freighter Wallet

Connect to the Testnet

Enable Soroban tokens

Integrate Freighter with a React dapp

Prompt Freighter to sign transactions as a JS dapp developer

Send Soroban token payments

Sign authorization entries

Sign Soroban XDRs

Fees & Metering

Analyzing smart contract cost and efficiency

RPC

Generate ledger key parameters with a symbol key using the Python SDK

Retrieve a contract code ledger entry using the JavaScript SDK

Retrieve a contract code ledger entry using the Python SDK

State Archival

Create a restoration footprint manually to restore archived data using the JavaScript SDK

Restore a contract using the JavaScript SDK

Restore archived contract data using the JavaScript SDK

Test TTL extension logic in smart contracts

Stellar Basics

Create an account

Send and receive payments

Follow received payments

Automating Testnet and Futurenet reset data

Stellar CLI

Contract Lifecycle

Deploy a contract from installed Wasm bytecode

Deploy the Stellar Asset Contract for a Stellar asset

Extend a deployed contract instance's TTL

Extend a deployed contract's storage entry TTL

Extend a deployed contract's Wasm code TTL

Install and deploy a smart contract

Install Wasm bytecode

Payments and Assets

Restore an archived contract using the Stellar CLI

Restore archived contract data using the Stellar CLI

Storage

How to choose the right storage type for your use case

Use instance storage in a contract

Use persistent storage in a contract

Use temporary storage in a contract

Testing

Implement basic tests for a contract

Detecting Unexpected Changes with Test Snapshots

Test authorized contract invocations

Tokens

Deploy a Stellar Asset Contract (SAC) from within a contract

Integrate Stellar Assets Contracts

Transactions

Install and deploy a smart contract with code

Install WebAssembly (Wasm) bytecode using code

Invoke a contract function in a Stellar transaction using SDKs

simulateTransaction RPC method guide

Submit a transaction to Soroban RPC using the JavaScript SDK

Type Conversions

Convert an address to other types

Convert from bytes to other types

Convert a ScVal to other type

Convert a string to other types