-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add token transitions to SDK and DAPI #2434
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis pull request introduces comprehensive enhancements to token-related functionality across multiple packages in the Dash Platform codebase. The changes span Rust and WebAssembly implementations, focusing on improving token transition handling, adding new builder patterns for token operations, and creating WebAssembly bindings for token-related transitions. The modifications enable more robust and flexible token management, including minting, burning, transferring, freezing, and emergency actions. Changes
Sequence DiagramsequenceDiagram
participant SDK as Token SDK
participant Builder as Token Operation Builder
participant Platform as Dash Platform
SDK->>Builder: Create operation builder
Builder->>Builder: Configure operation parameters
Builder->>Platform: Broadcast transition
Platform-->>Builder: Return transition result
Builder-->>SDK: Return operation result
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
using_group_info: Option<GroupStateTransitionInfoStatus>, | ||
} | ||
|
||
impl<'a> TokenEmergencyActionBuilder<'a> { |
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.
file should be called emergency_action
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.
I'm not sure we should call these things builders, as they would be for single use.
@coderabbitai review |
✅ Actions performedReview triggered.
|
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: 7
🧹 Nitpick comments (37)
packages/rs-sdk/src/platform/transition/fungible_tokens/emergency.rs (3)
19-19
: Clarify the doc comment to accurately reflect the emergency context rather than minting tokens.Currently, the doc comment says "A builder to configure minting tokens," but this code handles emergency actions.
-/// A builder to configure minting tokens. +/// A builder to configure emergency token actions.
38-39
: Implement the token position validation to address the TODO.The
TODO
comment indicates that token position validation is pending. This is important to ensure the correct token contract position is used during the pause operation.Do you want me to propose code for performing this validation and open a new issue to track it?
84-85
: Offer to handle automatic group info resolution.The
TODO
mentions simplifying group actions by automatically finding the token position if a group action is required. Handling this logic within a helper function or the builder itself may reduce duplication and minimize user error.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs (1)
93-114
: Consider avoiding unnecessary cloning in the match arms.Cloning large data structures in each branch may incur performance overhead. Where possible, pass references or clone lazily (only when needed).
packages/rs-sdk/src/platform/transition/fungible_tokens/unfreeze.rs (3)
18-18
: Update the struct-level documentation.The doc comment says “A builder to configure minting tokens,” but this structure is for unfreezing tokens.
-/// A builder to configure minting tokens. +/// A builder to configure unfreezing tokens.
38-38
: Address the TODO to validate token position.This is critical to prevent invalid token positions from being used, which could lead to logic errors downstream.
Do you want me to generate a helper function or open a new issue to track and implement the validation step?
75-117
: Add error handling for broadcast failures.Currently, the code logs the error (by using
?
), but consider adding a retry mechanism or more specific error details in certain scenarios (e.g., insufficient fees, invalid token state).packages/dapi/lib/externalApis/drive/fetchProofForStateTransitionFactory.js (2)
17-17
: Document the newdpp
parameter.Ensure function-level JSDoc or inline documentation clarifies the usage of
dpp
.
133-145
: Provide consistent error messages.In case of an unsupported transition type, the error message is helpful. Ensure uniform error reporting format across all batched transition checks.
packages/wasm-dpp/src/data_contract/tokens.rs (2)
1-3
: Consider adding documentation comments.These imports and the bridging logic could benefit from Rust doc comments (e.g.,
///
) explaining how this Wasm-bound wrapper should be used from JavaScript.
14-18
: Prefer implementingFrom<TokenConfigurationWasm>
forTokenConfiguration
.In Rust,
Into<T>
is automatically derived ifFrom<U> for T
is implemented. Hence, it’s often more idiomatic to implement onlyFrom<TokenConfigurationWasm>
forTokenConfiguration
and omitInto(TokenConfiguration)
.-impl Into<TokenConfiguration> for TokenConfigurationWasm { - fn into(self) -> TokenConfiguration { - self.0 - } -} +impl From<TokenConfigurationWasm> for TokenConfiguration { + fn from(value: TokenConfigurationWasm) -> Self { + value.0 + } +}packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/freeze.rs (1)
16-22
: Add documentation to clarify usage.Adding a doc comment or short description explaining what
getFrozenIdentityId
does can help JavaScript consumers quickly understand the method’s purpose.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/transfer.rs (1)
16-22
: Enhance clarity with doc comments.Providing a short doc comment for
getRecipientId
can guide JS developers on what the method returns and how to properly use it.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/unfreeze.rs (1)
16-22
: Add doc comments for clarity.A short Rust doc comment elaborating on the purpose of
getFrozenIdentityId
would be beneficial, ensuring developers have immediate context in the generated TypeScript definitions.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/destory.rs (1)
1-5
: Typo in the filename
The file name is spelled "destory.rs" instead of "destroy.rs". Please rename the file to maintain clarity and consistency.- packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/destory.rs + packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/destroy.rspackages/rs-sdk/src/platform/transition/fungible_tokens/burn.rs (4)
1-17
: Ensure consistent error handling & logging imports
The list of imports looks good, covering necessary traits and modules. However, consider adding a common logging crate if you plan to emit logs or debug information during the burn operation. This helps with observability if errors occur downstream and might simplify debugging.
18-28
: Clarify docstring forBurnTokensBuilder
The docstring states "A builder to configure and broadcast burning tokens transition," which is clear. For completeness, consider adding a high-level usage example or any prerequisites (like verifying the caller’s identity) to guide new developers.
30-49
: Address theTODO
comment for validating token position
You have aTODO
(line 37) to validate the token position. This is critical to avoid scenarios where invalid positions cause runtime failures or security issues.Would you like me to generate a quick helper function that checks valid positions for you?
61-67
: Resolve theTODO
regarding group info
Similar to the earlier validation TODO, the note here implies automatically detecting position if group action is required. This might significantly reduce boilerplate for clients.Let me know if you need a prototype or a separate utility function to streamline group logic.
packages/rs-sdk/src/platform/transition/fungible_tokens/destroy.rs (2)
29-49
: Graceful error handling around token position
You have anotherTODO
(line 37) to validate token position. Ensure consistent logic across the entire token-lifecycle code, so invalid positions fail early with a clear error.
61-67
: Group info comment
Again, a TODO suggests potential automation. You might consider a shared helper used by bothBurnTokensBuilder
andDestroyFrozenTokensBuilder
if the logic overlaps.packages/rs-sdk/src/platform/transition/fungible_tokens/freeze.rs (3)
30-49
: Add token position checks
As with the other transitions, line 38 has a TODO for validating the token position. Addressing this helps avoid passing invalid configuration values.
61-67
: Group info
Similar suggestion: a shared helper to auto-detect group usage is a good practice.
119-132
: Mention side effects in doc
When tokens are frozen, consider indicating the side effects left on downstream states, so callers know the impact. Otherwise, the code is well-structured.packages/rs-sdk/src/platform/transition/fungible_tokens/mint.rs (4)
18-29
: Confirm default values and add field-level documentation.
While the struct is clearly defined, consider documenting each field's intended usage, especially for optional fields likepublic_note
andsettings
, to guide other developers.
54-60
: Clarify the conditions for destination issuance.
The TODO at line 57 notesminting_allow_choosing_destination
. Ensure the final builder logic aligns with the contract’s constraints regarding recipient IDs.
72-78
: Simplify group actions logic.
The TODO at line 75 suggests automatically determining the token position if group actions are required. This can reduce complexity for callers.
85-129
: Consider advanced error handling and a final check.
Upon constructing the state transition, consider verifying any last-minute constraints (e.g., max token supply or contract-limited minting) to fail early if the request is invalid.packages/rs-sdk/src/platform/transition/fungible_tokens/transfer.rs (4)
21-34
: Update the doc comment to match “Transfer” context.
Line 36 refers to “Start building a mint tokens request.” Change it to reflect token transfers for clarity.- /// Start building a mint tokens request for the provided DataContract. + /// Start building a token transfer request for the provided DataContract.
60-66
: Encourage encryption usage checks.
with_shared_encrypted_note
is optional. If certain contract rules mandate encryption, consider adding a warning or a built-in safeguard.
92-136
: Strengthen transfer constraints.
When doing a token transfer, confirm that the sender has sufficient balance or ownership. Ensure the logic calls or enforces checks to avoid partial or failing transitions down the line.
138-151
: Document usage of the returned BTreeMap.
broadcast_and_wait_for_result
returns a map of identifiers to token amounts. Provide guidance or doc comments on how to interpret multiple recipients if relevant.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs (2)
48-54
: Add doc references to structured note types.
Now thatshared_encrypted_note
is anOption<&SharedEncryptedNote>
, consider referencing the new type’s docs to help other developers.
132-140
: Document usage of “as_ref” vs. owned calls.
Line 136 ensures an owned return for the shared note, while 132 returns a reference. Clarify guidelines on when to consume vs. borrow.packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs (1)
91-97
: Encourage additional docstrings.
For these note-related methods, docstrings clarifying how these notes are encrypted or used in transitions help maintain code clarity.packages/rs-dpp/src/tokens/token_event.rs (1)
18-24
: Consistent use of strongly typedSharedEncryptedNote
Switching from raw tuples to a strongly typed
SharedEncryptedNote
enhances maintainability. Consider extending this approach toTokenEventPersonalEncryptedNote
for a uniform, strongly typed codebase.packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs (1)
111-115
: Consider improving variable naming within thematch
arms for clarity.
The variablesdoc
inToken(doc)
andtok
inDocument(tok)
can cause confusion due to the mismatch in naming. Renaming them totoken_transition
anddocument_transition
or similar will make the code more readable.match tr.to_owned_transition() { - BatchedTransition::Token(doc) => TokenTransitionWasm::from(doc).into(), - BatchedTransition::Document(tok) => DocumentTransitionWasm::from(tok).into(), + BatchedTransition::Token(token_transition) => TokenTransitionWasm::from(token_transition).into(), + BatchedTransition::Document(document_transition) => DocumentTransitionWasm::from(document_transition).into(), }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (34)
packages/dapi/lib/externalApis/drive/fetchProofForStateTransitionFactory.js
(2 hunks)packages/rs-dpp/src/data_contract/mod.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs
(5 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs
(4 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs
(2 hunks)packages/rs-dpp/src/tokens/token_event.rs
(1 hunks)packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs
(5 hunks)packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs
(7 hunks)packages/rs-sdk/src/platform/transition.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/burn.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/destroy.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/emergency.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/freeze.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/mint.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/mod.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/transfer.rs
(1 hunks)packages/rs-sdk/src/platform/transition/fungible_tokens/unfreeze.rs
(1 hunks)packages/wasm-dpp/Cargo.toml
(1 hunks)packages/wasm-dpp/src/data_contract/data_contract.rs
(3 hunks)packages/wasm-dpp/src/data_contract/mod.rs
(1 hunks)packages/wasm-dpp/src/data_contract/tokens.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs
(2 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/burn.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/config.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/destory.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/emergency.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/freeze.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mint.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs
(2 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/transfer.rs
(1 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/unfreeze.rs
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/rs-sdk/src/platform/transition.rs
- packages/wasm-dpp/src/data_contract/mod.rs
🔇 Additional comments (77)
packages/rs-sdk/src/platform/transition/fungible_tokens/emergency.rs (1)
31-31
: Rename the file to match the intended naming.Past feedback from QuantumExplorer suggests renaming the file from
emergency.rs
toemergency_action.rs
for clarity.packages/dapi/lib/externalApis/drive/fetchProofForStateTransitionFactory.js (1)
47-49
: Validate the presence of token transitions before processing.Explicitly guarding against empty or invalid transitions can enhance code clarity and reduce unexpected edge cases.
packages/rs-sdk/src/platform/transition/fungible_tokens/mod.rs (1)
1-7
: Modules introduction looks consistentThe addition of these modules cleanly organizes different token operations (burn, destroy, emergency, freeze, mint, transfer, unfreeze). This modular architecture promotes maintainability and clarity within the codebase.
packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/burn.rs (3)
1-2
: Imports are validThe dependencies on
TokenBurnTransition
andwasm_bindgen
are correctly declared to facilitate bridging Rust and WASM.
4-6
: Struct wrapper definition is straightforwardThe wasm-bindgen annotation and struct definition effectively wrap the underlying
TokenBurnTransition
for use in a JavaScript/WASM context.
8-12
: Conversion trait logic is appropriateThe
From
trait implementation correctly enables seamless conversion from the coreTokenBurnTransition
to the wasm wrapper. If certain validations become necessary, consider usingTryFrom
in the future.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/config.rs (3)
1-2
: Imports are validAppropriate imports for bridging Rust and WASM.
4-6
: WASM struct wrapper is well-definedEncapsulating
TokenConfigUpdateTransition
in a wrapper preserves existing functionality while enabling cross-language interaction.
8-12
: Conversion trait usage is consistentThis straightforward
From
trait implementation simplifies the creation of a WASM wrapper for config transitions.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/emergency.rs (3)
1-2
: Imports are validDependencies are well-organized for bridging Rust’s
TokenEmergencyActionTransition
with WASM code.
4-6
: Emergency action wrapper is clearly structuredThe annotation and struct definition follow the established pattern, ensuring consistency in emergency action handling.
8-12
: Seamless conversionUsing
From
ensures straightforward interoperability with consumers expecting the WASM wrapper.packages/wasm-dpp/src/data_contract/tokens.rs (1)
4-7
: Struct naming alignment.Wrapping the underlying
TokenConfiguration
in a tuple struct namedTokenConfigurationWasm
is consistent with typical Wasm-bound patterns. Good job on maintaining naming clarity and ensuring it’s discoverable as an exported entity for JavaScript.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/freeze.rs (2)
6-8
: Wrapper struct naming is consistent and clear.This tuple struct pattern nicely reflects the underlying
TokenFreezeTransition
and ensures minimal overhead while bridging to JS.
10-14
: Conversion trait implementation is consistent.You provide a straightforward
From<TokenFreezeTransition>
implementation, which is concise and idiomatic for data bridging.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/transfer.rs (2)
6-8
: Struct definition is aligned with best practices.This pattern is consistent with other token transition WASM wrappers. The design fosters a straightforward integration of Rust and JavaScript code.
10-14
: Conversion approach reaffirms consistency.The
From<TokenTransferTransition>
implementation parallels the freeze transition pattern, making the codebase uniform and easier to maintain.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/unfreeze.rs (2)
6-8
: Good use of consistent naming across transitions.Leveraging
TokenUnfreezeTransitionWasm
parallels the existing freeze transition design. This makes the API intuitive for those already familiar with the freezing feature.
10-14
: Straightforward bridging logic.As with other transitions, the
From<TokenUnfreezeTransition>
implementation is concise and maintains consistency throughout the codebase.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/destory.rs (3)
6-9
: Struct naming
The suffixWasm
on the struct highlights that it is a WebAssembly wrapper. This naming pattern appears consistent with the rest of the codebase.
10-14
: From trait usage
ImplementingFrom<TokenDestroyFrozenFundsTransition>
is a straightforward way to safely wrap the underlying struct. No issues here.
16-22
: Getter method
The methodfrozen_identity_id
exposes the internal ID as expected and is properly annotated for JavaScript (js_name=getFrozenIdentityId
). This looks good.packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mint.rs (4)
1-8
: Use ofWithJsError
The import ofWithJsError
suggests you're consistently handling Rust errors in a JavaScript-friendly manner. This is a good practice for bridging the two environments.
9-11
: New struct for Wasm bridging
DefiningTokenMintTransitionWasm
with the#[wasm_bindgen(js_name=TokenMintTransition)]
attribute properly exposes the struct to JavaScript.
13-17
: Conversion trait
Usingimpl From<TokenMintTransition>
ensures an ergonomic way to create the Wasm wrapper. No concerns.
19-31
: Signature requiringTokenConfigurationWasm
pub fn recipient_id(&self, token_configuration: TokenConfigurationWasm) -> Result<IdentifierWrapper, JsValue>
suggests the recipient ID depends on the provided token configuration. Verify that passing a configuration here is necessary instead of using internal struct data, especially if multiple transitions or different states might need distinct configurations.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs (3)
15-20
: New type aliases for encrypted notes
DefiningSharedEncryptedNote
andPrivateEncryptedNote
clarifies the meaning of the tuple fields, improving readability and maintainability.
63-63
:shared_encrypted_note
field
UsingOption<SharedEncryptedNote>
aligns with the new type alias, reducing ambiguity and clarifying the intent of the note.
69-69
:private_encrypted_note
field
Similarly, switching toOption<PrivateEncryptedNote>
makes it clearer that this note is distinct from the shared one, and is not always present.packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs (7)
6-6
: Referencing new note aliases
ImportingSharedEncryptedNote
andPrivateEncryptedNote
ensures code consistency across modules.
65-65
:shared_encrypted_note
getter
ReturningOption<&SharedEncryptedNote>
is appropriate for safe, read-only access to a potentially absent value.
71-71
:shared_encrypted_note_owned
method
Providing an owned version of the note is valuable for scenarios where a consuming function needs full ownership.
77-77
:set_shared_encrypted_note
method
Accepting anOption<SharedEncryptedNote>
enforces flexibility in either storing a new note or clearing the field ifNone
is provided.
109-109
: Setter for private note
Consistently adopting the same pattern as withshared_encrypted_note
ensures a uniform API for setting optional data.
121-122
:notes()
method return value
Exposing the collected optional notes in a tuple helps to retrieve all note-related data together, which can simplify external usage.
133-134
:notes_owned()
method return value
Similarly returning owned data for all notes is convenient for cases where external code needs to consume or modify them independently.packages/rs-sdk/src/platform/transition/fungible_tokens/burn.rs (4)
51-59
: Fluent builder pattern is well-implemented
These methods follow the standard Rust builder pattern, ensuring optional fields are handled gracefully. Looks good!
69-72
: Settings integration
Using an optionalPutSettings
is an elegant approach. The code is consistent with the rest of the builder pattern.
74-116
: Confirmuser_fee_increase
usage
The method appliesunwrap_or_default()
for user fee increases (line 105). Verify that default values align with chain or contract policy. Also, consider logging the final user fee if dynamic fees can affect user balances significantly.
118-131
: Clean pattern for awaiting response
broadcast_and_wait_for_result
is straightforward and consistent with the rest of the codebase. Good job providing a succinct, chained flow for finalizing the operation.packages/rs-sdk/src/platform/transition/fungible_tokens/destroy.rs (5)
17-27
: Confirm naming alignment
The struct is calledDestroyFrozenTokensBuilder
, which is descriptive. Confirm that all calls to this builder are similarly named for consistency, e.g., “destroy_frozen_tokens”.
51-59
: Good approach for optional fields
Having builder methods likewith_public_note
clarifies the code. No issues spotted here.
69-72
: OptionalPutSettings
Same pattern as the burn builder: simple and effective.
74-116
: Check broadcast flow for partial success
Unlike minting or burning, destroying frozen tokens might need special attention to partial or multi-step transitions in complex scenarios. Ensure no partial states are left if an error occurs after some tokens are destroyed.
118-131
: Asynchronous response handling
broadcast_and_wait_for_result
is consistent with the approach from other token transition builders. This uniformity eases maintenance.packages/rs-sdk/src/platform/transition/fungible_tokens/freeze.rs (4)
18-28
: Builder struct naming is correct
FreezeTokensBuilder
aligns well with the file’s purpose, contrasting with the doc comment mismatch above.
51-59
: Optional note & user fee
No issues here. The builder pattern is consistent.
69-72
: Optional settings
Same usage as in other modules. Continues the consistent approach for optional fields.
75-117
: Check error propagation
Thebroadcast
method callsBatchTransition::new_token_freeze_transition(...)
and then broadcasts. Confirm all?
error paths clearly indicate context (e.g., “failed to freeze tokens”). Logging or wrapping the error helps.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs (6)
7-7
: Using more expressive type aliases
Refactoring the previously used tuple intoSharedEncryptedNote
is a good improvement in readability and maintainability.
79-84
: Check for version mismatches
When returningOption<&SharedEncryptedNote>
, ensure that any new note version changes do not cause round-trip serialization issues.
85-90
: Ownership approach
shared_encrypted_note_owned
returningOption<SharedEncryptedNote>
cleanly transfers ownership. This pattern is consistent with Rust best practices.
91-91
: Consistent setter
set_shared_encrypted_note
aligns well with the new typed approach.
121-121
: Replace private tuple withPrivateEncryptedNote
Good job standardizing the private note approach, just like the shared note.
132-133
: Consistent use of typed notes
ReturningOption<SharedEncryptedNote>
andOption<PrivateEncryptedNote>
innotes_owned
is a logical extension of your typed note approach. No major issues here.packages/rs-sdk/src/platform/transition/fungible_tokens/mint.rs (2)
1-17
: Ensure imports are used consistently and cautiously.
All imports appear relevant to state transitions, resulting objects, and errors.
130-143
: Validate broadcast result usage.
Ensure consumers ofbroadcast_and_wait_for_result
handle the tuple(Identifier, TokenAmount)
correctly, especially evaluating success/failure states.packages/rs-sdk/src/platform/transition/fungible_tokens/transfer.rs (1)
1-20
: Confirm all imports are utilized and secure.
These imports are standard for bridging transitions and token ID calculations. No issues found.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs (3)
6-6
: Unified note type usage.
Replacing tuples with structured types (SharedEncryptedNote
,PrivateEncryptedNote
) improves readability and maintainability.
75-75
: Check consistency of encrypted note usage.
If the private note is now also a structured type, ensure upstream or downstream code has aligned usage.Also applies to: 82-83
164-164
: Validate partial or missing note states.
When “notes_owned” or “notes” omit one or more notes, confirm if partial encryption fields can cause confusion or errors.Also applies to: 172-173
packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs (3)
10-10
: Approve type usage for shared/private notes.
UsingSharedEncryptedNote
andPrivateEncryptedNote
fosters clarity.
118-118
: Ensure optional fields remain in sync.
Whenshared_encrypted_note
is updated, confirm no mismatch with private note usage.Also applies to: 125-126, 133-134
167-175
: Verify null states for notes.
Wherenotes()
andnotes_owned()
handleNone
fields, ensure downstream logic handles partially absent notes gracefully.Also applies to: 199-199, 207-208, 221-222
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs (2)
17-19
: Well-structured approach for typed encryption note usageReplacing the raw tuple-based approach for shared & private notes with dedicated types is a significant improvement in both clarity and maintainability. Great job streamlining these imports.
82-83
: Improved function signature readabilityThis new signature is more intuitive thanks to
SharedEncryptedNote
andPrivateEncryptedNote
. Just ensure all call sites pass the correct structure and that older tuple-based usage is updated accordingly.packages/rs-dpp/src/data_contract/mod.rs (1)
53-53
: Publicly exposingTokenConfiguration
Making
TokenConfiguration
public is justified to enable broader usage across the codebase. Confirm the interface is stable and well-documented to safeguard external consumers from unexpected changes.packages/wasm-dpp/src/data_contract/data_contract.rs (4)
10-10
: ImportingTokenContractPosition
for modular token managementEnabling this import for referencing token configurations is aligned with the new feature set. Looks good for maintainability.
14-14
: UtilizingDataContractV1Getters
Adding
DataContractV1Getters
is a positive step, ensuring a clearer, type-safe interface for the WASM environment. Nicely done.
454-464
: Newtoken_configuration
methodThis method cleanly exposes token configuration to external consumers under WASM. Consider adding tests for edge cases, such as an invalid or missing
token_contract_position
.
26-26
: Import ofTokenConfigurationWasm
Please confirm there are no naming collisions or overshadowed symbols across the crate. Usage looks straightforward, but verifying references helps ensure consistency.
✅ Verification successful
Import verified - no naming conflicts or inconsistencies
TheTokenConfigurationWasm
import is properly scoped and consistently used across the codebase as a wrapper type with clear conversion paths to/from the innerTokenConfiguration
type.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Checking for references to TokenConfigurationWasm rg -A 5 'TokenConfigurationWasm'Length of output: 3805
packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs (1)
33-34
: Imports for Document and Token transitions look straightforward.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs (2)
27-29
: Newly importedPrivateEncryptedNote
andSharedEncryptedNote
appear consistent with typed transitions.
567-568
: Transition signature change to typed encrypted notes is a positive improvement.
Replacing tuple-based parameters with named types improves readability and type safety. Ensure all test fixtures or calls are updated accordingly.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs (2)
82-83
: ReusingPrivateEncryptedNote
andSharedEncryptedNote
across transitions is a good approach.
587-588
: Typed parameters enhance maintainability.packages/wasm-dpp/Cargo.toml (1)
43-43
: Confirmed addition ofsystem_contracts
feature.
It's recommended to verify that enabling this feature meets the intended use case, ensuring no unexpected side effects.
// TODO: Validate token position | ||
|
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.
🛠️ Refactor suggestion
Likewise, add missing token position validation for the resume flow.
Similar to the pause operation, the resume operation also includes a TODO
for token position validation.
// Example: you can unify pause/resume validation in a helper method
fn validate_token_position(token_position: TokenContractPosition) -> Result<(), Error> {
// implement the checks you need here
}
...
// usage inside resume
Self {
data_contract,
token_position: {
validate_token_position(token_position)?;
token_position
},
...
}
Committable suggestion skipped: line range outside the PR's diff.
|
||
use crate::batch_transition::token_transition::burn::TokenBurnTransitionWasm; | ||
use crate::batch_transition::token_transition::config::TokenConfigUpdateTransitionWasm; | ||
use crate::batch_transition::token_transition::destory::TokenDestroyFrozenFundsTransitionWasm; |
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.
Fix the import path to reflect the corrected module name.
Ensure that the destory
reference aligns with the corrected spelling.
-use crate::batch_transition::token_transition::destory::TokenDestroyFrozenFundsTransitionWasm;
+use crate::batch_transition::token_transition::destroy::TokenDestroyFrozenFundsTransitionWasm;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
use crate::batch_transition::token_transition::destory::TokenDestroyFrozenFundsTransitionWasm; | |
use crate::batch_transition::token_transition::destroy::TokenDestroyFrozenFundsTransitionWasm; |
use dpp::state_transition::batch_transition::batched_transition::token_transition::TokenTransition; | ||
mod burn; | ||
mod config; | ||
mod destory; |
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.
Correct the spelling in the module name.
The filename and references use destory
instead of destroy
. This inconsistency can cause confusion and maintenance difficulties.
-mod destory;
+mod destroy;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
mod destory; | |
mod destroy; |
const dataContractRequestV0 = new GetDataContractRequest.GetDataContractRequestV0({ | ||
id: dataContractId.toBuffer(), | ||
}); | ||
|
||
const dataContractRequest = new GetDataContractRequest(); | ||
dataContractRequest.setV0(dataContractRequestV0); | ||
|
||
const dataContractResponse = await driveClient.getDataContract(dataContractRequest); | ||
|
||
const dataContractBuffer = Buffer.from( | ||
dataContractResponse.getV0().getDataContract_asU8(), | ||
); | ||
|
||
const dataContract = await dpp.dataContract.createFromBuffer(dataContractBuffer); | ||
|
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.
🛠️ Refactor suggestion
Cache or reuse data contract retrieval results.
When multiple transitions share the same data contract, repeatedly querying and creating a data contract object may be expensive. Consider caching it to improve performance.
pub fn new( | ||
data_contract: &'a DataContract, | ||
token_position: TokenContractPosition, | ||
issuer_id: Identifier, | ||
amount: TokenAmount, | ||
) -> Self { | ||
// TODO: Validate token position | ||
|
||
Self { | ||
data_contract, | ||
token_position, | ||
issuer_id, | ||
amount, | ||
recipient_id: None, | ||
public_note: None, | ||
settings: None, | ||
user_fee_increase: None, | ||
using_group_info: None, | ||
} | ||
} |
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.
🛠️ Refactor suggestion
Validate token position prior to building.
A TODO at line 39 indicates missing validation logic. Consider adding checks for valid token positions, especially if out-of-range or negative values would cause downstream errors.
/// Start building a mint tokens request for the provided DataContract. | ||
pub fn new( | ||
data_contract: &'a DataContract, | ||
token_position: TokenContractPosition, | ||
sender_id: Identifier, | ||
recipient_id: Identifier, | ||
amount: TokenAmount, | ||
) -> Self { | ||
// TODO: Validate token position | ||
|
||
Self { | ||
data_contract, | ||
token_position, | ||
issuer_id: sender_id, | ||
amount, | ||
recipient_id, | ||
public_note: None, | ||
settings: None, | ||
user_fee_increase: None, | ||
private_encrypted_note: None, | ||
shared_encrypted_note: None, | ||
} | ||
} |
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.
🛠️ Refactor suggestion
Validate token position.
Similar to MintTokensBuilder
, the TODO at line 44 references missing position validation. Consider adding checks to prevent invalid positions from proceeding.
@@ -25,7 +25,7 @@ pub struct TokenTransferTransitionActionV0 { | |||
/// The public note | |||
pub public_note: Option<String>, | |||
/// An optional shared encrypted note | |||
pub shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec<u8>)>, | |||
pub shared_encrypted_note: Option<SharedEncryptedNote>, |
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.
🛠️ Refactor suggestion
Double-check the combination of advanced note fields.
The struct redefines private_encrypted_note
in a partial format. Consider updating it to be fully consistent with the new type.
commit 6776651 Author: QuantumExplorer <[email protected]> Date: Sat Mar 1 22:23:41 2025 +0700 chore: update to latest dash core 37 (#2483) commit 1501103 Merge: a7c7a0f da17fc5 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 14:21:41 2025 +0700 chore: merge master and resolve conflicts (#2481) commit da17fc5 Author: pshenmic <[email protected]> Date: Thu Feb 27 13:31:51 2025 +0700 feat(js-dash-sdk): fix tests after merge commit c7e40cb Merge: c57e8b2 f9eb069 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:35:02 2025 +0700 Merge remote-tracking branch 'origin/chore/merge-master' into chore/merge-master commit c57e8b2 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:34:40 2025 +0700 test(dpp): fix assertion with the same value commit 045b6fa Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:32:33 2025 +0700 chore(dpp): remove unnecessary type conversion commit 8160ccd Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:31:32 2025 +0700 chore: remove duplicated commented code commit f9eb069 Merge: 05d0085 a7c7a0f Author: pshenmic <[email protected]> Date: Wed Feb 26 20:03:00 2025 +0700 Merge branch 'v2.0-dev' into chore/merge-master commit a7c7a0f Author: pshenmic <[email protected]> Date: Wed Feb 26 19:52:02 2025 +0700 build: bump rust version to 1.85 (#2480) commit 05d0085 Merge: bcf1785 196976c Author: Ivan Shumkov <[email protected]> Date: Wed Feb 26 18:03:38 2025 +0700 Merge branch 'master' into v2.0-dev commit bcf1785 Author: lklimek <[email protected]> Date: Fri Feb 21 08:43:35 2025 +0100 feat: wasm sdk build proof-of-concept (#2405) Co-authored-by: Ivan Shumkov <[email protected]> commit 5e32426 Author: Paul DeLucia <[email protected]> Date: Thu Feb 20 19:22:52 2025 +0700 fix: token already paused unpaused and frozen validation (#2466) commit 374a036 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 20 17:46:57 2025 +0700 test: fix slowdown of JS SDK unit tests (#2475) commit 1fed09b Author: Ivan Shumkov <[email protected]> Date: Thu Feb 20 13:46:36 2025 +0700 fix(dpp): invalid feature flag usage (#2477) commit 33507bb Author: Paul DeLucia <[email protected]> Date: Thu Feb 20 13:18:55 2025 +0700 fix: destroy frozen funds used wrong identity and proof verification (#2467) commit 91a9766 Author: Ivan Shumkov <[email protected]> Date: Wed Feb 19 16:57:32 2025 +0700 feat(sdk): return state transition execution error (#2454) commit cb915a7 Author: Ivan Shumkov <[email protected]> Date: Wed Feb 19 16:46:54 2025 +0700 test: fix token history contract tests (#2470) commit 04276d5 Author: Ivan Shumkov <[email protected]> Date: Tue Feb 18 21:00:05 2025 +0700 fix: xss vulnerability in mocha (#2469) commit 196976c Author: pshenmic <[email protected]> Date: Fri Feb 14 18:50:08 2025 +0700 fix(sdk)!: bigint for uint64 values (#2443) commit 0bd29a6 Author: pshenmic <[email protected]> Date: Fri Feb 14 17:29:35 2025 +0700 feat(dpp): extra methods for state transitions in wasm (#2462) commit 1eae781 Author: pshenmic <[email protected]> Date: Fri Feb 14 15:29:17 2025 +0700 chore(platform): npm audit fix (#2463) commit ddf4e67 Author: Ivan Shumkov <[email protected]> Date: Fri Feb 14 11:28:08 2025 +0700 test: fix `fetchProofForStateTransition` tests and warnings (#2460) commit d88ea46 Author: Ivan Shumkov <[email protected]> Date: Fri Feb 14 09:52:53 2025 +0700 fix(dpp): invalid imports and tests (#2459) commit 82e4d4c Merge: 125cfe7 4becf5f Author: Paul DeLucia <[email protected]> Date: Thu Feb 13 19:05:51 2025 +0700 fix: check if token is paused on token transfers (#2458) commit 4becf5f Author: pauldelucia <[email protected]> Date: Thu Feb 13 18:34:24 2025 +0700 add costs commit 907971d Merge: 9026669 125cfe7 Author: Paul DeLucia <[email protected]> Date: Thu Feb 13 18:05:06 2025 +0700 Merge branch 'v2.0-dev' into feat/token-paused-validation commit 125cfe7 Merge: 91f65c6 c286ec0 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 13 15:51:46 2025 +0700 Merge branch 'v2.0-dev' into v2.0-tokens-dev commit 9026669 Author: pauldelucia <[email protected]> Date: Thu Feb 13 13:41:19 2025 +0700 feat: check if token is paused on token transfers commit c286ec0 Author: pshenmic <[email protected]> Date: Wed Feb 12 15:41:21 2025 +0700 feat(sdk): add option to request all keys (#2445) commit 91f65c6 Merge: d6b40e6 1a1c50b Author: Paul DeLucia <[email protected]> Date: Wed Feb 12 12:04:58 2025 +0700 fix: wrong order of parameters in UnauthorizedTokenActionError (#2456) commit 1a1c50b Author: pauldelucia <[email protected]> Date: Wed Feb 12 11:51:31 2025 +0700 fix: wrong order of parameters in UnauthorizedTokenActionError commit 26aff36 Author: lklimek <[email protected]> Date: Tue Feb 11 13:06:54 2025 +0100 build: bump Alpine version to 3.21 (#2074) commit 9daa195 Author: Ivan Shumkov <[email protected]> Date: Tue Feb 11 14:38:55 2025 +0700 ci: use github-hosted arm runner for release workflow (#2452) commit 2b1c252 Author: Paul DeLucia <[email protected]> Date: Tue Feb 4 16:40:34 2025 +0700 fix: proof result error for credit transfers in sdk (#2451) commit d6b40e6 Author: QuantumExplorer <[email protected]> Date: Tue Feb 4 06:49:03 2025 +0700 feat(platform): token distribution part two (#2450) commit 93f7d44 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 29 14:07:55 2025 +0700 fix(dpp): invalid feature flag instructions (#2448) commit 6d5af88 Author: QuantumExplorer <[email protected]> Date: Mon Jan 27 16:59:39 2025 +0700 feat(dpp): token distribution model (#2447) commit e735313 Author: Ivan Shumkov <[email protected]> Date: Mon Jan 27 14:24:26 2025 +0700 feat: add token transitions to SDK and DAPI (#2434) commit 0743be2 Author: pshenmic <[email protected]> Date: Sun Jan 26 22:00:40 2025 +0700 feat(dpp): extra methods for state transitions in wasm (#2401) commit f609bcf Merge: 3733f56 cbddb8d Author: Ivan Shumkov <[email protected]> Date: Fri Jan 24 18:16:38 2025 +0700 Merge branch 'v2.0-dev' into v2.0-tokens-dev commit cbddb8d Author: QuantumExplorer <[email protected]> Date: Fri Jan 24 17:59:16 2025 +0700 chore(platform): make bls sig compatibility an optional feature (#2440) Co-authored-by: Ivan Shumkov <[email protected]> commit 764684b Author: Ivan Shumkov <[email protected]> Date: Fri Jan 24 17:57:27 2025 +0700 chore: ignore deprecated `lodash.get` (#2441) commit 3733f56 Author: QuantumExplorer <[email protected]> Date: Thu Jan 23 09:16:12 2025 +0700 feat(platform)!: enhance token configuration and validation mechanisms (#2439) commit 2480ceb Author: QuantumExplorer <[email protected]> Date: Wed Jan 22 16:33:13 2025 +0700 chore: dapi grpc queries (#2437) commit c9ab154 Author: QuantumExplorer <[email protected]> Date: Wed Jan 22 15:50:25 2025 +0700 feat(platform)!: improved token validation and token config update transition (#2435) commit d9647cc Author: QuantumExplorer <[email protected]> Date: Tue Jan 21 10:28:58 2025 +0700 feat: get proofs for tokens (#2433) commit e5964b8 Author: QuantumExplorer <[email protected]> Date: Mon Jan 20 23:31:50 2025 +0700 feat: group queries (#2432) commit 0220302 Author: QuantumExplorer <[email protected]> Date: Sun Jan 19 14:43:51 2025 +0700 feat(platform): proof verification for many queries and a few more queries (#2431) commit cd1527d Author: QuantumExplorer <[email protected]> Date: Fri Jan 17 19:39:37 2025 +0700 fix(dpp)!: wrapping overflow issue (#2430) commit fd7ee85 Merge: d7143cc e4e156c Author: Ivan Shumkov <[email protected]> Date: Thu Jan 16 21:45:47 2025 +0700 Merge branch 'master' into v1.9-dev commit e4e156c Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 18:11:57 2025 +0700 chore(release): update change log and release v1.8.0 (#2427) Co-authored-by: Ivan Shumkov <[email protected]> commit 55a1e03 Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 15:30:42 2025 +0700 feat(platform)!: token base support (#2383) commit 59bf0af Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 13:10:39 2025 +0700 chore(release): bump to v1.8.0-rc.2 (#2426) commit 410eb09 Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 06:31:26 2025 +0700 fix(drive-abci): rebroadcasting should not only take first 2 quorums too (#2425) commit 2abce8e Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 22:51:58 2025 +0700 chore(release): update changelog and bump version to 1.8.0-rc.1 (#2423) commit ad5f604 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 22:14:13 2025 +0700 chore: update bls library (#2424) commit c6feb5b Author: QuantumExplorer <[email protected]> Date: Wed Jan 15 18:57:49 2025 +0700 feat(platform)!: distribute prefunded specialized balances after vote (#2422) Co-authored-by: Ivan Shumkov <[email protected]> commit 94dcbb2 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 05:51:45 2025 +0700 chore(drive): increase withdrawal limits to 2000 Dash per day (#2287) commit 6a0aede Author: Ivan Shumkov <[email protected]> Date: Tue Jan 14 21:42:59 2025 +0700 chore: fix test suite configuration script (#2402) commit e94b7bb Author: QuantumExplorer <[email protected]> Date: Tue Jan 14 19:23:46 2025 +0700 fix(drive-abci): document purchase on mutable document from different epoch had issue (#2420) commit 4ee57a6 Author: Ivan Shumkov <[email protected]> Date: Tue Jan 14 19:12:20 2025 +0700 fix(drive): more than one key was returned when expecting only one result (#2421) commit be5cd6d Author: Ivan Shumkov <[email protected]> Date: Mon Jan 13 15:12:33 2025 +0700 fix(sdk): failed to deserialize consensus error (#2410) commit e07271e Author: Ivan Shumkov <[email protected]> Date: Mon Jan 13 14:57:08 2025 +0700 chore: resolve NPM audit warnings (#2417) commit a809df7 Author: QuantumExplorer <[email protected]> Date: Sun Jan 12 09:21:48 2025 +0700 test: unify identity versioned cost coverage (#2416) commit 6d637fe Author: Paul DeLucia <[email protected]> Date: Fri Dec 27 09:42:04 2024 -0500 fix: try DriveDocumentQuery from DocumentQuery start field (#2407) commit cfd9c4d Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 18:30:06 2024 +0700 chore(release): update changelog and bump version to 1.8.0-dev.2 (#2404) commit fecda31 Merge: 37d5732 fc7d994 Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 15:33:45 2024 +0700 Merge branch 'master' into v1.8-dev commit fc7d994 Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 14:40:44 2024 +0700 chore(release): update changelog and bump version to 1.7.1 (#2403) commit adcd3b8 Author: QuantumExplorer <[email protected]> Date: Thu Dec 19 09:54:07 2024 +0300 fix!: emergency hard fork to fix masternode voting (#2397) commit 37d5732 Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 22:24:37 2024 +0700 fix(dashmate): some group commands fail with mtime not found (#2400) commit 01a5b7a Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 20:44:44 2024 +0700 refactor(dpp): using deprecated param to init wasm module (#2399) commit c5f5878 Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 18:04:14 2024 +0700 fix(dashmate): local network starting issues (#2394) commit 71c41ff Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 18:03:55 2024 +0700 perf(dpp): reduce JS binding size by 3x (#2396) commit 21ec393 Author: lklimek <[email protected]> Date: Wed Dec 18 10:47:58 2024 +0100 build!: update rust to 1.83 - backport #2393 to v1.7 (#2398) commit d7143cc Author: lklimek <[email protected]> Date: Wed Dec 18 08:53:53 2024 +0100 build!: optimize for x86-64-v3 cpu microarchitecture (Haswell+) (#2374) commit d318b1c Author: lklimek <[email protected]> Date: Tue Dec 17 14:56:15 2024 +0100 build: bump wasm-bindgen to 0.2.99 (#2395) commit 889d192 Author: Ivan Shumkov <[email protected]> Date: Tue Dec 17 19:25:58 2024 +0700 chore(release): update changelog and bump version to 1.8.0-dev.1 (#2391) commit 8185d21 Author: lklimek <[email protected]> Date: Tue Dec 17 10:47:53 2024 +0100 feat(sdk)!: allow setting CA cert (#1924) commit 82a6217 Author: lklimek <[email protected]> Date: Tue Dec 17 02:51:18 2024 +0100 build!: update rust to 1.83 (#2393) commit 494054a Author: QuantumExplorer <[email protected]> Date: Mon Dec 16 13:47:58 2024 +0300 refactor(platform): replace bls library (#2257) Co-authored-by: Lukasz Klimek <[email protected]> commit 4c203e4 Author: lklimek <[email protected]> Date: Mon Dec 16 10:38:34 2024 +0100 test(sdk): generate test vectors using testnet (#2381) commit 0ff6b27 Author: lklimek <[email protected]> Date: Mon Dec 16 10:37:35 2024 +0100 chore: remove deprecated check_network_version.sh (#2084) commit b265bb8 Author: lklimek <[email protected]> Date: Fri Dec 13 13:25:40 2024 +0100 ci: fix artifact upload issue on release build (#2389) commit 40ae73f Author: Ivan Shumkov <[email protected]> Date: Fri Dec 13 17:35:40 2024 +0700 chore(release): update changelog and bump version to 1.7.0 (#2387) commit 257e3da Author: Ivan Shumkov <[email protected]> Date: Fri Dec 13 15:44:10 2024 +0700 chore(dashmate)!: update Core to version 22 (#2384) commit 19a4c6d Author: Ivan Shumkov <[email protected]> Date: Thu Dec 12 18:30:14 2024 +0700 chore(dashmate): set tenderdash version to 1 (#2385) commit 0e9d4dc Author: lklimek <[email protected]> Date: Thu Dec 12 11:39:35 2024 +0100 chore: address vulnerabilty GHSA-mwcw-c2x4-8c55 (#2382) Co-authored-by: Ivan Shumkov <[email protected]> commit bdae90c Author: Ivan Shumkov <[email protected]> Date: Thu Dec 12 13:36:04 2024 +0700 chore(dashmate): increase subsidy for devnet (#2353)
Issue being fixed or feature implemented
We would like to broadcast token transitions with SDK
What was done?
waitFotStateTransitionResult
endpoint in DPPwaitFotStateTransitionResult
endpoint in DPP to handle token transitionsHow Has This Been Tested?
None
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
Based on the comprehensive summary, here are the concise release notes:
New Features
Improvements
Technical Updates