-
In js-sdk the cross-contract calls are going to be synchronous, and I got curious on how this is implemented. Imagine I have the following situation:
But DEX-1 and DEX-2 live in the asynch world, how is this situation handled?. I assume that DEX-1 and DEX-2 are executed within the JS VM node... no? So, we have a "sync" node that makes everything and then coordinates with the "async" nodes to keep states consistent? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@ailisp answered: Yes
@ailisp I have a follow up question: If |
Beta Was this translation helpful? Give feedback.
@ailisp answered: Yes
Your contract will like this:
@ailisp I have a follow up question: If
near.jsvmCall('DEX-2', 'method2', args2)
fails, then the first one is rolled back and nothing gets saved to state, right?