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
Conversation
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #211
closes #212
closes #213
closes #214
Summary of Changes
1. Progress Export Function (#211)
export_progress(learner, course_id)function inprogress-trackerreturning a completeProgressExportstruct 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.tests/unit/progress_tests.rs.2. Multi-Admin Support (#212)
AdminInfostruct (address,role) andAdminspersistent storage key inlearn-token/src/storage.rs.add_admin,remove_admin, andget_adminsfunctions inlearn-tokenallowing dynamic administration and role management (Admin, Minter, Pauser).execute_multisig_op,upgrade_multisig), requiring dual authorization from two distinct Admin role holders.tests/integration/admin_role_flow.rs.3. Contract Upgrade Mechanism (#213)
upgrade(new_wasm_hash)andupgrade_multisig(...)in contract logic.upgrade_version), recorded upgradedwasm_hashin state, and emittedupgradedcontract event.tests/integration/upgrade_tests.rs.4. Gas Estimation Function (#214)
estimate_claim_gas(learner, course_id, quiz_id)inlearn-tokento returnClaimEstimatecontainingwould_succeed,estimated_reward,failure_reason, andestimated_gas.