Callbacks for Event-based Data Retrieval
Credora provides an efficient mechanism for retrieving data using a callback-based solution. This feature allows external entities to request data and receive the results asynchronously through a callback function.
The consuming smart contract should implement the desired callback belonging to the CredoraFunctions
abstract contract.
Callbacks will be called if a valid subscription is active and if credit metrics change.
Testing Functions
Credora provides a set of functions for testing purposes that are enabled only on testnets.
testAccessData
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: bytes memory - the full set of credit metrics contained for that entity, encoded as follows:
TestTriggerCallbacks
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
metrics | bytes memory | The dataset to use for updating metrics encoded as: |
subscribedContract | address | The consuming contract whose callbacks must be triggered |
Last updated