Skip to content

feat: progress export, multi-admin support, contract upgrade mechanism, and gas estimation (#211, #212, #213, #214) - #371

Open
Kaycee276 wants to merge 1 commit into
ChainLearnOfficial:mainfrom
Kaycee276:feat/progress-export-multi-admin-upgrade-gas
Open

feat: progress export, multi-admin support, contract upgrade mechanism, and gas estimation (#211, #212, #213, #214)#371
Kaycee276 wants to merge 1 commit into
ChainLearnOfficial:mainfrom
Kaycee276:feat/progress-export-multi-admin-upgrade-gas

Conversation

@Kaycee276

Copy link
Copy Markdown

closes #211
closes #212
closes #213
closes #214

Summary of Changes

1. Progress Export Function (#211)

  • Added/verified export_progress(learner, course_id) function in progress-tracker returning a complete ProgressExport struct containing enrollment status, enrollment timestamp, completed modules bitmap, total module count, quiz score results, quizzes submitted, total quiz score, overall progress, and credential eligibility in a single call without pagination.
  • Added comprehensive unit test coverage in tests/unit/progress_tests.rs.

2. Multi-Admin Support (#212)

  • Added AdminInfo struct (address, role) and Admins persistent storage key in learn-token/src/storage.rs.
  • Implemented add_admin, remove_admin, and get_admins functions in learn-token allowing dynamic administration and role management (Admin, Minter, Pauser).
  • Added multi-sig support for critical contract operations (execute_multisig_op, upgrade_multisig), requiring dual authorization from two distinct Admin role holders.
  • Added integration test suite in tests/integration/admin_role_flow.rs.

3. Contract Upgrade Mechanism (#213)

  • Implemented Soroban WASM contract upgrade mechanism with upgrade(new_wasm_hash) and upgrade_multisig(...) in contract logic.
  • Managed version tracking (upgrade_version), recorded upgraded wasm_hash in state, and emitted upgraded contract event.
  • Verified state preservation across upgrades in tests/integration/upgrade_tests.rs.

4. Gas Estimation Function (#214)

  • Updated estimate_claim_gas(learner, course_id, quiz_id) in learn-token to return ClaimEstimate containing would_succeed, estimated_reward, failure_reason, and estimated_gas.
  • Performed read-only simulation path without state mutations or authorization side-effects.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Kaycee276 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

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.

. Add gas estimation function . Add contract upgrade mechanism . Add multi-admin support Add progress export function

1 participant