origin-playground
origin-playground copied to clipboard
[Question] execute method require statement: is it needed?
At the beginning of the execute method, there's the following require
statement:
require(!executions[executionNonce].executed, "Already executed");
However, I'm still trying to wrap my head around this line. Is it actually possible that the execution task with the current global nonce is already executed? My impression is that executionNonce
always points to the next execution id yet to be added. How can it have already been executed if there's still no execution requested with such id yet (otherwise executionNonce
would have been incremented already)?
Am I missing something? Is this some sort of concurrency check? (if that makes any sense in solidity)
Can you please clarify? Thanks in advance.