Repository navigation
fix: token decimals constant, storage size counter, snapshot docs, and SDK API (#483, #484, #485, #486) - #659
Merged
DeFiVC merged 1 commit intoOct 19, 2026
Conversation
…hainLearnOfficial#485, ChainLearnOfficial#486 - ChainLearnOfficial#483: add TOKEN_DECIMALS constant to chainlearn-shared package and use in learn-token - ChainLearnOfficial#484: correct docs for event monitoring, deployment CLI flags, and test should_panic pattern - ChainLearnOfficial#485: clarify snapshot markers and document snapshot balances in architecture storage layout - ChainLearnOfficial#486: route all persistent storage writes/removals through write_entry/remove_entry helpers to maintain storage size accuracy
|
@Prudentdev-xyz 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.
Summary of Changes
TOKEN_DECIMALS: u32 = 7constant topackages/shared/src/constants.rs, re-exported it incontracts/learn-token, used it inlearn-tokentest initialization, and updated documentation inREADME.mdanddocs/architecture.md.env.events().subscribe()example indocs/integration-guide.mdwith standardenv.events().all()test pattern and off-chain RPC event query guidance. Updateddocs/deployment-guide.mdto use--rpc-urland--network-passphraseCLI flags instead of deprecated--network testnet. Corrected the#[should_panic]assertion pattern indocs/testing-guide.mdto match actual test error strings.SnapshotBalanceindocs/architecture.mdstorage layout, reflecting thatsnapshot()serves as an announcement marker while balances are recorded per address withrecord_balance_snapshot()..set()and.remove()calls withtypes::write_entry()/types::remove_entry()(inprogress-tracker) andmetadata::write_entry()/metadata::remove_entry()(incredential-nft) inupdate_course_version,earn_achievement,batch_submit_quiz_score,complete_module,batch_complete_module, and admin transfer handlers, ensuringget_storage_size()accurately tracks persistent storage entries without counter drift. Added storage size tracking tests for both contracts.Closes #483
Closes #484
Closes #485
Closes #486