-
Notifications
You must be signed in to change notification settings - Fork 25
/
HatsEvents.sol
88 lines (76 loc) · 3.86 KB
/
HatsEvents.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// SPDX-License-Identifier: AGPL-3.0
// Copyright (C) 2023 Haberdasher Labs
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity >=0.8.13;
interface HatsEvents {
/// @notice Emitted when a new hat is created
/// @param id The id for the new hat
/// @param details A description of the Hat
/// @param maxSupply The total instances of the Hat that can be worn at once
/// @param eligibility The address that can report on the Hat wearer's status
/// @param toggle The address that can deactivate the Hat
/// @param mutable_ Whether the hat's properties are changeable after creation
/// @param imageURI The image uri for this hat and the fallback for its
event HatCreated(
uint256 id,
string details,
uint32 maxSupply,
address eligibility,
address toggle,
bool mutable_,
string imageURI
);
/// @notice Emitted when a hat wearer's standing is updated
/// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction
/// @param hatId The id of the wearer's hat
/// @param wearer The wearer's address
/// @param wearerStanding Whether the wearer is in good standing for the hat
event WearerStandingChanged(uint256 hatId, address wearer, bool wearerStanding);
/// @notice Emitted when a hat's status is updated
/// @param hatId The id of the hat
/// @param newStatus Whether the hat is active
event HatStatusChanged(uint256 hatId, bool newStatus);
/// @notice Emitted when a hat's details are updated
/// @param hatId The id of the hat
/// @param newDetails The updated details
event HatDetailsChanged(uint256 hatId, string newDetails);
/// @notice Emitted when a hat's eligibility module is updated
/// @param hatId The id of the hat
/// @param newEligibility The updated eligibiliy module
event HatEligibilityChanged(uint256 hatId, address newEligibility);
/// @notice Emitted when a hat's toggle module is updated
/// @param hatId The id of the hat
/// @param newToggle The updated toggle module
event HatToggleChanged(uint256 hatId, address newToggle);
/// @notice Emitted when a hat's mutability is updated
/// @param hatId The id of the hat
event HatMutabilityChanged(uint256 hatId);
/// @notice Emitted when a hat's maximum supply is updated
/// @param hatId The id of the hat
/// @param newMaxSupply The updated max supply
event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);
/// @notice Emitted when a hat's image URI is updated
/// @param hatId The id of the hat
/// @param newImageURI The updated image URI
event HatImageURIChanged(uint256 hatId, string newImageURI);
/// @notice Emitted when a tophat linkage is requested by its admin
/// @param domain The domain of the tree tophat to link
/// @param newAdmin The tophat's would-be admin in the parent tree
event TopHatLinkRequested(uint32 domain, uint256 newAdmin);
/// @notice Emitted when a tophat is linked to a another tree
/// @param domain The domain of the newly-linked tophat
/// @param newAdmin The tophat's new admin in the parent tree
event TopHatLinked(uint32 domain, uint256 newAdmin);
}