Docs/Reference/Events
Events
The public lifecycle events that describe program creation, issuance, redemption, transfers, metadata, and admin actions.
EventEmitter stream#
The shared EventEmitter is the canonical indexing surface for Loyfin lifecycle events.
event FactoryRegistrationChanged(address indexed factory, bool registered);
event LoyaltyRegistrationChanged(address indexed loyalty, address indexed factory, bool registered);
event LoyaltyProgramCreated(address indexed factory, address indexed issuer, bytes32 indexed loyaltyId, address loyalty, string name, string symbol, string media, string description, string contractURI, string tokenURI);
event PointsIssued(address indexed factory, address indexed issuer, bytes32 indexed loyaltyId, address loyalty, address to, uint256 tokenId, uint256 amount, bytes32 nonce, bytes32 operationHash, bytes data);
event PointsRedeemed(address indexed factory, address indexed issuer, bytes32 indexed loyaltyId, address loyalty, address from, uint256 tokenId, uint256 amount, bytes32 nonce, bytes32 operationHash, bytes data);
event LoyaltyTransfer(address indexed loyalty, address indexed operator, address indexed from, address to, uint256 tokenId, uint256 amount);
event LoyaltyBatchTransfer(address indexed loyalty, address indexed operator, address indexed from, address to, uint256[] tokenIds, uint256[] amounts);
event LoyaltyMetadataUpdated(address indexed loyalty, uint256 indexed tokenId, string tokenURI, string contractURI);
event LoyaltyAdminOperation(address indexed loyalty, address indexed owner, bytes32 indexed action, bytes32 nonce);
event LoyfinOwnershipTransferred(address indexed factory, address indexed previousOwner, address indexed newOwner);
event LoyfinEventEmitterUpdated(address indexed factory, address indexed eventEmitter);
event LoyfinFeePolicyUpdated(address indexed factory, uint256 protocolFeeWei, uint16 issuerShareBps, uint256 relayerFeeWei, uint256 requiredFeeWei);
event LoyaltyOwnershipTransferred(address indexed loyalty, address indexed previousOwner, address indexed newOwner);
event LoyaltyAdminEpochUpdated(address indexed loyalty, uint256 adminEpoch);
event LoyaltyIssuableUpdated(address indexed loyalty, bool issuable);
event LoyaltyRedeemableUpdated(address indexed loyalty, bool redeemable);
event LoyaltyTransferableUpdated(address indexed loyalty, bool transferable);
event LoyaltyRoyaltyReceiverUpdated(address indexed loyalty, address indexed receiver);
event LoyaltyRoyaltyBpsUpdated(address indexed loyalty, uint96 royaltyBps);
event LoyaltyRoyaltiesReceived(address indexed loyalty, address indexed payer, uint256 amount);
event LoyaltyRoyaltiesWithdrawn(address indexed loyalty, address indexed issuerReceiver, address indexed protocolReceiver, uint256 issuerAmount, uint256 protocolAmount);
event LoyaltyRoyaltyWithdrawalFailed(address indexed loyalty, address indexed receiver, uint256 amount);Event groups#
| Group | Events | Meaning |
|---|---|---|
| Registry | FactoryRegistrationChanged, LoyaltyRegistrationChanged | The emitter owner or a registered factory changed an accepted event source. |
| Rewards | LoyaltyProgramCreated, PointsIssued, PointsRedeemed, LoyaltyTransfer, LoyaltyBatchTransfer | Program creation and customer balance movement. |
| Factory admin | LoyfinOwnershipTransferred, LoyfinEventEmitterUpdated, LoyfinFeePolicyUpdated | Protocol ownership, emitter, or fee policy changed. |
| Program admin | LoyaltyAdminOperation, ownership, epoch, capability, metadata, and royalty events | A Loyalty Token's owner-controlled state or royalty accounting changed. |
Indexing#
Index the EventEmitter address from Contract addresses for the shared Loyfin stream. Individual Loyalty Tokens also emit standard ERC-1155 and local contract events; those are separate from the EventEmitter signatures above.