You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something that I find I would like to do often is bundle multiple types of messages together inside a vec and send them off. May want to send a wasm store_code, instantiate, then execute for example. It would be even better if this was inside the same tx. This could be achieved with a trait that look like this:
pubtraitRequest{fnto_any(&self,sender_addr:Address) -> DeployResult<Any>;}impl<S>RequestforExecRequest<S>whereS:Serialize + Clone + 'static,{fnto_any(&self,sender_addr:Address) -> DeployResult<Any>{let proto = self.clone().to_proto(sender_addr)?;let any = proto.to_any()?;Ok(any)}}impl<S>RequestforStoreCodeRequest<S>{
...
}
Then one could simply pass a vec of these Request objects to an execute function that takes in a Vec<&dyn Request>
The text was updated successfully, but these errors were encountered:
Something that I find I would like to do often is bundle multiple types of messages together inside a vec and send them off. May want to send a wasm store_code, instantiate, then execute for example. It would be even better if this was inside the same tx. This could be achieved with a trait that look like this:
Then one could simply pass a vec of these Request objects to an execute function that takes in a Vec<&dyn Request>
The text was updated successfully, but these errors were encountered: