Pre Phase

The pre phase is executed after the prepare phase, and is used for checking if explicit conditions hold before executing the remainder of the transaction. A common example would be checking requisite balances before transferring tokens between accounts.

pre {
    sendingAccount.balance > 0
}

If the pre phase throws an error, or does not return true the remainder of the transaction is not executed and it will be completely reverted.

Last updated