### SDP Setup Wizard Prompts Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/stellar-disbursement-platform/admin-guide/getting-started.mdx Example interactive prompts for configuring the SDP setup wizard, including network, tenant mode, and account generation. ```bash ? Select an existing run configuration or create new: ▸ Create new configuration ✔ Setup name (optional): ? Select network: ▸ testnet ? Select tenant mode: ▸ single-tenant ? Account setup: ▸ Generate new accounts ? Launch local environment now (project=sdp-sdp-test, setup=)? [Y/n] Y ? Initialize tenants and users? [y/N] Y ``` -------------------------------- ### Start Quickstart for Testnet Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/lab/quickstart-with-lab.mdx Use the Stellar CLI to start a local Quickstart environment for the testnet. This command initiates the necessary Docker containers for Stellar Core, Horizon, RPC, and databases. ```bash stellar network container start testnet ``` -------------------------------- ### Start Stellar Quickstart Locally Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/getting-started/README.mdx Run this command to download the Docker image and apply the standard configuration for Quickstart on your local system. It uses the 'local' network mode. ```sh stellar container start local ``` -------------------------------- ### Full Account Creation Example (Python) Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/guides/transactions/create-account.mdx Combines keypair generation, friendbot funding, account creation via `CreateAccount` operation, and balance fetching for both native and trustline assets. Ensure you have followed the SDK installation and setup instructions. ```python import requests from stellar_sdk import * from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus from stellar_sdk.xdr import * RPC_URL = "https://soroban-testnet.stellar.org" TESTNET_USDC_ISSUER = "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" SERVER = SorobanServer(RPC_URL) def main(): # # Keypair generation # parent = Keypair.random() print(f"Secret: {parent.secret}") print(f"Public: {parent.public_key}") # # Account creation via friendbot # friendbot_url = get_friendbot_url() print(f"Using {friendbot_url} for friendbot funding") body = request_funds(friendbot_url, parent.public_key) print(f"SUCCESS! You have a new account:\n{body}") # # Account creation via CreateAccount operation # child = Keypair.random() parent_account = SERVER.load_account(parent.public_key) usdc_asset = Asset("USDC", TESTNET_USDC_ISSUER) tx = ( TransactionBuilder( source_account=parent_account, network_passphrase=Network.TESTNET_NETWORK_PASSPHRASE, base_fee=TransactionBuilder.BASE_FEE, ) .add_time_bounds(0, 0) .append_operation( CreateAccount(destination=child.public_key, starting_balance="5") ) .build() ) tx.sign(parent) ledger_seq = submit_and_confirm(tx) print(f"Transaction confirmed in ledger {ledger_seq}") print(f"Created the new account {child.public_key}") # # Fetching native and USDC balances # native_balance = load_native_balance(parent.public_key) print(f"Balance for account {parent.public_key}") print(f"XLM: {native_balance}") trustline_balance = get_trustline(parent.public_key, usdc_asset) print(f"USDC trustline balance (raw): {trustline_balance}") def request_funds(friendbot_url: str, account_id: str) -> str: request_url = f"{friendbot_url}?addr={account_id}" resp = requests.get(request_url, timeout=30) check(resp.ok, f"friendbot returned {resp.status_code}: {resp.text}") ``` -------------------------------- ### Example Initializer Script Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/guides/dapps/initialization.mdx An example bash script to automate Dapp initialization tasks, including network setup, identity generation, funding, contract building, and deployment. ```bash #!/bin/bash set -e NETWORK="$1" # If stellar-cli is called inside the soroban-preview docker container, ``` -------------------------------- ### Clone and Start Development Server Source: https://github.com/stellar/stellar-docs/blob/main/README.md Clone the repository, install dependencies, and start the local development server. The server auto-reloads on changes. ```bash git clone https://github.com/stellar/stellar-docs cd stellar-docs yarn install yarn start ``` -------------------------------- ### Run Quickstart in Local Mode (macOS/Linux) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts an ephemeral, local-only development and testing network. Use this for quick local testing without external network dependencies. ```sh docker run -d \ -p "8000:8000" \ --name stellar \ stellar/quickstart \ --local ``` -------------------------------- ### Run Quickstart with Persistent Storage (macOS/Linux) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts a new persistent node using a host directory for storage. This ensures that data is not lost when the container is stopped or removed. ```sh docker run -it --rm \ -p "8000:8000" \ -v "/str:/opt/stellar" \ --name stellar \ stellar/quickstart \ --testnet ``` -------------------------------- ### Full Account Creation Example (JavaScript) Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/guides/transactions/create-account.mdx Combines keypair generation, friendbot funding, account creation via `CreateAccount` operation, and balance fetching for both native and trustline assets. Ensure you have followed the SDK installation and setup instructions. ```javascript import { Keypair, BASE_FEE, Networks, Operation, Asset, humanizeEvents, TransactionBuilder, } from "@stellar/stellar-sdk"; import { Server } from "@stellar/stellar-sdk/rpc"; // See https://developers.stellar.org/docs/data/apis/rpc/providers const server = new Server("https://soroban-testnet.stellar.org"); const testnetUsdc = new Asset( "USDC", "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5", ); async function main() { // // Generating keypairs // const parent = Keypair.random(); console.log("Secret:", parent.secret()); console.log("Public:", parent.publicKey()); // // Account creation via friendbot (does not work on mainnet) // const friendbotResponse = await server.requestAirdrop(parent.publicKey()); console.log("SUCCESS! You have a new account:\n", friendbotResponse); const parentAccount = await server.getAccount(parent.publicKey()); const childAccount = Keypair.random(); // // Account creation via the CreateAccount operation // const createAccountTx = new TransactionBuilder(parentAccount, { fee: BASE_FEE, networkPassphrase: Networks.TESTNET, }) .addOperation( Operation.createAccount({ destination: childAccount.publicKey(), startingBalance: "5", }), ) .addOperation(Operation.changeTrust({ asset: testnetUsdc })) .setTimeout(180) .build(); createAccountTx.sign(parent); const sendTxResponse = await server.sendTransaction(createAccountTx); if (sendTxResponse.status !== "PENDING") { console.log(`There was an error: ${JSON.stringify(sendTxResponse)}`); throw sendTxResponse; } const txResponse = await server.pollTransaction(sendTxResponse.hash); if (txResponse.status !== "SUCCESS") { console.log( `Transaction status: ${txResponse.status}, events: ${humanizeEvents( txResponse.diagnosticEvents, )}`, ); } console.log("Created the new account", childAccount.publicKey()); // // Fetching native and USDC balances // const accountEntry = await server.getAccountEntry(parent.publicKey()); console.log("Balance for account: " + parent.publicKey()); console.log("XLM:", accountEntry.balance().toString()); const trustlineEntry = await server.getTrustline( parent.publicKey(), testnetUsdc, ); console.log("USDC:", trustlineEntry.balance().toString()); } main().catch((err) => console.error(err)); ``` -------------------------------- ### Minimal stellar.toml Example Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/anchor-platform/sep-guide/sep1/README.mdx A basic stellar.toml file to get started. Includes essential fields like accounts, signing key, network passphrase, and organization details. ```toml # dev.stellar.toml ACCOUNTS = ["GD...G"] # Your distribution account public keys SIGNING_KEY = "GD...G" # Your signing key (public key) for SEP-10 authentication NETWORK_PASSPHRASE = "Test SDF Network ; September 2015" # Use "Public Global Stellar Network ; September 2015" for mainnet [DOCUMENTATION] ORG_NAME = "Your organization" ORG_URL = "https://your-website.com" ORG_DESCRIPTION = "A description of your organization" ``` -------------------------------- ### Run Quickstart in Local Mode (Windows PowerShell) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts an ephemeral, local-only development and testing network on Windows. Use this for quick local testing without external network dependencies. ```powershell docker run -d ` -p "8000:8000" ` --name stellar ` stellar/quickstart ` --local ``` -------------------------------- ### Setup Accounts and Distribute Assets (Python) Source: https://github.com/stellar/stellar-docs/blob/main/docs/learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx Initializes accounts and distributes assets for use in liquidity pool examples. Requires the stellar-sdk library. ```python from decimal import Decimal from typing import List, Any, Dict from stellar_sdk import * server = Server("https://horizon-testnet.stellar.org") # Preamble def new_tx_builder(source: str) -> TransactionBuilder: network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE base_fee = 100 source_account = server.load_account(source) builder = TransactionBuilder( source_account=source_account, network_passphrase=network_passphrase, base_fee=base_fee ).set_timeout(30) return builder # Returns the given asset pair in "protocol order." def order_asset(a: Asset, b: Asset) -> List[Asset]: return [a, b] if LiquidityPoolAsset.is_valid_lexicographic_order(a, b) else [b, a] secrets = [ "SBGCD73TK2PTW2DQNWUYZSTCTHHVJPL4GZF3GVZMCDL6GYETYNAYOADN", "SAAQFHI2FMSIC6OFPWZ3PDIIX3OF64RS3EB52VLYYZBX6GYB54TW3Q4U", "SCJWYFTBDMDPAABHVJZE3DRMBRTEH4AIC5YUM54QGW57NUBM2XX6433P", ] kps = [Keypair.from_secret(secret=secret) for secret in secrets] ``` -------------------------------- ### Install Node Dependencies and Set Up Environment Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/getting-started/hello-world-frontend.mdx Installs frontend dependencies for a Scaffold Stellar project and copies the example environment variable file to a local copy. Ensure Node.js is installed. ```sh cd # make sure you're in your new project's directory npm install # install frontend dependencies cp .env.example .env # copies the example frontend environment variable file to your own copy ``` -------------------------------- ### Run Quickstart with Persistent Storage (Windows PowerShell) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts a new persistent node using a host directory for storage on Windows. This ensures that data is not lost when the container is stopped or removed. ```powershell docker run -it --rm ` -p "8000:8000" ` -v "/str:/opt/stellar" ` --name stellar ` stellar/quickstart ` --testnet ``` -------------------------------- ### Run Quickstart in Testnet Mode (Foreground, macOS/Linux) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts an ephemeral testnet node that runs in the foreground. This is useful for debugging and observing the node's output directly. ```sh docker run --rm -it \ -p "8000:8000" \ --name stellar \ stellar/quickstart \ --testnet ``` -------------------------------- ### Run Quickstart in Testnet Mode (Foreground, Windows PowerShell) Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/advanced-usage/run-command-examples.mdx Starts an ephemeral testnet node in the foreground on Windows. This is useful for debugging and observing the node's output directly. ```powershell docker run --rm -it ` -p "8000:8000" ` --name stellar ` stellar/quickstart ` --testnet ``` -------------------------------- ### Setup Accounts and Distribute Assets (JavaScript) Source: https://github.com/stellar/stellar-docs/blob/main/docs/learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx Initializes accounts and distributes assets for use in liquidity pool examples. Requires the stellar-sdk and bignumber.js libraries. ```javascript const sdk = require("stellar-sdk"); const BigNumber = require("bignumber.js"); let server = new sdk.Server("https://horizon-testnet.stellar.org"); /// Helps simplify creating & signing a transaction. function buildTx(source, signer, ...ops) { let tx = new sdk.TransactionBuilder(source, { fee: sdk.BASE_FEE, networkPassphrase: sdk.Networks.TESTNET, }); ops.forEach((op) => tx.addOperation(op)); tx = tx.setTimeout(30).build(); tx.sign(signer); return tx; } /// Returns the given asset pair in "protocol order." function orderAssets(A, B) { return sdk.Asset.compare(A, B) <= 0 ? [A, B] : [B, A]; } /// Returns all of the accounts we'll be using. function getAccounts() { return Promise.all(kps.map((kp) => server.loadAccount(kp.publicKey()))); } const kps = [ "SBGCD73TK2PTW2DQNWUYZSTCTHHVJPL4GZF3GVZMCDL6GYETYNAYOADN", "SAAQFHI2FMSIC6OFPWZ3PDIIX3OF64RS3EB52VLYYZBX6GYB54TW3Q4U", "SCJWYFTBDMDPAABHVJZE3DRMBRTEH4AIC5YUM54QGW57NUBM2XX6433P", ].map((s) => sdk.Keypair.fromSecret(s)); // kp0 issues the assets const kp0 = kps[0]; const [A, B] = orderAssets( ...[new sdk.Asset("A", kp0.publicKey()), new sdk.Asset("B", kp0.publicKey())], ); /// Establishes trustlines and funds `recipientKps` for all `assets`. function distributeAssets(issuerKp, recipientKps, ...assets) { return server.loadAccount(issuerKp.publicKey()).then((issuer) => { const ops = recipientKps .map((recipientKp) => assets.map((asset) => [ sdk.Operation.changeTrust({ source: recipientKp.publicKey(), limit: "100000", asset: asset, }), sdk.Operation.payment({ source: issuerKp.publicKey(), destination: recipientKp.publicKey(), amount: "100000", asset: asset, }), ]), ) .flat(2); let tx = buildTx(issuer, issuerKp, ...ops); tx.sign(...recipientKps); return server.submitTransaction(tx); }); } function preamble() { return distributeAssets(kp0, [kps[1], kps[2]], A, B); } ``` -------------------------------- ### Example Fuzzing Output Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/fuzzing.mdx Observe the initial output from a cargo fuzz run, which indicates the setup, compilation, and the start of the fuzzing process. This output provides insights into the execution speed, memory usage, and corpus statistics. ```sh $ cargo +nightly fuzz run fuzz_target_1 Compiling soroban-fuzzing-contract v0.0.0 (/home/azureuser/data/stellar/soroban-examples/fuzzing) Compiling soroban-fuzzing-contract-fuzzer v0.0.0 (/home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz) Finished release [optimized + debuginfo] target(s) in 23.74s Finished release [optimized + debuginfo] target(s) in 0.07s Running `fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1 ...` INFO: Running with entropic power schedule (0xFF, 100). INFO: Seed: 886588732 INFO: Loaded 1 modules (1093478 inline 8-bit counters): 1093478 [0x55eb8e2c7620, 0x55eb8e3d2586), INFO: Loaded 1 PC tables (1093478 PCs): 1093478 [0x55eb8e3d2588,0x55eb8f481be8), INFO: 105 files found in /home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/corpus/fuzz_target_1 INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes INFO: seed corpus: files: 105 min: 32b max: 61b total: 3558b rss: 86Mb #2 pulse ft: 8355 exec/s: 1 rss: 307Mb #4 pulse cov: 8354 ft: 11014 corp: 1/32b exec/s: 2 rss: 313Mb #8 pulse cov: 8495 ft: 12420 corp: 4/128b exec/s: 4 rss: 315Mb ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/non-fungible-token.mdx Change your current directory to the 'nft-sequential-minting' example directory within the examples folder. ```sh cd examples/nft-sequential-minting ``` -------------------------------- ### Initialize Go Module Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/indexers/build-your-own/processors/token-transfer-processor/examples/README.mdx Sets up a new Go module for the example. This is a prerequisite for the following steps. ```bash go mod init example/ttp_processor ``` -------------------------------- ### Run Payment Submission Script (JavaScript, Java, Go) Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/guides/transactions/send-and-receive-payments.mdx Submit payments using Node.js, Java, or Go. Ensure Java 17+ is installed and the Stellar Java SDK is downloaded for the Java example. For Go, initialize a module and get the necessary SDKs. ```bash # js node send_payment.js ``` ```bash # java # JRE 17 or higher should be installed - https://adoptium.net/temurin/releases/?version=17&package=jdk # download Stellar Java SDK jar, latest release on maven central JAR_REPO='https://repo1.maven.org/maven2/network/lightsail/stellar-sdk' JAR_VERSION="2.0.0" # replace with latest version if needed JAR_FILE="stellar-sdk-$JAR_VERSION-uber.jar" curl -fsSL -o "$JAR_FILE" "$JAR_REPO/$JAR_VERSION/$JAR_FILE" javac -cp "$JAR_FILE" SendPaymentExample.java java -cp ".:$JAR_FILE" SendPaymentExample ``` ```bash # go mkdir -p payments_example/sender cd payments_example go mod init payments_example go get github.com/stellar/go-stellar-sdk@latest go get github.com/stellar/stellar-rpc@latest # save sender.go code to sender/sender.go file go build -o sender sender/sender.go ./sender ``` -------------------------------- ### Create Example Directory Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/apps/ingest-sdk/ingestion-pipeline-code.mdx Creates a new directory for the pipeline example and navigates into it. ```bash mkdir pipeline-example; cd pipeline-example ``` -------------------------------- ### Start Stellar Core Service Source: https://github.com/stellar/stellar-docs/blob/main/docs/validators/admin-guide/running-node.mdx Use this command to start the Stellar Core system service after installation and configuration. ```bash sudo systemctl start stellar-core ``` -------------------------------- ### Get Transaction SDK Examples Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/apis/rpc/api-reference/methods/getTransaction.mdx Examples of how to fetch transaction details using the Stellar SDK in Python, JavaScript, and Java. ```python # pip install --upgrade stellar-sdk from stellar_sdk import SorobanServer, soroban_rpc def get_transaction(hash: str) -> soroban_rpc.GetTransactionResponse: server = SorobanServer(server_url='https://soroban-testnet.stellar.org', client=None) tx = server.get_transaction(hash) return tx tx = get_transaction("6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da") print("result", tx.status) ``` ```javascript // yarn add @stellar/stellar-sdk import { Server } from "@stellar/stellar-sdk/rpc"; const server = new Server("https://soroban-testnet.stellar.org"); // Fetch transaction details async function getTransactionDetails(hash) { try { server.getTransaction(hash).then((tx) => { console.log({ result: tx }); }); } catch (error) { console.error("Error fetching transaction:", error); } } getTransactionDetails( "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da", ); ``` ```java // implementation 'network.lightsail:stellar-sdk:0.44.0' import org.stellar.sdk.SorobanServer; import org.stellar.sdk.responses.sorobanrpc.GetTransactionResponse; public class GetTransactionExample { public static void main(String[] args) { SorobanServer server = new SorobanServer("https://soroban-testnet.stellar.org"); try { GetTransactionResponse tx = server.getTransaction("6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da"); System.out.println("result: " + tx); } catch (Exception e) { System.err.println("An error has occurred:"); e.printStackTrace(); } } } ``` -------------------------------- ### Start the Scaffold Stellar Application Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/scaffold-stellar.mdx Starts the frontend development server for a Scaffold Stellar project. Assumes project dependencies are installed via npm. ```bash npm start ``` -------------------------------- ### Navigate and Test Allocator Example Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/alloc.mdx Change directory to the 'alloc' folder and run the tests for the allocator example. ```bash cd alloc cargo test ``` -------------------------------- ### Rust: Install Rustfmt Formatter Source: https://github.com/stellar/stellar-docs/blob/main/docs/learn/migrate/evm/solidity-and-rust-advanced-concepts.mdx Install the `rustfmt` tool to automatically format Rust code according to the official style guide. Use this command in your terminal. ```bash cargo install rustfmt ``` -------------------------------- ### Create and set up a Node.js project Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/guides/transactions/install-deploy-contract-with-code.mdx Creates a new directory for your Node.js project, initializes a new Node.js project, and installs the necessary Stellar SDK and file system modules. ```bash mkdir deploy-contract cd deploy-contract npm init -y npm install @stellar/stellar-sdk fs ``` -------------------------------- ### Get Customer by Customer ID Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/anchor-platform/sep-guide/sep31/integration.mdx Example GET /customer request using a previously generated customer ID to retrieve customer information. This is an alternative to using account and memo. ```http /customer?id=fb5ddc93-1d5d-490d-ba5f-2c361cea41f7&type=sep31-sender ``` -------------------------------- ### Run SDP Setup Wizard Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/stellar-disbursement-platform/admin-guide/getting-started.mdx Executes the setup wizard to configure and initialize the Stellar Disbursement Platform environment. ```bash make setup ``` -------------------------------- ### Get Customer by Account and Memo Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/anchor-platform/sep-guide/sep31/integration.mdx Example GET /customer request using the sending organization's Stellar account and the customer's memo to retrieve customer information. ```http /customer?account=GDJUOFZGW5WYBK4GIETCSSM6MTTIJ4SUMCQITPTLUWMQ6B4UIX2IEX47&memo=780284017&type=sep31-sender ``` -------------------------------- ### Initialize SolidJS Project Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/apps/dapp-frontend.mdx Use this command to set up a new SolidJS project with a bare template. Navigate into the project directory and install dependencies. ```bash npx degit solidjs/templates/vanilla/bare soroban-template-solid cd soroban-template-solid npm install npm run dev ``` -------------------------------- ### Help Flag Example Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/stellar-disbursement-platform/admin-guide/cli-manual.mdx Use the `--help` flag with any command to get detailed information about its options and usage. ```bash stellar-disbursement-platform serve --help ``` -------------------------------- ### Get Transaction Details in Python Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/apis/rpc/api-reference/methods/getTransaction.mdx Use the Stellar SDK for Python to fetch transaction details by its hash. Ensure the stellar-sdk is installed. ```python # pip install --upgrade stellar-sdk from stellar_sdk import SorobanServer, soroban_rpc def get_transaction(hash: str) -> soroban_rpc.GetTransactionResponse: server = SorobanServer(server_url='https://soroban-testnet.stellar.org', client=None) tx = server.get_transaction(hash) return tx tx = get_transaction("6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da") print("result", tx.status) ``` -------------------------------- ### Quickstart Docker Image Source: https://github.com/stellar/stellar-docs/blob/main/docs/tools/quickstart/cloud/README.mdx The Docker image for Quickstart that can be deployed to any platform supporting a container runtime. ```bash docker.io/stellar/quickstart:latest ``` -------------------------------- ### Run Local Stellar Standalone Network Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/apis/rpc/admin-guide/development.mdx Starts a local Stellar network using the Docker Quickstart image. Ensure the RPC is enabled for interaction. ```bash docker run --rm -it \ -p 8000:8000 \ --name stellar \ stellar/quickstart:testing \ --local \ --enable-stellar-rpc ``` -------------------------------- ### Display SDP Serve Help Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/stellar-disbursement-platform/admin-guide/configuring-sdp.mdx Run this command to view all available serve flags and their descriptions. This is useful for understanding the full range of configuration options. ```bash ./stellar-disbursement-platform serve --help ``` -------------------------------- ### Example Datastore Configuration Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/indexers/build-your-own/ingest-sdk/developer_guide/ledgerbackends/bufferedstoragebackend.mdx An example of how to configure a datastore, specifying GCS as the backend with a particular bucket path and schema. ```go datastoreConfig := datastore.DataStoreConfig{ Type: "GCS", Params: map[string]string{ "destination_bucket_path": "your-gcs-bucket/data", }, Schema: datastore.DataStoreSchema{ LedgersPerFile: 1, FilesPerPartition: 64000, }, } ``` -------------------------------- ### Fuzzer Output Without Demangled Stack Trace Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/fuzzing.mdx Example of `libfuzzer` output without `llvm-dev` installed, showing raw memory addresses in the stack trace. ```text ==6102== ERROR: libFuzzer: deadly signal #0 0x561f6ae3a431 (/home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1+0x1c80431) (BuildId: 6a95a932984a405ebab8171dddc9f812fdf16846) ... #28 0x561f6ad98346 (/home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1+0x1bde346) (BuildId: 6a95a932984a405ebab8171dddc9f812fdf16846) #29 0x7fce05f3f082 (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee) #30 0x561f6ad9837d (/home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1+0x1bde37d) (BuildId: 6a95a932984a405ebab8171dddc9f812fdf16846) ``` -------------------------------- ### Navigate to Example Directory and Run Tests Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/TEMPLATE.mdx Change directory into the specific example folder and execute the tests using cargo. ```sh cd hello_world cargo test ``` -------------------------------- ### Fuzzer Output with Demangled Stack Trace Source: https://github.com/stellar/stellar-docs/blob/main/docs/build/smart-contracts/example-contracts/fuzzing.mdx Example of `libfuzzer` output after installing `llvm-dev`, showing demangled function names in the stack trace for easier debugging. ```text ==6323== ERROR: libFuzzer: deadly signal #0 0x557c9da6a431 in __sanitizer_print_stack_trace /rustc/llvm/src/llvm-project/compiler-rt/lib/asan/asan_stack.cpp:87:3 #1 0x557ca0fb55b0 in fuzzer::PrintStackTrace() /home/azureuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libfuzzer-sys-0.4.5/libfuzzer/FuzzerUtil.cpp:210:38 #2 0x557ca0f8c08a in fuzzer::Fuzzer::CrashCallback() /home/azureuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libfuzzer-sys-0.4.5/libfuzzer/FuzzerLoop.cpp:233:18 #3 0x557ca0f8c08a in fuzzer::Fuzzer::CrashCallback() /home/azureuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libfuzzer-sys-0.4.5/libfuzzer/FuzzerLoop.cpp:228:6 #4 0x7ff19e84d08f (/lib/x86_64-linux-gnu/libc.so.6+0x4308f) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee) #5 0x7ff19e84d00a in __libc_signal_restore_set /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/internal-signals.h:86:3 #6 0x7ff19e84d00a in raise /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:48:3 #7 0x7ff19e82c858 in abort /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:79:7 ... #23 0x557c9daee89a in fuzz_target_1::assert_invariants::hd6d4f9549b01c31c /home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/fuzz_targets/fuzz_target_1.rs:103:5 #24 0x557c9daee89a in fuzz_target_1::_::run::hac1117cb3dfecb2b /home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/fuzz_targets/fuzz_target_1.rs:69:9 #25 0x557c9daecea6 in rust_fuzzer_test_input /home/azureuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libfuzzer-sys-0.4.5/lib.rs:297:60 ... #37 0x557c9d9c8346 in main /home/azureuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libfuzzer-sys-0.4.5/libfuzzer/FuzzerMain.cpp:20:30 #38 0x7ff19e82e082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #39 0x557c9d9c837d in _start (/home/azureuser/data/stellar/soroban-examples/fuzzing/fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1+0x1bde37d) (BuildId: 6a95a932984a405ebab8171dddc9f812fdf16846) ``` -------------------------------- ### Setup Database for Network for All Tenants Source: https://github.com/stellar/stellar-docs/blob/main/docs/platforms/stellar-disbursement-platform/admin-guide/cli-manual.mdx Sets up database assets and wallets for all tenants based on the network passphrase. ```bash stellar-disbursement-platform db setup-for-network --all ``` -------------------------------- ### Horizon Startup Log Output Source: https://github.com/stellar/stellar-docs/blob/main/docs/data/apis/horizon/admin-guide/running.mdx Example of the log output when Horizon starts successfully. This indicates that Horizon is ready to serve client requests on the specified port. ```text INFO[...] Starting horizon on :8000 pid=29013 ```