odra_cli/
lib.rs

1//! A rust library for building command line interfaces for Odra smart contracts.
2//!
3//! The Odra CLI is a command line interface built on top of the [clap] crate
4//! that allows users to interact with smart contracts.
5
6#![feature(box_patterns, error_generic_member_access)]
7mod cli;
8mod cmd;
9mod container;
10mod custom_types;
11mod entry_point;
12mod parser;
13#[cfg(test)]
14mod test_utils;
15mod types;
16mod utils;
17
18pub use cli::OdraCli;
19pub use cmd::args::CommandArg;
20pub use container::{ContractProvider, DeployedContractsContainer};
21pub use utils::{log, DeployerExt};
22
23pub mod scenario {
24    //! Traits and structs for defining custom scenarios.
25    //!
26    //! A scenario is a user-defined set of actions that can be run in the Odra CLI.
27    //! If you want to run a custom scenario that calls multiple entry points,
28    //! you need to implement the [Scenario] and [ScenarioMetadata] traits.
29    pub use crate::cmd::{
30        Scenario, ScenarioArgs as Args, ScenarioError as Error, ScenarioMetadata
31    };
32}
33
34pub mod deploy {
35    //! Traits and structs for defining deploy scripts.
36    //!
37    //! In a deploy script, you can define the contracts that you want to deploy to the blockchain
38    //! and write metadata to the container.
39    pub use crate::cmd::{DeployError as Error, DeployScript};
40}