diff --git a/contracts/interfaces/IRip7560EntryPoint.sol b/contracts/interfaces/IRip7560EntryPoint.sol index 1929d8b..b990281 100644 --- a/contracts/interfaces/IRip7560EntryPoint.sol +++ b/contracts/interfaces/IRip7560EntryPoint.sol @@ -6,4 +6,53 @@ interface IRip7560EntryPoint { function sigFailAccount(uint256 validAfter, uint256 validUntil) external; function acceptPaymaster(uint256 validAfter, uint256 validUntil, bytes calldata context) external; function sigFailPaymaster(uint256 validAfter, uint256 validUntil, bytes calldata context) external; + + + /*** + * An event emitted after each successful request. + * @param sender - The account that generates this request. + * @param paymaster - If non-null, the paymaster that pays for this request. + * @param deployer - If non-null, the deployer that creates the sender contract. + * @param nonce - The nonce value from the request. + * @param success - True if the sender transaction succeeded, false if reverted. + * @param actualGasCost - Actual amount paid (by account or paymaster) for this UserOperation. + * @param actualGasUsed - Total gas used by this UserOperation (including preVerification, creation, + * validation and execution). + */ + + event RIP7560TransactionEvent( + address indexed sender, + address indexed paymaster, + address indexed deployer, + uint256 nonce, + bool success, + uint256 actualGasCost, + uint256 actualGasUsed + ); + + /** + * An event emitted if the RIP-7560 transaction "executionData" reverted with non-zero length. + * @param sender - The sender of this request. + * @param nonce - The nonce used in the request. + * @param revertReason - The return bytes from the reverted "executionData" call. + */ + event RIP7560TransactionRevertReason( + address indexed sender, + uint256 nonce, + bytes revertReason + ); + + /** + * An event emitted if the RIP-7560 transaction Paymaster's "postOp" call reverted with non-zero length. + * @param sender - The sender of this request. + * @param paymaster - The paymaster that pays for this request. + * @param nonce - The nonce used in the request. + * @param revertReason - The return bytes from the reverted call to "postOp". + */ + event RIP7560TransactionPostOpRevertReason( + address indexed sender, + address indexed paymaster, + uint256 nonce, + bytes revertReason + ); }