pub trait ContractInteractive: Send + Sync + Debug + Display + FromStr<Err = ParseError> + IntoEnumIterator + 'static {
    // Required method
    fn admin(&self) -> String;

    // Provided methods
    fn name(&self) -> String { ... }
    fn bin_name(&self) -> String { ... }
    fn path(&self) -> PathBuf { ... }
    fn instantiate(&self) -> Result<Box<dyn Msg>> { ... }
    fn execute(&self) -> Result<Box<dyn Msg>> { ... }
    fn query(&self) -> Result<Box<dyn Msg>> { ... }
    fn migrate(&self) -> Result<Box<dyn Msg>> { ... }
    fn cw20_send(&self) -> Result<Box<dyn Msg>> { ... }
}

Required Methods§

source

fn admin(&self) -> String

This is the address of the contract admin. It is required when instantiating.

Provided Methods§

source

fn name(&self) -> String

This is the name of the contract and represents how it will appear in the cli.

source

fn bin_name(&self) -> String

This is the name of the generated binary. It defaults to the contract name. If you have multiple contracts that share the same code then you can use this, in conjunction with the path method.

source

fn path(&self) -> PathBuf

This method allows for customizing the path to the contract. This should be the path relative to the project root.

source

fn instantiate(&self) -> Result<Box<dyn Msg>>

This method allows instantiating a contract interactively. interactive-parse should be used to generate the msg.

source

fn execute(&self) -> Result<Box<dyn Msg>>

This method allows executing a contract interactively. interactive-parse should be used to generate the msg.

source

fn query(&self) -> Result<Box<dyn Msg>>

This method allows querying a contract interactively. interactive-parse should be used to generate the msg.

source

fn migrate(&self) -> Result<Box<dyn Msg>>

This method allows migrating a contract interactively. interactive-parse should be used to generate the msg.

source

fn cw20_send(&self) -> Result<Box<dyn Msg>>

This method allows sending a cw20 token with an attached message to a contract interactively. interactive-parse should be used to generate the msg.

Implementors§