Note that this only works in internal contexts.
to prevent reentrancy: assert(!is_reentrant());
A reentrancy check for use in Sway contracts.
Returns true
if the reentrancy pattern is detected, and false
otherwise.
Reverts if the reentrancy pattern is detected in the contract in which this is called.