pub struct OdraCli { /* private fields */ }Expand description
Command line interface for Odra smart contracts.
Implementations§
Source§impl OdraCli
impl OdraCli
Sourcepub fn contract<T: SchemaEntrypoints + SchemaCustomTypes + OdraContract>(
self,
) -> Self
pub fn contract<T: SchemaEntrypoints + SchemaCustomTypes + OdraContract>( self, ) -> Self
Adds a contract to the CLI.
Generates a subcommand for the contract with all of its entry points except the init entry point.
To call the constructor of the contract, implement and register the DeployScript.
Sourcepub fn deploy(self, script: impl DeployScript + 'static) -> Self
pub fn deploy(self, script: impl DeployScript + 'static) -> Self
Adds a deploy script to the CLI.
There is only one deploy script allowed in the CLI.
Sourcepub fn scenario<S: ScenarioMetadata + Scenario>(self, scenario: S) -> Self
pub fn scenario<S: ScenarioMetadata + Scenario>(self, scenario: S) -> Self
Adds a scenario to the CLI.
Scenarios are user-defined commands that can be run from the CLI. If there is a complex set of commands that need to be run in a specific order, a scenario can be used to group them together.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OdraCli
impl !RefUnwindSafe for OdraCli
impl !Send for OdraCli
impl !Sync for OdraCli
impl Unpin for OdraCli
impl !UnwindSafe for OdraCli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more