-
Notifications
You must be signed in to change notification settings - Fork 124
Labels
standardsRelated to standard note scripts or account componentsRelated to standard note scripts or account components
Milestone
Description
I think we need ~3 helpers in miden::standards::network_account_target, something like:
const ATTACHMENT_SCHEME = NetworkAccountTarget::ATTACHMENT_SCHEMEget_id(NoteAttachment) -> AccountId- This asserts
attachment_scheme == NetworkAccountTarget::ATTACHMENT_SCHEME. - This assumes the attachment scheme was checked and simply returns the account ID. We may want to validate the account ID before returning?
- A getter for note execution hint may not be necessary.
- This asserts
new(AccountID, NoteExecutionMode) -> NoteAttachment- Looks like that's not necessary for this PR, but you're creating network notes in the bridge_out.masm using the note tag, which should be replaced with a call to this function.
Then you can just use network_account_target::get_id here. The constant is useful to add in case some other code wants to inspect the attachment scheme and branch on it instead of panicking (which is what get_id would do). I think this will be needed in other places so there is a benefit of moving this to miden::standards, and avoids low-level code here.
Originally posted by @PhilippGackstatter in #2334 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
standardsRelated to standard note scripts or account componentsRelated to standard note scripts or account components