Function: slash(address network, address operator, uint256 amount, uint48 captureTimestamp, byte[] hints)
This function performs a slash using a network for a particular operator by a given amount using hints.
Inputs
network
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Address of the network.
operator
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Address of the operator.
amount
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Maximum amount of the collateral to be slashed.
captureTimestamp
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Time point when the stake was captured.
hints
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Hints for checkpoint indexes.
Branches and code coverage (including function calls)
Intended branches
Stake in correct vault is slashed.
Cumulative slash is calculated correctly.
Negative behavior
Reverts if not called by middleware.
Reverts if network not opted in vault.
Reverts if operator not opted in vault.
Reverts if operator not opted in network.
Reverts if capture timestamp is invalid.