#[note]Expand description
Marks a type/impl as a note script definition.
This attribute is intended to be used on:
- a note input type definition (
struct MyNote { ... }) - the associated inherent
implblock that contains an entrypoint method annotated with#[note_script]
§Example
ⓘ
use miden::*;
use crate::bindings::Account;
#[note]
struct MyNote {
recipient: AccountId,
}
#[note]
impl MyNote {
#[note_script]
pub fn run(self, _arg: Word, account: &mut Account) {
assert_eq!(account.get_id(), self.recipient);
}
}