IServiceFeeDistributor
Source: https://github.com/tangle-network/tnt-core/blob/v2/src/v2/interfaces/IServiceFeeDistributor.sol
IServiceFeeDistributor
Tracks service-fee payouts to restakers across payment tokens
Receives delegation-change hooks from MultiAssetDelegation and fee-distribution calls from Tangle.
Functions
distributeServiceFee
function distributeServiceFee(uint64 serviceId, uint64 blueprintId, address operator, address paymentToken, uint256 amount) external payableonDelegationChanged
function onDelegationChanged(address delegator, address operator, struct Types.Asset asset, uint256 amount, bool isIncrease, enum Types.BlueprintSelectionMode selectionMode, uint64[] blueprintIds, uint16 lockMultiplierBps) externalonBlueprintAdded
function onBlueprintAdded(address delegator, address operator, struct Types.Asset asset, uint64 blueprintId) externalonBlueprintRemoved
function onBlueprintRemoved(address delegator, address operator, struct Types.Asset asset, uint64 blueprintId) externalgetPoolScore
function getPoolScore(address operator, uint64 blueprintId, struct Types.Asset asset) external view returns (uint256 allScore, uint256 fixedScore)onOperatorLeaving
function onOperatorLeaving(uint64 serviceId, address operator) externalCalled when an operator is about to leave a service
Drips all active streams for the operator BEFORE they’re removed
onServiceTerminated
function onServiceTerminated(uint64 serviceId, address refundRecipient) externalCalled when a service is terminated early
Cancels streaming payments and refunds remaining amounts to the service owner
Parameters
| Name | Type | Description |
|---|---|---|
| serviceId | uint64 | The terminated service ID |
| refundRecipient | address | Where to send the remaining payment (typically service owner) |