Skip to content

Commit

Permalink
Merge pull request #263 from zama-ai/newEvents
Browse files Browse the repository at this point in the history
feat: new events for TFHEExecutor
  • Loading branch information
jatZama authored Jan 22, 2025
2 parents 6d6f6f5 + 839b4d1 commit 224468e
Show file tree
Hide file tree
Showing 9 changed files with 1,278 additions and 1,448 deletions.
12 changes: 10 additions & 2 deletions contracts/contracts/ACL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ contract ACL is UUPSUpgradeable, Ownable2StepUpgradeable {
error SenderNotAllowed(address sender);

/// @notice Emitted when a list of handles is allowed for decryption.
/// @param caller account calling the allowForDecryption function.
/// @param handlesList List of handles allowed for decryption.
event AllowedForDecryption(uint256[] handlesList);
event AllowedForDecryption(address indexed caller, uint256[] handlesList);

/// @notice Emitted when a handle is allowed.
/// @param caller account calling the allow function.
/// @param account account being allowed for the handle.
/// @param handle handle being allowed.
event Allowed(address indexed caller, address indexed account, uint256 handle);

/// @notice Emitted when a new delegate address is added.
/// @param sender Sender address
Expand Down Expand Up @@ -76,6 +83,7 @@ contract ACL is UUPSUpgradeable, Ownable2StepUpgradeable {
revert SenderNotAllowed(msg.sender);
}
$.persistedAllowedPairs[handle][account] = true;
emit Allowed(msg.sender, account, handle);
}

/**
Expand All @@ -92,7 +100,7 @@ contract ACL is UUPSUpgradeable, Ownable2StepUpgradeable {
}
$.allowedForDecryption[handle] = true;
}
emit AllowedForDecryption(handlesList);
emit AllowedForDecryption(msg.sender, handlesList);
}

/**
Expand Down
748 changes: 138 additions & 610 deletions contracts/contracts/TFHEExecutor.sol

Large diffs are not rendered by default.

Loading

0 comments on commit 224468e

Please sign in to comment.