Update comment once we learn how CosmWasm message ordering works
0xekez opened this issue · 1 comments
0xekez commented
i think the CosmWasm documentation and code are a little self-contradictory about message ordering. this doesn't impact the functionality of this contract, but we'll need to update a comment in the code depending on the outcome of this:
the comment:
Art3miX commented
If I understand the code correctly, there is 1 messages Vec, add_*
functions are just helpers to append messages without the SubMsg wrapper.
Its safe to assume messages[0] will be called first and messages[1] second.
I wonder if it follows the whole tree of the SubMsg first, so if messages[0] has another SubMsg in it, will messages[0][0] be called before messages[1]? can we assume messages[0] full tree of messages is finished before messages[1] is called?