Notifications (Events)

DApps can subscribe to the following events being emitted by Quadrata's smart contracts to get notified in real time.

Event SetAttributeReceipt

Emitted when a passport attribute is issued or updated
IQuadPassport.sol
import "@quadrata/contracts/interfaces/IQuadPassport.sol";
event SetAttributeReceipt(
address indexed _account, // Address of the Passport holder
address indexed _issuer, // Address of the Passport Issuer
uint256 _fee // Fee paid to the Passport Issuer
uint256 _tokenId // tokenId originator of the Passport holders
);

Event BurnPassportsIssuer

Emitted when a passport has been burned by a Passport Issuer
IQuadPassport.sol
import "@quadrata/contracts/interfaces/IQuadPassport.sol";
event BurnPassportsIssuer(
address indexed _issuer, // Address of the Passport holder
address indexed _account // Address of the Passport Issuer
);
import "@quadrata/contracts/interfaces/IQuadSoulBound.sol";
/**
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(
address indexed operator, // Address of the Passport Issuer
address indexed from, // Address of the Passport holder
address indexed to, // Address 0x00..000 signals a burn
uint256 id, // ID of Issuer
uint256 value // Amount of NFT deleted, should always be 1
);

Event BurnPassports (using TransferSingle event)

Emitted when a Passport holder deletes their own passport
import "@quadrata/contracts/interfaces/IQuadSoulBound.sol";
/**
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(
address indexed operator, // Address of the Passport holder
address indexed from, // Address of the Passport holder
address indexed to, // Address 0x00..000 signals a burn
uint256 id, // ID of Issuer
uint256 value // Amount of NFT deleted, should always be 1
);
TransferSingle is emitted for all burns and mints, so pay attention to the arguments to detect if it is a burn and which type of burn it is.

Event QueryEvent

Emitted when an attribute is queried for a Passport holder
IQuadReader.sol
import "@quadrata/contracts/interfaces/IQuadReader.sol";
event QueryEvent(
address indexed _account, // Address of the Passport holder
address indexed _caller, // Address of the smart contract querying the info
bytes32 _attribute // Attribute being queried
);

Event QueryEventBulk

Emitted when multiple attributes are queried for a Passport holder
IQuadReader.sol
import "@quadrata/contracts/interfaces/IQuadReader.sol";
event QueryBulkEvent(
address indexed _account, // Address of the Passport holder
address indexed _caller, // Address of the smart contract querying the info
bytes32[] _attributes // List of attributes being queried
);