pub trait TxHandler: ChainState + Clone {
type Response: IndexResponse + Debug;
fn sender(&self) -> Addr;
fn wait_blocks(&self, amount: u64) -> Result<(), BootError>;
fn next_block(&self) -> Result<(), BootError>;
fn execute<E: Serialize + Debug>(
&self,
exec_msg: &E,
coins: &[Coin],
contract_address: &Addr
) -> Result<Self::Response, BootError>;
fn instantiate<I: Serialize + Debug>(
&self,
code_id: u64,
init_msg: &I,
label: Option<&str>,
admin: Option<&Addr>,
coins: &[Coin]
) -> Result<Self::Response, BootError>;
fn query<Q: Serialize + Debug, T: Serialize + DeserializeOwned>(
&self,
query_msg: &Q,
contract_address: &Addr
) -> Result<T, BootError>;
fn migrate<M: Serialize + Debug>(
&self,
migrate_msg: &M,
new_code_id: u64,
contract_address: &Addr
) -> Result<Self::Response, BootError>;
fn upload(
&self,
contract_source: &mut ContractCodeReference<Empty>
) -> Result<Self::Response, BootError>;
}
Expand description
Signer trait for chains. Accesses the sender information from the chain object to perform actions.