HatsEvents

Git Source

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

NameTypeDescription
iduint256The id for the new hat
detailsstringA description of the Hat
maxSupplyuint32The total instances of the Hat that can be worn at once
eligibilityaddressThe address that can report on the Hat wearer's status
toggleaddressThe address that can deactivate the Hat
mutable_boolWhether the hat's properties are changeable after creation
imageURIstringThe 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

NameTypeDescription
hatIduint256The id of the wearer's hat
weareraddressThe wearer's address
wearerStandingboolWhether 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

NameTypeDescription
hatIduint256The id of the hat
newStatusboolWhether the hat is active

HatDetailsChanged

Emitted when a hat's details are updated

event HatDetailsChanged(uint256 hatId, string newDetails);

Parameters

NameTypeDescription
hatIduint256The id of the hat
newDetailsstringThe updated details

HatEligibilityChanged

Emitted when a hat's eligibility module is updated

event HatEligibilityChanged(uint256 hatId, address newEligibility);

Parameters

NameTypeDescription
hatIduint256The id of the hat
newEligibilityaddressThe updated eligibiliy module

HatToggleChanged

Emitted when a hat's toggle module is updated

event HatToggleChanged(uint256 hatId, address newToggle);

Parameters

NameTypeDescription
hatIduint256The id of the hat
newToggleaddressThe updated toggle module

HatMutabilityChanged

Emitted when a hat's mutability is updated

event HatMutabilityChanged(uint256 hatId);

Parameters

NameTypeDescription
hatIduint256The id of the hat

HatMaxSupplyChanged

Emitted when a hat's maximum supply is updated

event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);

Parameters

NameTypeDescription
hatIduint256The id of the hat
newMaxSupplyuint32The updated max supply

HatImageURIChanged

Emitted when a hat's image URI is updated

event HatImageURIChanged(uint256 hatId, string newImageURI);

Parameters

NameTypeDescription
hatIduint256The id of the hat
newImageURIstringThe updated image URI

TopHatLinkRequested

Emitted when a tophat linkage is requested by its admin

event TopHatLinkRequested(uint32 domain, uint256 newAdmin);

Parameters

NameTypeDescription
domainuint32The domain of the tree tophat to link
newAdminuint256The 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

NameTypeDescription
domainuint32The domain of the newly-linked tophat
newAdminuint256The tophat's new admin in the parent tree