Struct cw_multi_test::ContractWrapper [−][src]
pub struct ContractWrapper<T1, T2, T3, E1, E2, E3, C = Empty, T4 = Empty, E4 = String, E5 = String, T6 = Empty, E6 = String> where
T1: DeserializeOwned,
T2: DeserializeOwned,
T3: DeserializeOwned,
T4: DeserializeOwned,
T6: DeserializeOwned,
E1: ToString,
E2: ToString,
E3: ToString,
E4: ToString,
E5: ToString,
E6: ToString,
C: Clone + Debug + PartialEq + JsonSchema, { /* fields omitted */ }
Expand description
Wraps the exported functions from a contract and provides the normalized format Place T4 and E4 at the end, as we just want default placeholders for most contracts that don’t have sudo
Implementations
impl<T1, T2, T3, E1, E2, E3, C> ContractWrapper<T1, T2, T3, E1, E2, E3, C> where
T1: DeserializeOwned + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
E1: ToString + 'static,
E2: ToString + 'static,
E3: ToString + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
impl<T1, T2, T3, E1, E2, E3, C> ContractWrapper<T1, T2, T3, E1, E2, E3, C> where
T1: DeserializeOwned + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
E1: ToString + 'static,
E2: ToString + 'static,
E3: ToString + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
pub fn new(
execute_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<C>, E1>,
instantiate_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<C>, E2>,
query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>
) -> Self
pub fn new_with_empty(
execute_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<Empty>, E1>,
instantiate_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<Empty>, E2>,
query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>
) -> Self
pub fn new_with_empty(
execute_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<Empty>, E1>,
instantiate_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<Empty>, E2>,
query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>
) -> Self
this will take a contract that returns Response