Public Functions
Public Functions for Admin Management
grantPermission
Grant access permission for a given amount of time to a specified third-party address for credit metrics belonging to a specific Credora's client entity. If the tokenAddress
parameter is provided, the function will charge on the Credora's client wallet for a specific ERC-20 token to grant access to the on-chain data.
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
thirdParty | address | The address of the third-party that will consume the credit metrics |
duration | uint128 | The granting access time period (in seconds) |
tokenAddress [OPTIONAL] | address | The address of the token used to pay for the service |
tokenSender [OPTIONAL] | address | The address of the payment sender |
revokePermission
Revoke access permission to a specified third-party address for credit metrics belonging to a specific Credora's client entity.
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
thirdParty | address | The address of the third-party that will consume the credit metrics |
subscribe
Subscribe a contract to consume data. The consumer contract will need to implement the needed function callbacks of the CredoraFunctions
abstract contract in order to receive the data.
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
subscribedContract | address | The contract subscribing to get Credora metrics |
duration | uint128 | The granting access time period (in seconds) |
tokenAddress [OPTIONAL] | address | The address of the token used to pay for the service |
unsubscribe
Unsubscribe a contract from data consumption.
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
subscribedContract | address | The contract subscribing to get Credora metrics |
setDataWithEAS
Trigger the contract to call the getAttestation
function on the EAS smart contract to retrieve an attestation, and then parse the credit metrics contained inside.
Parameter | Type | Description |
---|---|---|
uid | bytes32 | The attestation UID containing the credit metrics |
Public Functions for Synchronous Data Retrieval
getScore
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: uint256 - referring to the score
metric
getNAV
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: uint256 - referring to the NAV
metric
getRAE
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: bytes8 - referring to the RAE
metric
getBorrowCapacity
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: uint256 - referring to the Borrow Capacity
metric
getImpliedPD
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: uint256 - referring to the Implied PD
metric
getImpliedPDTenor
Parameter | Type | Description |
---|---|---|
entity | bytes32 | The name of the entity owning the data |
Return: uint256 - referring to the Implied PD Tenor
metric
Last updated