> ## Documentation Index
> Fetch the complete documentation index at: https://seilabs-docs-bridge-release-v6-7-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Slashing Precompile

> Query the slashing module's parameters and validator signing information directly from the EVM.

The Slashing precompile exposes the Cosmos `slashing` module's read-only queries to EVM smart contracts. It lets you inspect the module parameters that govern downtime and double-sign penalties, and read per-validator signing information such as missed block counts and jailing status.

## Address

The Slashing precompile is available at the fixed address:

```
0x0000000000000000000000000000000000001014
```

## Interface

```solidity theme={"dark"}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

address constant SLASHING_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000001014;

ISlashing constant SLASHING_CONTRACT = ISlashing(SLASHING_PRECOMPILE_ADDRESS);

interface ISlashing {
    // Queries
    function params() external view returns (SlashingParams memory params);

    function signingInfo(
        string memory consAddress
    ) external view returns (SigningInfo memory signingInfo);

    function signingInfos(
        bytes memory pageKey
    ) external view returns (SigningInfosResponse memory response);

    // Structs
    struct SlashingParams {
        int64 signedBlocksWindow;
        string minSignedPerWindow;
        uint64 downtimeJailDuration;
        string slashFractionDoubleSign;
        string slashFractionDowntime;
    }

    struct SigningInfo {
        string validatorAddress;
        int64 startHeight;
        int64 indexOffset;
        int64 jailedUntil;
        bool tombstoned;
        int64 missedBlocksCounter;
    }

    struct SigningInfosResponse {
        SigningInfo[] signingInfos;
        bytes nextKey;
    }
}
```

## Methods

### `params`

```solidity theme={"dark"}
function params() external view returns (SlashingParams memory params);
```

Returns the slashing module parameters.

**Returns** a `SlashingParams` struct:

| Field | Type | Description |
| - | - | - |
| `signedBlocksWindow` | `int64` | The size of the sliding window used to track validator liveness. |
| `minSignedPerWindow` | `string` | Minimum fraction of blocks a validator must sign per window (decimal string). |
| `downtimeJailDuration` | `uint64` | Duration, in seconds, a validator is jailed for downtime. |
| `slashFractionDoubleSign` | `string` | Fraction of stake slashed for a double-sign (decimal string). |
| `slashFractionDowntime` | `string` | Fraction of stake slashed for downtime (decimal string). |

### `signingInfo`

```solidity theme={"dark"}
function signingInfo(
    string memory consAddress
) external view returns (SigningInfo memory signingInfo);
```

Returns the signing information for a single validator identified by its consensus address (bech32).

**Parameters**

| Parameter | Type | Description |
| - | - | - |
| `consAddress` | `string` | The validator's consensus address (bech32). |

**Returns** a `SigningInfo` struct:

| Field | Type | Description |
| - | - | - |
| `validatorAddress` | `string` | The validator's consensus address (bech32). |
| `startHeight` | `int64` | Height at which the validator became bonded. |
| `indexOffset` | `int64` | Index offset into the signed block bit array. |
| `jailedUntil` | `int64` | Unix timestamp (seconds) until which the validator is jailed. |
| `tombstoned` | `bool` | Whether the validator has been tombstoned. |
| `missedBlocksCounter` | `int64` | Number of blocks the validator has missed within the window. |

Querying a consensus address with no signing information reverts.

### `unjail`

```solidity theme={"dark"}
function unjail() external returns (bool success);
```

Unjails the validator whose operator address is the caller's associated Sei address. This is a state-mutating transaction, so the caller's EVM address must be associated with a Sei address, and that Sei address must be a validator operator.

**Returns**

| Field | Type | Description |
| - | - | - |
| `success` | `bool` | `true` when the validator was unjailed. |

The call reverts if the caller has no associated Sei address, if that address is not a validator operator, or if the validator does not currently satisfy the conditions required to be unjailed.

Because this method acts on behalf of the caller, it is non-payable and cannot be invoked via `delegatecall` or `staticcall`; such calls revert.

### `signingInfos`

```solidity theme={"dark"}
function signingInfos(
    bytes memory pageKey
) external view returns (SigningInfosResponse memory response);
```

Returns the signing information for all validators, with pagination.

**Parameters**

| Parameter | Type | Description |
| - | - | - |
| `pageKey` | `bytes` | Pagination key from a previous response; pass empty bytes for the first page. |

**Returns** a `SigningInfosResponse` struct:

| Field | Type | Description |
| - | - | - |
| `signingInfos` | `SigningInfo[]` | The signing information entries for the current page. |
| `nextKey` | `bytes` | Pagination key for the next page; empty when exhausted. |

## Example Usage

```solidity theme={"dark"}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./Slashing.sol";

contract SlashingReader {
    function getDowntimeSlashFraction() external view returns (string memory) {
        ISlashing.SlashingParams memory params = SLASHING_CONTRACT.params();
        return params.slashFractionDowntime;
    }

    function getMissedBlocks(string memory consAddress) external view returns (int64) {
        ISlashing.SigningInfo memory info = SLASHING_CONTRACT.signingInfo(consAddress);
        return info.missedBlocksCounter;
    }
}
```

<Note>
  All methods on the Slashing precompile are read-only `view` queries. Sending value to any of them reverts.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.