Git Source
Methods
BURNER_GAS_LIMIT
function BURNER_GAS_LIMIT() external view returns (uint256)
 
Get a gas limit for the burner.
Returns
| Name | Type | Description | 
|---|
 | uint256 | value of the burner gas limit | 
BURNER_RESERVE
function BURNER_RESERVE() external view returns (uint256)
 
Get a reserve gas between the gas limit check and the burner’s execution.
Returns
| Name | Type | Description | 
|---|
 | uint256 | value of the reserve gas | 
FACTORY
function FACTORY() external view returns (address)
 
Get the factory’s address.
Returns
| Name | Type | Description | 
|---|
 | address | address of the factory | 
NETWORK_MIDDLEWARE_SERVICE
function NETWORK_MIDDLEWARE_SERVICE() external view returns (address)
 
Get the network middleware service’s address.
Returns
| Name | Type | Description | 
|---|
 | address | address of the network middleware service | 
NETWORK_REGISTRY
function NETWORK_REGISTRY() external view returns (address)
 
Get the network registry’s address.
Returns
| Name | Type | Description | 
|---|
 | address | address of the network registry | 
TYPE
function TYPE() external view returns (uint64)
 
Get the entity’s type.
Returns
| Name | Type | Description | 
|---|
 | uint64 | type of the entity | 
VAULT_FACTORY
function VAULT_FACTORY() external view returns (address)
 
Get the vault factory’s address.
Returns
| Name | Type | Description | 
|---|
 | address | address of the vault factory | 
cumulativeSlash
function cumulativeSlash(bytes32 subnetwork, address operator) external view returns (uint256)
 
Get a cumulative slash amount for an operator on a subnetwork.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| operator | address | address of the operator | 
Returns
| Name | Type | Description | 
|---|
 | uint256 | cumulative slash amount | 
cumulativeSlashAt
function cumulativeSlashAt(bytes32 subnetwork, address operator, uint48 timestamp, bytes hint) external view returns (uint256)
 
Get a cumulative slash amount for an operator on a subnetwork until a given timestamp (inclusively) using a hint.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| operator | address | address of the operator | 
| timestamp | uint48 | time point to get the cumulative slash amount until (inclusively) | 
| hint | bytes | hint for the checkpoint index | 
Returns
| Name | Type | Description | 
|---|
 | uint256 | cumulative slash amount until the given timestamp (inclusively) | 
executeSlash
function executeSlash(uint256 slashIndex, bytes hints) external nonpayable returns (uint256 slashedAmount)
 
Execute a slash with a given slash index using hints.
Only a network middleware can call this function.
Parameters
| Name | Type | Description | 
|---|
| slashIndex | uint256 | index of the slash request | 
| hints | bytes | hints for checkpoints’ indexes | 
Returns
| Name | Type | Description | 
|---|
| slashedAmount | uint256 | virtual amount of the collateral slashed | 
isBurnerHook
function isBurnerHook() external view returns (bool)
 
Get if the burner is needed to be called on a slashing.
Returns
| Name | Type | Description | 
|---|
 | bool | if the burner is a hook | 
latestSlashedCaptureTimestamp
function latestSlashedCaptureTimestamp(bytes32 subnetwork, address operator) external view returns (uint48 value)
 
Get the latest capture timestamp that was slashed on a subnetwork.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
 | address | latest capture timestamp that was slashed | 
Returns
| Name | Type | Description | 
|---|
| value | uint48 | latest capture timestamp that was slashed | 
requestSlash
function requestSlash(bytes32 subnetwork, address operator, uint256 amount, uint48 captureTimestamp, bytes hints) external nonpayable returns (uint256 slashIndex)
 
Request a slash using a subnetwork for a particular operator by a given amount using hints.
Only a network middleware can call this function.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| operator | address | address of the operator | 
| amount | uint256 | maximum amount of the collateral to be slashed | 
| captureTimestamp | uint48 | time point when the stake was captured | 
| hints | bytes | hints for checkpoints’ indexes | 
Returns
| Name | Type | Description | 
|---|
| slashIndex | uint256 | index of the slash request | 
resolver
function resolver(bytes32 subnetwork, bytes hint) external view returns (address)
 
Get a resolver for a given subnetwork using a hint.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| hint | bytes | hint for the checkpoint index | 
Returns
| Name | Type | Description | 
|---|
 | address | address of the resolver | 
resolverAt
function resolverAt(bytes32 subnetwork, uint48 timestamp, bytes hint) external view returns (address)
 
Get a resolver for a given subnetwork at a particular timestamp using a hint.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| timestamp | uint48 | timestamp to get the resolver at | 
| hint | bytes | hint for the checkpoint index | 
Returns
| Name | Type | Description | 
|---|
 | address | address of the resolver | 
resolverSetEpochsDelay
function resolverSetEpochsDelay() external view returns (uint256)
 
Get a delay for networks in epochs to update a resolver.
Returns
| Name | Type | Description | 
|---|
 | uint256 | updating resolver delay in epochs | 
setResolver
function setResolver(uint96 identifier, address resolver, bytes hints) external nonpayable
 
Parameters
| Name | Type | Description | 
|---|
| identifier | uint96 | identifier of the subnetwork | 
| resolver | address | address of the resolver | 
| hints | bytes | hints for checkpoints’ indexes | 
slashRequests
function slashRequests(uint256) external view returns (bytes32 subnetwork, address operator, uint256 amount, uint48 captureTimestamp, uint48 vetoDeadline, bool completed)
 
Get a particular slash request.
Parameters
| Name | Type | Description | 
|---|
 | uint256 | index of the slash request | 
Returns
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | subnetwork that requested the slash | 
| operator | address | operator that could be slashed (if the request is not vetoed) | 
| amount | uint256 | maximum amount of the collateral to be slashed | 
| captureTimestamp | uint48 | time point when the stake was captured | 
| vetoDeadline | uint48 | deadline for the resolver to veto the slash (exclusively) | 
| completed | bool | if the slash was vetoed/executed | 
slashRequestsLength
function slashRequestsLength() external view returns (uint256)
 
Get a total number of slash requests.
Returns
| Name | Type | Description | 
|---|
 | uint256 | total number of slash requests | 
slashableStake
function slashableStake(bytes32 subnetwork, address operator, uint48 captureTimestamp, bytes hints) external view returns (uint256)
 
Get a slashable amount of a stake got at a given capture timestamp using hints.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| operator | address | address of the operator | 
| captureTimestamp | uint48 | time point to get the stake amount at | 
| hints | bytes | hints for the checkpoints’ indexes | 
Returns
| Name | Type | Description | 
|---|
 | uint256 | slashable amount of the stake | 
staticDelegateCall
function staticDelegateCall(address target, bytes data) external nonpayable
 
Make a delegatecall from this contract to a given target contract with a particular data (always reverts with a return data).
It allows to use this contract’s storage on-chain.
Parameters
| Name | Type | Description | 
|---|
| target | address | address of the contract to make a delegatecall to | 
| data | bytes | data to make a delegatecall with | 
vault
function vault() external view returns (address)
 
Get the vault’s address.
Returns
| Name | Type | Description | 
|---|
 | address | address of the vault to perform slashings on | 
vetoDuration
function vetoDuration() external view returns (uint48)
 
Get a duration during which resolvers can veto slash requests.
Returns
| Name | Type | Description | 
|---|
 | uint48 | duration of the veto period | 
vetoSlash
function vetoSlash(uint256 slashIndex, bytes hints) external nonpayable
 
Veto a slash with a given slash index using hints.
Only a resolver can call this function.
Parameters
| Name | Type | Description | 
|---|
| slashIndex | uint256 | index of the slash request | 
| hints | bytes | hints for checkpoints’ indexes | 
Events
ExecuteSlash
event ExecuteSlash(uint256 indexed slashIndex, uint256 slashedAmount)
 
Emitted when a slash request is executed.
Parameters
| Name | Type | Description | 
|---|
slashIndex indexed | uint256 | index of the slash request | 
| slashedAmount | uint256 | virtual amount of the collateral slashed | 
Initialized
event Initialized(uint64 version)
 
Triggered when the contract has been initialized or reinitialized.
Parameters
| Name | Type | Description | 
|---|
| version | uint64 |  | 
RequestSlash
event RequestSlash(uint256 indexed slashIndex, bytes32 indexed subnetwork, address indexed operator, uint256 slashAmount, uint48 captureTimestamp, uint48 vetoDeadline)
 
Emitted when a slash request is created.
Parameters
| Name | Type | Description | 
|---|
slashIndex indexed | uint256 | index of the slash request | 
subnetwork indexed | bytes32 | subnetwork that requested the slash | 
operator indexed | address | operator that could be slashed (if the request is not vetoed) | 
| slashAmount | uint256 | maximum amount of the collateral to be slashed | 
| captureTimestamp | uint48 | time point when the stake was captured | 
| vetoDeadline | uint48 | deadline for the resolver to veto the slash (exclusively) | 
SetResolver
event SetResolver(bytes32 indexed subnetwork, address resolver)
 
Emitted when a resolver is set.
Parameters
| Name | Type | Description | 
|---|
subnetwork indexed | bytes32 | full identifier of the subnetwork (address of the network concatenated with the uint96 identifier) | 
| resolver | address | address of the resolver | 
VetoSlash
event VetoSlash(uint256 indexed slashIndex, address indexed resolver)
 
Emitted when a slash request is vetoed.
Parameters
| Name | Type | Description | 
|---|
slashIndex indexed | uint256 | index of the slash request | 
resolver indexed | address | address of the resolver that vetoed the slash | 
Structs
BaseParams
struct BaseParams {
    bool isBurnerHook;
}
 
Base parameters needed for slashers’ deployment.
Parameters
| Name | Type | Description | 
|---|
| isBurnerHook | bool | if the burner is needed to be called on a slashing | 
InitParams
struct InitParams {
    BaseParams baseParams;
    uint48 vetoDuration;
    uint256 resolverSetEpochsDelay;
}
 
Initial parameters needed for a slasher deployment.
Parameters
| Name | Type | Description | 
|---|
| baseParams | BaseParams | base parameters for slashers’ deployment | 
| vetoDuration | uint48 | duration of the veto period for a slash request | 
| resolverSetEpochsDelay | uint256 | delay in epochs for a network to update a resolver | 
SlashRequest
struct SlashRequest {
    bytes32 subnetwork;
    address operator;
    uint256 amount;
    uint48 captureTimestamp;
    uint48 vetoDeadline;
    bool completed;
}
 
Structure for a slash request.
Parameters
| Name | Type | Description | 
|---|
| subnetwork | bytes32 | subnetwork that requested the slash | 
| operator | address | operator that could be slashed (if the request is not vetoed) | 
| amount | uint256 | maximum amount of the collateral to be slashed | 
| captureTimestamp | uint48 | time point when the stake was captured | 
| vetoDeadline | uint48 | deadline for the resolver to veto the slash (exclusively) | 
| completed | bool | if the slash was vetoed/executed | 
GeneralDelegatorData
struct GeneralDelegatorData {
    uint64 slasherType;
    bytes data;
}
 
General data for the delegator.
Parameters
| Name | Type | Description | 
|---|
| slasherType | uint64 | type of the slasher | 
| data | bytes | slasher-dependent data for the delegator | 
DelegatorData
struct DelegatorData {
    uint256 slashableStake;
    uint256 stakeAt;
    uint256 slashIndex;
}
 
Extra data for the delegator.
Parameters
| Name | Type | Description | 
|---|
| slashableStake | uint256 | amount of the slashable stake before the slash (cache) | 
| stakeAt | uint256 | amount of the stake at the capture time (cache) | 
| slashIndex | uint256 | index of the slash request | 
SlashableStakeHints
struct SlashableStakeHints {
    bytes stakeHints;
    bytes cumulativeSlashFromHint;
}
 
Hints for a slashable stake.
Parameters
| Name | Type | Description | 
|---|
| stakeHints | bytes | hints for the stake checkpoints | 
| cumulativeSlashFromHint | bytes | hint for the cumulative slash amount at a capture timestamp | 
RequestSlashHints
struct RequestSlashHints {
    bytes slashableStakeHints;
}
 
Hints for a slash request.
Parameters
| Name | Type | Description | 
|---|
| slashableStakeHints | bytes | hints for the slashable stake checkpoints | 
ExecuteSlashHints
struct ExecuteSlashHints {
    bytes captureResolverHint;
    bytes currentResolverHint;
    bytes slashableStakeHints;
}
 
Hints for a slash execute.
Parameters
| Name | Type | Description | 
|---|
| captureResolverHint | bytes | hint for the resolver checkpoint at the capture time | 
| currentResolverHint | bytes | hint for the resolver checkpoint at the current time | 
| slashableStakeHints | bytes | hints for the slashable stake checkpoints | 
VetoSlashHints
struct VetoSlashHints {
    bytes captureResolverHint;
    bytes currentResolverHint;
}
 
Hints for a slash veto.
Parameters
| Name | Type | Description | 
|---|
| captureResolverHint | bytes | hint for the resolver checkpoint at the capture time | 
| currentResolverHint | bytes | hint for the resolver checkpoint at the current time | 
SetResolverHints
struct SetResolverHints {
    bytes resolverHint;
}
 
Hints for a resolver set.
Parameters
| Name | Type | Description | 
|---|
| resolverHint | bytes | hint for the resolver checkpoint |