Skip to content

CLI-only entrypoints #594

@zie1ony

Description

@zie1ony

Sometimes it is useful to have some data getter, that not need to be deployed as entrypoint on chain.

Possible solution via labeling methods, but this might be tricky with traits, like we had problems when designing migrate method.

#[odra::module]
struct A {}

#[odra::module]
impl A {
    #[odra::cli]
    pub fn a(&self) -> u8 { 8u8 }
}

Or we allow for other impl.

#[odra::cli]
impl A {
    pub fn a(&self) -> u8 { 8u8 }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 Discuss

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions