-
Notifications
You must be signed in to change notification settings - Fork 45
fix: token history contract #2474
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request updates the JSON schema in the token history contract. The modifications include updates in the "mint" object (updating the description of the "amount" property and reordering "note"), additions of a "contentMediaType" attribute in both "unfreeze" and "destroyFrozenFunds" objects for the "tokenId" and "frozenIdentityId" properties, an updated "action" property in the "emergencyAction" object with an enum, and a revised description for the "changeItemType" property in the "configUpdate" object. Changes
Possibly Related PRs
Suggested Reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/token-history-contract/schema/v1/token-history-contract-documents.json (1)
654-654: Verify closing brace formatting.The closing brace on line 654 is marked as changed. Please confirm that this alteration, possibly related to formatting or whitespace adjustments, is intentional and consistent with the project's style guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/token-history-contract/schema/v1/token-history-contract-documents.json(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (4)
packages/token-history-contract/schema/v1/token-history-contract-documents.json (4)
155-156: Updatemint.amountdescription.The description for the
amountproperty in themintobject has been changed from "The amount that was burned" to "The amount that was minted". This update aligns the schema with the intended behavior for mint operations. Please ensure that any dependent documentation or client validations are also updated accordingly.
417-418: AddcontentMediaTypetounfreeze.tokenId.The
tokenIdproperty in theunfreezeobject now explicitly includes acontentMediaTypewith the value"application/x.dash.dpp.identifier". This addition brings consistency with other schema properties that require explicit media type definitions.
426-427: AddcontentMediaTypetounfreeze.frozenIdentityId.Similarly, the
frozenIdentityIdproperty in theunfreezeobject now has an addedcontentMediaTypeattribute. This change standardizes the documentation of identifier properties, reinforcing clarity for consumers of the schema.
568-573: Define maximum value foremergencyAction.action.The new
"maximum": 255constraint for theactionproperty within theemergencyActionobject now ensures that the action value fits within an 8-bit unsigned integer (u8). This modification meets the PR objective for handling token transition proofs and enhances data validation.
| "action": { | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "maximum": 255, |
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.
Shall we use enum?
chore: update to latest dash core 37 (#2483) feat(platform)!: token advanced distribution and updates (#2471) fix: token history contract (#2474) Co-authored-by: Ivan Shumkov <ivan@shumkov.ru> Co-authored-by: QuantumExplorer <quantum@dash.org> fix(drive): using new rust dash core methods for reversed quorum hash to maintain backwards compatibility (#2489) feat: more granular integer document property types (#2455) Co-authored-by: Quantum Explorer <quantum@dash.org> docs: update comment for data contract code range (#2476) feat: validate token name localizations (#2468) feat(sdk): get identity by non-unique keys build(deps): update grovedb to current develop test: test identity by non-unique pubkey hashes fix(sdk): dash core client fails to get quorum chore: minor fixes test(drive-abci): identity by non-unique pubkey start after chore: minor changes to verify feat(sdk): token and group queries (#2449) chore: revert limit 1 => limit none chore: add non-unique key to test identities test(sdk): test vectors for test_fetch_identity_by_non_unique_public_keys fix(platform)!: token distribution fixes and tests (#2494) chore(platform): bump to version 2.0.0-dev.1 (#2495) test: update assertion fix(sdk): make some things public (#2496) feat(platform): require token for document actions (#2498) fix: data contract proof doesn't work with new auto fields (#2501)
chore: update to latest dash core 37 (#2483) feat(platform)!: token advanced distribution and updates (#2471) fix: token history contract (#2474) Co-authored-by: Ivan Shumkov <ivan@shumkov.ru> Co-authored-by: QuantumExplorer <quantum@dash.org> fix(drive): using new rust dash core methods for reversed quorum hash to maintain backwards compatibility (#2489) feat: more granular integer document property types (#2455) Co-authored-by: Quantum Explorer <quantum@dash.org> docs: update comment for data contract code range (#2476) feat: validate token name localizations (#2468) feat(sdk): get identity by non-unique keys build(deps): update grovedb to current develop test: test identity by non-unique pubkey hashes fix(sdk): dash core client fails to get quorum chore: minor fixes test(drive-abci): identity by non-unique pubkey start after chore: minor changes to verify feat(sdk): token and group queries (#2449) chore: revert limit 1 => limit none chore: add non-unique key to test identities test(sdk): test vectors for test_fetch_identity_by_non_unique_public_keys fix(platform)!: token distribution fixes and tests (#2494) chore(platform): bump to version 2.0.0-dev.1 (#2495) test: update assertion fix(sdk): make some things public (#2496) feat(platform): require token for document actions (#2498) fix: data contract proof doesn't work with new auto fields (#2501)
Issue being fixed or feature implemented
Proofs were not working for Pause, Resume, and Unfreeze token transitions if the tokens kept historical documents because the Token History contract was not configured properly.
What was done?
How Has This Been Tested?
DET
Breaking Changes
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
New Features
Documentation