Skip to content
Stellar-AnalysisPublic

About

Stellar Insights smart contracts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

📜 Stellar Analysis — Contracts

Soroban smart contracts powering the Stellar Analysis protocol.

Soroban Rust


Contracts

Crate Purpose
stellar_analysis Core protocol contract — submits and stores analytics snapshots on-chain
analytics Batched snapshot ingestion with rate limiting, diffing, and pause/unpause controls
access-control Role- and permission-based access control shared across contracts
escrow Escrow service for holding and releasing funds between parties
governance Proposal creation and vote tallying for protocol governance
governance-voting Voter registration and weighted voting on governance proposals
multi-sig-wallet Multi-signature wallet with configurable owner threshold
time-locked-transactions Scheduled transfers that unlock at a future ledger time
token-swap On-chain offer creation and settlement for token swaps
upgrade Governance-gated contract upgrade proposals and approvals
benches Wasm size / CPU benchmarks for the contract suite

All contracts share a Cargo workspace (Cargo.toml) and the same soroban-sdk / soroban-token-sdk versions.

Prerequisites

  • Rust (stable) with the wasm32-unknown-unknown target:
    rustup target add wasm32-unknown-unknown
  • Soroban CLI

Build

cargo build --target wasm32-unknown-unknown --release

Optimized release builds strip symbols and use opt-level = "z" (see the workspace [profile.release]) to minimize deployed Wasm size.

Test

cargo test

Benchmarks live in benches/ and use the [profile.bench] profile (opt-level = 3).

Deploy

Requires Rust 1.84+ target wasm32v1-none (the wasm32-unknown-unknown target on Rust 1.82+ enables Wasm features the Soroban environment doesn't yet support):

rustup target add wasm32v1-none
cargo build --target wasm32v1-none --release -p <package_name>

soroban contract deploy \
  --wasm target/wasm32v1-none/release/<contract_name>.wasm \
  --source <account> \
  --network testnet

soroban contract invoke --id <contract_id> --source <account> --network testnet \
  -- initialize --admin <account_address>

Live on testnet

Contract Contract ID Deploy tx Init tx
stellar_analysis CDFFSZYJVQQJKI5O5WF63OQMPJCSY55BAZDIZGTD3XUFD764TSTYTDQK tx tx
escrow CBWB5JIKJC7TJ2FBXB6AZEJ6HLOOBZCKWUN2RNTXTFFXQMRTLG2WDDNU tx tx

Both are initialized and live on Testnet (SDF network). The other 8 contracts in this workspace are not yet deployed anywhere.

Linting

Workspace-wide Clippy lints deny unwrap(), expect(), and panic! in contract code ([workspace.lints.clippy] in Cargo.toml) — contracts must handle errors explicitly rather than aborting.

Related repos

  • backend — indexes and serves the on-chain data these contracts produce
  • frontend — dashboard consuming this data
  • mobile — mobile client

About

Stellar Insights smart contracts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages