Skip to content

Make run into MyNote::run marked with #[entrypoint] attribute macro #845

@greenhat

Description

@greenhat

From #787 (comment) the ergonomics we're looking for should look like:

#[note]
struct MyNote {
    recipient: AccountId,
}

#[note]
impl MyNote {

    #[entrypoint]
    pub fn run(&self, account: &BasicWallet, _args: Word) {
        assert_eq!(self.recipient, account.id());

        ...
    }   
}

Metadata

Metadata

Assignees

Labels

rustRelated to the Rust and SDK ergonomicssdkRust SDK related functionality

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions