Skip to main content

DeployerExt

Trait DeployerExt 

Source
pub trait DeployerExt: Sized {
    type Contract: OdraContract + 'static + Deployer<Self::Contract>;

    // Provided methods
    fn load_or_deploy(
        env: &HostEnv,
        args: <<Self as DeployerExt>::Contract as OdraContract>::InitArgs,
        container: &mut DeployedContractsContainer,
        gas: u64,
    ) -> Result<<<Self as DeployerExt>::Contract as OdraContract>::HostRef, Error> { ... }
    fn load_or_deploy_with_cfg(
        env: &HostEnv,
        package_name: Option<String>,
        args: <<Self as DeployerExt>::Contract as OdraContract>::InitArgs,
        cfg: InstallConfig,
        container: &mut DeployedContractsContainer,
        gas: u64,
    ) -> Result<<<Self as DeployerExt>::Contract as OdraContract>::HostRef, Error> { ... }
}
Expand description

Trait that extends the functionality of OdraContract to include deployment capabilities.

Required Associated Types§

Source

type Contract: OdraContract + 'static + Deployer<Self::Contract>

Contract that implements OdraContract and Deployer for Self

Provided Methods§

Source

fn load_or_deploy( env: &HostEnv, args: <<Self as DeployerExt>::Contract as OdraContract>::InitArgs, container: &mut DeployedContractsContainer, gas: u64, ) -> Result<<<Self as DeployerExt>::Contract as OdraContract>::HostRef, Error>

Load an existing contract instance from container or deploy a new one.

Source

fn load_or_deploy_with_cfg( env: &HostEnv, package_name: Option<String>, args: <<Self as DeployerExt>::Contract as OdraContract>::InitArgs, cfg: InstallConfig, container: &mut DeployedContractsContainer, gas: u64, ) -> Result<<<Self as DeployerExt>::Contract as OdraContract>::HostRef, Error>

Load an existing contract instance from container or deploy a new one with a custom configuration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: OdraContract + Deployer<T> + 'static> DeployerExt for T