Can someone explain in more info how the attack on flip coins was done, so we can educate ourselves on how that works? How can you simulate the transaction before you send it?
It's not simulate per say, but when you call a SC from another SC in the same shard, the calls are done sync, so in the same transaction.
So in SC 1 you can have it call SC 2 and then check for the result. If the result is not convenient for you, SC 1 transaction throws an error which will automatically revert the SC 2 transaction since it was done synchronously (because on the same shard).
This is because the blockchain always reverts everything in a transaction that is synchronous. (not cross shard)
It's not simulate per say, but when you call a SC from another SC in the same shard, the calls are done sync, so in the same transaction. So in SC 1 you can have it call SC 2 and then check for the result. If the result is not convenient for you, SC 1 transaction throws an error which will automatically revert the SC 2 transaction since it was done synchronously (because on the same shard). This is because the blockchain always reverts everything in a transaction that is synchronous. (not cross shard)