HatsEvents
Events
HatCreated
Emitted when a new hat is created
event HatCreated(
uint256 id, string details, uint32 maxSupply, address eligibility, address toggle, bool mutable_, string imageURI
);
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | The id for the new hat |
details | string | A description of the Hat |
maxSupply | uint32 | The total instances of the Hat that can be worn at once |
eligibility | address | The address that can report on the Hat wearer's status |
toggle | address | The address that can deactivate the Hat |
mutable_ | bool | Whether the hat's properties are changeable after creation |
imageURI | string | The image uri for this hat and the fallback for its |
WearerStandingChanged
Emitted when a hat wearer's standing is updated
Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction
event WearerStandingChanged(uint256 hatId, address wearer, bool wearerStanding);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the wearer's hat |
wearer | address | The wearer's address |
wearerStanding | bool | Whether the wearer is in good standing for the hat |
HatStatusChanged
Emitted when a hat's status is updated
event HatStatusChanged(uint256 hatId, bool newStatus);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newStatus | bool | Whether the hat is active |
HatDetailsChanged
Emitted when a hat's details are updated
event HatDetailsChanged(uint256 hatId, string newDetails);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newDetails | string | The updated details |
HatEligibilityChanged
Emitted when a hat's eligibility module is updated
event HatEligibilityChanged(uint256 hatId, address newEligibility);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newEligibility | address | The updated eligibiliy module |
HatToggleChanged
Emitted when a hat's toggle module is updated
event HatToggleChanged(uint256 hatId, address newToggle);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newToggle | address | The updated toggle module |
HatMutabilityChanged
Emitted when a hat's mutability is updated
event HatMutabilityChanged(uint256 hatId);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
HatMaxSupplyChanged
Emitted when a hat's maximum supply is updated
event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newMaxSupply | uint32 | The updated max supply |
HatImageURIChanged
Emitted when a hat's image URI is updated
event HatImageURIChanged(uint256 hatId, string newImageURI);
Parameters
Name | Type | Description |
---|---|---|
hatId | uint256 | The id of the hat |
newImageURI | string | The updated image URI |
TopHatLinkRequested
Emitted when a tophat linkage is requested by its admin
event TopHatLinkRequested(uint32 domain, uint256 newAdmin);
Parameters
Name | Type | Description |
---|---|---|
domain | uint32 | The domain of the tree tophat to link |
newAdmin | uint256 | The tophat's would-be admin in the parent tree |
TopHatLinked
Emitted when a tophat is linked to a another tree
event TopHatLinked(uint32 domain, uint256 newAdmin);
Parameters
Name | Type | Description |
---|---|---|
domain | uint32 | The domain of the newly-linked tophat |
newAdmin | uint256 | The tophat's new admin in the parent tree |