Trait boot_core::CallAs

source ·
pub trait CallAs<Chain: CwEnv>: BootExecute<Chain> + ContractInstance<Chain> + Clone {
    type Sender: Clone;

    // Required methods
    fn set_sender(&mut self, sender: &Self::Sender);
    fn call_as(&self, sender: &Self::Sender) -> Self;
}
Expand description

Call a contract with a different sender Clones the contract interface to prevent mutation of the original

Required Associated Types§

Required Methods§

source

fn set_sender(&mut self, sender: &Self::Sender)

Set the sender for the contract

source

fn call_as(&self, sender: &Self::Sender) -> Self

Call a contract as a different sender.
Creates a new copy of the contract with a different sender

Implementors§