Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enforces a fixed 65-byte format for the asset_id by updating the asset_digest function signature and modifying the asset ID encoding in the derive method.
- Change asset_digest parameter type from Vec to [u8; 65].
- Update the construction of the asset ID in derive() to use a fixed-size array.
- Adjust in-code comments to align with the new fixed-size asset representation.
Collaborator
ConstanceBeguier
left a comment
There was a problem hiding this comment.
Replace asset_id with AssetBase in the following comments
impl AssetBase {
/// Deserialize the asset_id from a byte array.
pub fn from_bytes(bytes: &[u8; 32]) -> CtOption<Self> {
pallas::Point::from_bytes(bytes).map(AssetBase)
}
/// Serialize the asset_id to its canonical byte representation.
pub fn to_bytes(self) -> [u8; 32] {
self.0.to_bytes()
}
```
ConstanceBeguier
approved these changes
May 5, 2025
Collaborator
ConstanceBeguier
left a comment
There was a problem hiding this comment.
Approved after taking previous minor comments into account.
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.
Uh oh!
There was an error while loading. Please reload this page.