Skip to content

Commit

Permalink
Add event when the EMP private key is submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJem committed Jun 7, 2024
1 parent 0ebe93b commit da328d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/interfaces/modules/auctions/IEncryptedMarginalPrice.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ interface IEncryptedMarginalPrice {

// ========== EVENTS ========== //

/// @notice Emitted when a bid is decrypted
///
/// @param lotId The lot ID
/// @param bidId The bid ID
/// @param amountIn The amount in
/// @param amountOut The amount out
event BidDecrypted(
uint96 indexed lotId, uint64 indexed bidId, uint96 amountIn, uint96 amountOut
);

/// @notice Emitted when the private key for an auction lot is submitted
///
/// @param lotId The lot ID
event PrivateKeySubmitted(uint96 indexed lotId);

// ========== DATA STRUCTURES ========== //

/// @notice Parameters that are used to set auction-specific data
Expand Down
2 changes: 2 additions & 0 deletions src/modules/auctions/batch/EMP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ contract EncryptedMarginalPrice is BatchAuctionModule, IEncryptedMarginalPrice {

// Decrypt and sort bids
_decryptAndSortBids(lotId_, num_, sortHints_);

emit PrivateKeySubmitted(lotId_);
}

/// @inheritdoc IEncryptedMarginalPrice
Expand Down

0 comments on commit da328d5

Please sign in to comment.