# getMappingSlotAt

Description: getMappingSlotAt cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Environment/get-mapping-slot-at.mdx

### Signature

```solidity
function getMappingSlotAt(
  address target,
  bytes32 mappingSlot,
  uint256 idx
) external returns (bytes32 value);
```

### Description

Gets the elements at index idx of the mapping at the given slot, for a given address. The
index must be less than the length of the mapping (i.e. the number of keys in the mapping).
