Skip to content

Repository files navigation

📜 Stellar Insights — Contracts

Soroban smart contracts powering the Stellar Insights protocol.

Soroban Rust


Contracts

Crate Purpose
stellar_insights 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

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

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 (split from Stellar-inights monorepo)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages