Skip to content

chore: add Soroban examples#120

Merged
jopmiddelkamp merged 3 commits intomasterfrom
feature/add-Soroban-examples
Dec 11, 2025
Merged

chore: add Soroban examples#120
jopmiddelkamp merged 3 commits intomasterfrom
feature/add-Soroban-examples

Conversation

@cuongph87
Copy link
Copy Markdown
Contributor

@cuongph87 cuongph87 commented Dec 9, 2025

Types of changes

Implements #84

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Adds a suite of modular Soroban examples (contracts, tokens, atomic swap, events, TTL, ledger queries, retry config) with shared helpers and Program orchestrator; includes WASM assets and updates project references; removes the old monolithic example.

  • Examples (Soroban):
    • Add modular examples: UploadContractExample, CreateContractExample, InvokeContractExample, ExtendContractFootprintTtlExample, GetHealthExample, GetNetworkExample, GetLatestLedgerExample, GetLedgerEntry{Account,ClaimableBalance,ContractCode,ContractData}Example, IncrementContractExample, EventsContractExample, TokenContractExample, AtomicSwapExample.
    • Add helpers: Helpers/SorobanHelpers.cs (server, simulate/poll, ledger key), Helpers/SorobanWasms.cs (WASM paths).
    • Add Program.cs to orchestrate running examples.
    • Remove monolithic Examples/Soroban/SorobanExamples.cs.
  • Assets:
    • Include WASM files in output via StellarDotnetSdk.Examples.Soroban.csproj (wasm/*_contract.wasm).
  • Build/Deps:
    • Add System.Net.Http and System.Text.RegularExpressions package references to Examples/Horizon, Examples/Soroban, and StellarDotnetSdk projects.

Written by Cursor Bugbot for commit b5eea28. Configure here.

@jopmiddelkamp
Copy link
Copy Markdown
Contributor

bugbot run

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Soroban examples project by restructuring and expanding the codebase. It refactors the monolithic SorobanExamples.cs file into multiple focused example modules and adds new advanced contract demonstrations including token contracts, atomic swaps, increment contracts, and events contracts.

Key changes:

  • Restructured examples into modular, single-responsibility classes
  • Added four new advanced contract examples (token, atomic swap, increment, events)
  • Introduced shared helper utilities and WASM path constants
  • Added package references for System.Net.Http and System.Text.RegularExpressions

Reviewed changes

Copilot reviewed 23 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
StellarDotnetSdk/StellarDotnetSdk.csproj Added System.Net.Http and System.Text.RegularExpressions package references
Examples/Soroban/StellarDotnetSdk.Examples.Soroban.csproj Added package references and new WASM file configurations
Examples/Soroban/SorobanExamples.cs Removed monolithic examples file (542 lines deleted)
Examples/Soroban/Program.cs New orchestrator for all Soroban examples with structured sections
Examples/Soroban/Helpers/SorobanWasms.cs Constants for WASM file paths
Examples/Soroban/Helpers/SorobanHelpers.cs Shared helper methods for transaction polling and simulation
Examples/Soroban/Examples/*.cs Modular example classes for each Soroban operation and contract type
Examples/Horizon/StellarDotnetSdk.Examples.Horizon.csproj Added System.Net.Http and System.Text.RegularExpressions package references

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


@jopmiddelkamp jopmiddelkamp merged commit a12a176 into master Dec 11, 2025
5 checks passed
@jopmiddelkamp jopmiddelkamp deleted the feature/add-Soroban-examples branch December 11, 2025 05:44
@cuongph87 cuongph87 added the chore label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants