Skip to content
Agentmart
Submit a tool

smart-contracts

Stellar smart contract development (Rust, soroban-sdk).

Skill by rylsherdamz-rgb

IndexedMIT★ 17
Write a review

Chalk Labs

Need help deploying smart-contracts?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rylsherdamz-rgb-smart-contracts

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Stellar smart contract development (Rust, soroban-sdk). Covers project setup, contract anatomy, storage/TTL, authorization, cross-contract calls, events, errors, upgrades, and comprehensive testing strategies.

Use cases: documents, testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/smart-contracts

What's inside

Skill name
smart-contracts
Description
Stellar smart contract development (Rust, soroban-sdk). Covers project setup, contract anatomy, storage/TTL, authorization, cross-contract calls, events, errors, upgrades, and comprehensive testing strategies.
License
MIT
Instructions
275 lines in SKILL.md · view on GitHub

Files (28)

  • SKILL.md
  • Cargo.lock · examples/hello-world/
  • Cargo.toml · examples/hello-world/
  • lib.rs · examples/hello-world/src/
  • test.rs · examples/hello-world/src/
  • test_events_emitted.1.json · examples/hello-world/test_snapshots/test/
  • test_increment.1.json · examples/hello-world/test_snapshots/test/
  • test_increment_auth_required.1.json · examples/hello-world/test_snapshots/test/
  • test_increment_multiple.1.json · examples/hello-world/test_snapshots/test/
  • test_initial_state.1.json · examples/hello-world/test_snapshots/test/
  • test_storage_ttl_extended_on_write.1.json · examples/hello-world/test_snapshots/test/
  • Cargo.lock · examples/token/
  • Cargo.toml · examples/token/
  • lib.rs · examples/token/src/
  • test.rs · examples/token/src/
  • test_approve.1.json · examples/token/test_snapshots/test/
  • test_balance_defaults_to_zero.1.json · examples/token/test_snapshots/test/
  • test_burn.1.json · examples/token/test_snapshots/test/
  • test_burn_insufficient_balance.1.json · examples/token/test_snapshots/test/
  • test_metadata.1.json · examples/token/test_snapshots/test/
  • test_mint.1.json · examples/token/test_snapshots/test/
  • test_mint_auth_required.1.json · examples/token/test_snapshots/test/
  • test_mint_invalid_amount_rejected.1.json · examples/token/test_snapshots/test/
  • test_mint_multiple_recipients.1.json · examples/token/test_snapshots/test/
  • test_total_supply_initial.1.json · examples/token/test_snapshots/test/
  • test_transfer.1.json · examples/token/test_snapshots/test/
  • test_transfer_from.1.json · examples/token/test_snapshots/test/
  • test_transfer_insufficient_balance.1.json · examples/token/test_snapshots/test/

SKILL.md (first lines)

# Smart Contracts (Soroban)

## Source Files

| File | Contents |
|------|----------|
| `contracts/hello-world/src/lib.rs` | Minimal contract scaffold |
| `contracts/hello-world/src/test.rs` | Unit + auth + event tests |
| `contracts/token/src/lib.rs` | Full SEP-41 token |
| `contracts/token/src/test.rs` | Token unit + integration tests |

---

## Testing Guide

### Setup

```rust
#![cfg(test)]
extern crate std;
use soroban_sdk::{
    testutils::{Address as _, Events},
    Address, Env, String, Symbol,
};
```

### Pattern 1: Unit Test with Setup Helper

Extract shared setup into a helper function:

```rust
fn setup() -> (Env, Address, Address, MyContractClient<'static>) {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let user = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin, 1000u32));
    let client = MyContractClient::new(&env, &contract_id);
    (env, admin, user, client)
}

#[test]
fn test_initial_state() {
    let (_, _, _, client) = setup();
    assert_eq!(client.get_count(), 0);
}
```

### Pattern 2: Auth Testing (without mock_all_auths)

Test that only authorized callers can invoke privileged functions:

```rust
#[test]
fn test_auth_required() {
    let env = Env::default();
    // Do NOT call mock_all_auths() — test auth failures
    let admin = Address::generate(&env);
    let attacker = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin,));
    let client = MyContractClient::new(&env, &contract_id);

    let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
        client.admin_only(&attacker); // attacker has no auth
    }));
    assert!(result.is_err());
}

#[test]
fn test_auth_passes() {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin,));
    let client = MyContractClient::new(&env, &contract_id);

    client.admin_only(&admin); // should not panic
}
```

### Pattern 3: Event Assertions

```rust
#[test]
fn test_events_emitted() {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let contract_id = env.register(MyContract, (&admin,));
    let client = MyContractClient::new(&env, &contract_id);

    client.do_thing();

    let events = env.events().all();
    assert!(!events.is_empty());

    let (event_contract, topics, data) = &events[0];
    assert_eq!(*event_contract, contract_id);
    // topics[0] is the event type symbol
    assert_eq!(topics.get(0).unwrap(), Symbol::new(&env, "DONE"));
}
```

### Pattern 4: Error / Panic Testing

```rust
#[test]
#[should_panic(expected = "HostError")]
fn test_rejects_invalid_input() {
    let env = Env::default();
    env.mock_all_auths();
    let (_, _, client) = setup();

    client.try_v1(); // intentionally bad input
}
```

### Pattern 5: Contract Storage / TTL Testing

From rylsherdamz-rgb/stellar-forge, MIT.

More from rylsherdamz-rgb/stellar-forge

Signals

Stars
17
Forks
2
Open issues
8
Last commit (this folder)
Jul 30, 2026 (3 months ago)
Last release
Jul 30, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rylsherdamz-rgb

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get smart-contracts running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying smart-contracts?

CallGet help
Cite this page

smart-contracts skill. Agent Mart. https://agentmart.dev/skills/rylsherdamz-rgb-smart-contracts (last updated 2026-10-24)