# getLabel

Description: getLabel 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-label.mdx

{/* This document contains content copied/adapted from the Foundry Book (MIT licensed). See LICENSE in the parent directory. */}

### Signature

```solidity
function getLabel(address) external returns (string memory);
```

### Description

Retrieves the label for an address if it was previously labeled. If not, it returns the address prefixed with `unlabeled:`.
