Create execution helpers #130
Labels
backlog
Items planned to be done, but with no milestone yet
enhancement
New feature or request
requested
Milestone
Very similar to query helpers described in #28, but this time for helping execution.
The executor helpers should provide functions returning prepared
CosmosMsg
orSubMsg
.The executor would be a trait generated from interfaces/contracts and implemented probably directly on the
Remote
struct (unless some additional data would be needed there, likeQuerierWrapper
for queries). Single executor keeps all theexec
functions callable on the contract, with signatures similar to those in mt helpers.Similarly, as in MT helpers, it would give back the
#[must_use]
proxy type, which would use a builder pattern to provide metadata - I think only thefunds
field would be addable to create a simple message, but it should also contain thereply_on
function:Which returns another proxy object (let's call it submsg proxy for now), building
SubMsg
instead ofMsg
- any non-sub-msg fields (funds
in particular) should be set before calling thereply_on
.Both execution proxy and submsg proxy should contain a
fn message(self) -> ...
function (notcall()
like in mt - call is not happening at this point), which returns a message to be passed intoResponse::add_message()
orResponse::add_submessage()
. I would also opt for adding afn schedule(self, response: Response) -> Response
immediately adding the message into the response, which sometimes might be a shortcut.Executor
struct from the contract type #132Executor
trait on the contractRemote
type #133Executor
struct from the interface trait #134Exexutor
trait on the traitRemote
type #135Executor
trait on the contractRemote
type #136The text was updated successfully, but these errors were encountered: