Skip to content
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

odra-cli #481

Open
zie1ony opened this issue Jun 11, 2024 · 0 comments
Open

odra-cli #481

zie1ony opened this issue Jun 11, 2024 · 0 comments

Comments

@zie1ony
Copy link
Contributor

zie1ony commented Jun 11, 2024

Simplify a process of creating CLI layer for Odra contracts.

Insipiration:

trait CLITask {
    fn execute(&self);
}

#[odra::cli_task]
pub struct MintTokensTask {
    pub recipient: Address,
    pub amount: u64,
}

impl CLITask for MintTokensTask {
    fn execute(&self) {
        
    }
}

struct OdraCLI;

impl OdraCLI {
    fn add_task(&self, task: impl CLITask) {
        // task.execute();
    }
}

fn main_() {
    OdraCLI.with_task(MintTokensTask).parser()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Discuss
Development

No branches or pull requests

1 participant