Finschia / cosmwasm

Fast and reusable WebAssembly smart contract runtime(and library) for finschia-sdk.
Apache License 2.0
27 stars 14 forks source link

Improve another smart contract or inter-call function call handling #144

Closed zemyblue closed 3 months ago

zemyblue commented 2 years ago

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.

  1. Call the contract and function to be called with add_submessage containing the identifying value to be returned in msg in a message driven way.
  2. The called function is executed by message driven and the result is sent back as a response message.
  3. The response message with identifying value triggers the response of the called smart contract.

Problem

  1. It is difficult to process the response by calling or inter-calling the functions of other smart contracts.
  2. It is difficult to apply a local variable before a function call after a function call(no support closure)
  3. Response processing is complicated because all responses are delivered through the reply function.