-
Notifications
You must be signed in to change notification settings - Fork 25
Ar/psr 22 implement token module queries #1483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ar/psr 22 implement token module queries #1483
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/plt-scheduler-port #1483 +/- ##
==============================================================
- Coverage 26.03% 25.68% -0.35%
==============================================================
Files 34 34
Lines 9830 9830
==============================================================
- Hits 2559 2525 -34
- Misses 7271 7305 +34 |
| /// let account_address1 = [1u8; 32]; | ||
| /// let host = HostStub::with_accounts([(0, account_address0, None), (1, account_address1, Some(42))]); | ||
| /// let mut stub = KernelStub::new(0); | ||
| /// let account = stub.create_account(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified the interface to stub accounts a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrote tests to use updated stub (small changes) and added an additional test: test_initialize_token_non_existing_governance_account
0a70f2f to
a418c8f
Compare
soerenbf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Purpose
General cleanup of traits and types to prepare for more functionality (queries, transfers, mint, ...)
Changes
TokenRawAmounta newtype for better type checkHostOperationssplit up inTokenKernelQueriesandTokenKernelOperations. The former to be used when running queries, which are read-only and don't have a transaction context (like tick energy and log token event)TokenInitializationErrorerror variants more strongly types (MintAmountDecimalsMismatchandMintAmountNotRepresentablevariants) for better type checking of error handlingChecklist
hard-to-understand areas.