ITangleSlashing
Source: https://github.com/tangle-network/tnt-core/blob/main/src/interfaces/ITangleSlashing.sol
ITangleSlashing
Slashing interface for Tangle protocol
Functions
proposeSlash
function proposeSlash(uint64 serviceId, address operator, uint256 amount, bytes32 evidence) external returns (uint64 slashId)Propose a slash against an operator
Parameters
| Name | Type | Description |
|---|---|---|
| serviceId | uint64 | The service where violation occurred |
| operator | address | The operator to slash |
| amount | uint256 | Amount to slash |
| evidence | bytes32 | Evidence hash |
Return Values
| Name | Type | Description |
|---|---|---|
| slashId | uint64 | The ID of the created slash proposal |
disputeSlash
function disputeSlash(uint64 slashId, string reason) externalDispute a slash proposal
executeSlash
function executeSlash(uint64 slashId) external returns (uint256 actualSlashed)Execute a slash proposal
executeSlashBatch
function executeSlashBatch(uint64[] slashIds) external returns (uint256 totalSlashed, uint256 executedCount)Execute a batch of slashes
getExecutableSlashes
function getExecutableSlashes(uint64 fromId, uint64 toId) external view returns (uint64[] ids)Get list of executable slash IDs in a range
cancelSlash
function cancelSlash(uint64 slashId, string reason) externalCancel a slash proposal
setSlashConfig
function setSlashConfig(uint64 disputeWindow, bool instantSlashEnabled, uint16 maxSlashBps) externalUpdate slashing configuration
getSlashProposal
function getSlashProposal(uint64 slashId) external view returns (struct SlashingLib.SlashProposal)Get slash proposal details
Events
SlashProposed
event SlashProposed(uint64 serviceId, address operator, uint256 amount, bytes32 evidence)SlashExecuted
event SlashExecuted(uint64 serviceId, address operator, uint256 amount)