1

A couple of months back, I asked this about off-chain views (here).

Now, on the Hangzhou testnet, synchronous on-chain views are supported. (smartpy documentation). Do these views provide synchronicity guarantees? That is, if contract A needs to check token ownership from contract B, would it be possible to have a race condition where the ownership of a token changes before a transaction on contract A is finalized?

1 Answer 1

1

On-chain views are synchronous so you’re mostly good (as good as with regular entry points but even simpler).

However, there are subtle scenarios that can go wrong depending on the assumptions that you make : you should not assume in general that balance is synchronized with state (it’s not) or that no operation is pending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.