soroban-sdk-tools

Crates.iosoroban-sdk-tools
lib.rssoroban-sdk-tools
version0.1.0
created_at2025-12-01 18:06:43.871837+00
updated_at2025-12-01 18:06:43.871837+00
descriptionEnhanced tools for Soroban smart contract development
homepage
repositoryhttps://github.com/blaineheffron/soroban-sdk-tools
max_upload_size
id1960237
size127,386
Blaine Heffron (BlaineHeffron)

documentation

README

soroban-sdk-tools

Enhanced tools for Soroban smart contract development, providing:

  • Advanced Storage Management: Typed storage maps with automatic key optimization
  • Composable Error Handling: The #[scerr] macro for clean error definitions
  • Authorization Testing: Simplified auth testing utilities

Quick Start

Add to your Cargo.toml:

[dependencies]
soroban-sdk-tools = "0.1"

Features

Storage Management

use soroban_sdk_tools::{contractstorage, PersistentMap, InstanceItem};

#[contractstorage]
pub struct TokenStorage {
    #[short_key("bal")]
    balances: PersistentMap<Address, i128>,
    admin: InstanceItem<Address>,
}

Error Handling

use soroban_sdk_tools::scerr;

#[scerr]
pub enum Error {
    Unauthorized,
    InsufficientBalance,
}

Authorization Testing

#[test]
fn test_transfer() {
    let client = TokenClient::new(&env, &contract_id);
    
    // Simplified authorization mocking
    client.with_auth(&user).transfer(&from, &to, &100);
}

Documentation

See the technical architecture for detailed information.

License

Apache-2.0

Commit count: 0

cargo fmt