Add a bitmask of OutInstruction events to Executed

Allows explorers to provide clarity on what occurred.
This commit is contained in:
Luke Parker
2024-11-02 21:00:01 -04:00
parent 2920987173
commit 834c16930b
2 changed files with 87 additions and 59 deletions

View File

@@ -22,7 +22,14 @@ interface IRouterWithoutCollisions {
/// @notice Emitted when a batch of `OutInstruction`s occurs
/// @param nonce The nonce consumed to execute this batch of transactions
/// @param messageHash The hash of the message signed for the executed batch
event Executed(uint256 indexed nonce, bytes32 indexed messageHash);
/**
* @param results The result of each `OutInstruction` executed. This is a bitmask with true
* representing success and false representing failure. The high bit (1 << 7) in the first byte
* is used for the first `OutInstruction`, before the next bit, and so on, before the next byte.
* An `OutInstruction` is considered as having succeeded if the call transferring ETH doesn't
* fail, the ERC20 transfer doesn't fail, and any executed code doesn't revert.
*/
event Executed(uint256 indexed nonce, bytes32 indexed messageHash, bytes results);
/// @notice Emitted when `escapeHatch` is invoked
/// @param escapeTo The address to escape to