Skip to content

Commit

Permalink
AA-382: Emit system-level events for RIP-7560 transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Aug 26, 2024
1 parent 71bde73 commit f3d8a5b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions contracts/interfaces/IRip7560EntryPoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

0 comments on commit f3d8a5b

Please sign in to comment.