-
Notifications
You must be signed in to change notification settings - Fork 95
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
Support of the multi-assets per contract #506
Conversation
- Added a new `Mint` and `Burn` receipts with serialization nand deserialization. - `mint` and `burn` opcodes accept a new `$rB` register - `sub_id` - `mint` and `burn` opcodes produces receipts now.
ReceiptRepr::Mint as u8, | ||
); | ||
|
||
bytes::store_at(buf, S::layout(S::LAYOUT.sub_id), sub_id); |
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.
Why do we put sub id before contract id?
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.
pub(crate) fn mint(&mut self, a: Word, b: Word) -> Result<(), RuntimeError> { | ||
let (SystemRegisters { fp, pc, is, .. }, _) = | ||
split_registers(&mut self.registers); | ||
MindCtx { |
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.
Mint
/// Trait extends the functionality of the `ContractId` type. | ||
pub trait ContractIdExt { | ||
/// Creates an `AssetId` from the `ContractId` and `sub_id`. | ||
fn asset_id(&self, sub_id: &Bytes32) -> AssetId; |
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.
Is it worth reusing AssetID
here for sub_id
, or maybe creating a type/type alias for SubId
?
Closes #496
Mint
andBurn
receipts with serialization and deserialization.mint
andburn
opcodes accept a new$rB
register -sub_id
mint
andburn
opcodes produce receipts now.