Skip to content

Commit 0af0363

Browse files
committed
feat: add enhanced NatSpec for event type constants
1 parent e800744 commit 0af0363

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

packages/ucef/contracts/UCEF.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,21 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
4242
*/
4343
abstract contract UCEF is ERC20 {
4444
// Event type constants for Private Events
45+
/**
46+
* @notice Transfer event parameter mapping:
47+
* - address param0: from - Token sender (address(0) for minting)
48+
* - address param1: to - Token receiver (address(0) for burning)
49+
* - uint256 param2: value - Amount of tokens transferred
50+
* @custom:signature Transfer(address from, address to, uint256 value)
51+
*/
4552
bytes32 public constant EVENT_TYPE_TRANSFER = keccak256("Transfer(address,address,uint256)");
53+
/**
54+
* @notice Approval event parameter mapping:
55+
* - address param0: from - Token sender (address(0) for minting)
56+
* - address param1: to - Token receiver (address(0) for burning)
57+
* - uint256 param2: value - Amount of tokens approved
58+
* @custom:signature Approval(address from, address to, uint256 value)
59+
*/
4660
bytes32 public constant EVENT_TYPE_APPROVAL = keccak256("Approval(address,address,uint256)");
4761

4862
mapping(address account => uint256) private _balances;

packages/ucef/contracts/UCEFRegulated.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ import {UCEF} from "./UCEF.sol";
3131
*/
3232
contract UCEFRegulated is UCEF {
3333
// Event type constant for Private Events
34+
/**
35+
* @notice RegulatorUpdated event parameter mapping:
36+
* - address param0: previousRegulator - Address of the previous regulator
37+
* - address param1: newRegulator - Address of the new regulator
38+
* @custom:signature RegulatorUpdated(address previousRegulator, address newRegulator)
39+
*/
3440
bytes32 public constant EVENT_TYPE_REGULATOR_UPDATED = keccak256("RegulatorUpdated(address,address)");
3541

3642
address private _regulator;

packages/ucef/contracts/UCEFSharable.sol

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,20 @@ import {UCEF} from "./UCEF.sol";
3434
*/
3535
contract UCEFSharable is UCEF {
3636
// Event type constants for Private Events
37+
/**
38+
* @notice ViewerPermissionUpdated event parameter mapping:
39+
* - address param0: account - The account whose balance viewing permissions were modified
40+
* - address param1: viewer - The address that was granted or revoked viewing permission
41+
* - bool param2: status - The new permission status (true for granted, false for revoked)
42+
* @custom:signature ViewerPermissionUpdated(address account, address viewer, bool status)
43+
*/
3744
bytes32 public constant EVENT_TYPE_VIEWER_PERMISSION_UPDATED = keccak256("ViewerPermissionUpdated(address,address,bool)");
45+
/**
46+
* @notice SupervisorUpdated event parameter mapping:
47+
* - address param0: previousSupervisor - Address of the previous supervisor
48+
* - address param1: newSupervisor - Address of the new supervisor (zero address means supervision permanently disabled)
49+
* @custom:signature SupervisorUpdated(address previousSupervisor, address newSupervisor)
50+
*/
3851
bytes32 public constant EVENT_TYPE_SUPERVISOR_UPDATED = keccak256("SupervisorUpdated(address,address)");
3952

4053
// Mapping from account address to viewer address to permission status

0 commit comments

Comments
 (0)