https://s2-labs.com/developer-tutorials/transaction-control-and-rollback/