IFeeManager
Inherits: IERC165
Functions
s_subscriberDiscounts
Gets the subscriber discount for a specific feedId.
function s_subscriberDiscounts(address subscriber, bytes32 feedId, address token) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
subscriber | address | The address of the subscriber to check for a discount. |
feedId | bytes32 | The feedId related to the discount. |
token | address | The address of the quote payment token. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The current subscriber discount. |
s_linkDeficit
Gets any subsidized LINK that is owed to the reward manager for a specific feedId.
function s_linkDeficit(bytes32 feedId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
feedId | bytes32 | The feedId related to the link deficit. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The amount of link deficit. |
i_linkAddress
Gets the LINK token address.
function i_linkAddress() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the LINK token. |
i_nativeAddress
Gets the native token address.
function i_nativeAddress() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the native token. |
i_proxyAddress
Gets the proxy contract address.
function i_proxyAddress() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the proxy contract. |
s_nativeSurcharge
Gets the surcharge fee to be paid if paying in native.
function s_nativeSurcharge() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The surcharge fee for native payments. |
getFeeAndReward
Calculates the applied fee and reward from a report. If the sender is a subscriber, they will receive a discount.
function getFeeAndReward(address subscriber, bytes memory report, address quoteAddress)
external
view
returns (Asset memory feeData, Asset memory rewardData, uint256 discount);
Parameters
Name | Type | Description |
---|---|---|
subscriber | address | The address of the subscriber trying to verify. |
report | bytes | The report to calculate the fee for. |
quoteAddress | address | The address of the quote payment token. |
Returns
Name | Type | Description |
---|---|---|
feeData | Asset | The calculated fee data. |
rewardData | Asset | The calculated reward data. |
discount | uint256 | The current subscriber discount applied. |
Structs
Asset
The Asset struct to hold the address of an asset and its amount.
struct Asset {
address assetAddress;
uint256 amount;
}
Properties
Name | Type | Description |
---|---|---|
assetAddress | address | The address of the asset. |
amount | uint256 | The amount of the asset. |