Skip to content

feat: Soroban contract — initialize, platform fee, treasury, dispute window#820

Merged
nafiuishaaq merged 4 commits into
MentoNest:mainfrom
Userhorlie:feat/soroban-contract-init
Jun 24, 2026
Merged

feat: Soroban contract — initialize, platform fee, treasury, dispute window#820
nafiuishaaq merged 4 commits into
MentoNest:mainfrom
Userhorlie:feat/soroban-contract-init

Conversation

@Userhorlie

Copy link
Copy Markdown
Contributor

Summary

Implements the core Soroban smart contract for SkillSync, covering issues #748#751.

Changes

contract/Cargo.toml

  • Configured as a cdylib for WASM compilation
  • Added soroban-sdk 22.0.0 with alloc feature
  • Added testutils for unit tests

contract/src/lib.rs

Issue Feature Functions
#748 Contract initialization initialize(admin, treasury) — one-time only, emits Initialized
#749 Platform fee set_platform_fee(bps), get_platform_fee() — 0–1000 bps, emits PlatformFeeUpdated
#750 Treasury wallet set_treasury(address), get_treasury() — admin-only, emits TreasuryUpdated
#751 Dispute window set_dispute_window(ledgers), get_dispute_window() — default 1000, emits DisputeWindowUpdated

All setter functions are admin-only via require_auth(). All state stored in persistent storage.

.github/workflows/contract.yml

  • CI workflow: builds and tests the Soroban contract on every PR touching contract/**

Tests

6 unit tests covering initialization, re-init guard, fee validation, treasury update, and dispute window update.

Closes #748
Closes #749
Closes #750
Closes #751

Implements Soroban smart contract covering:
- initialize(admin, treasury): one-time setup with Initialized event (MentoNest#748)
- set/get_platform_fee (0-1000 bps), PlatformFeeUpdated event (MentoNest#749)
- set/get_treasury (admin-only), TreasuryUpdated event (MentoNest#750)
- set/get_dispute_window (default 1000 ledgers), DisputeWindowUpdated event (MentoNest#751)

All functions use persistent storage and admin-only access control.
Includes unit tests and GitHub Actions CI workflow.

Closes MentoNest#748
Closes MentoNest#749
Closes MentoNest#750
Closes MentoNest#751
@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Userhorlie Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nafiuishaaq nafiuishaaq merged commit 9dec36c into MentoNest:main Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dispute window configuration Treasury wallet configuration Platform fee configuration Contract initialization function

2 participants