cosmwasm
cosmwasm copied to clipboard
Improve another smart contract or inter-call function call handling
The method of calling other smart contracts or inter-call is a message driven method, so development is difficult.
The following is how to call another smart contract.
- Call the contract and function to be called with
add_submessage
containing the identifying value to be returned inmsg
in a message driven way. - The called function is executed by message driven and the result is sent back as a response message.
- The response message with identifying value triggers the response of the called smart contract.
Problem
- It is difficult to process the response by calling or inter-calling the functions of other smart contracts.
- It is difficult to apply a local variable before a function call after a function call(no support closure)
- Response processing is complicated because all responses are delivered through the
reply
function.