# Emergency Controls

### Rescue Tokens

The `rescueTokens` function allows Node owners to recover tokens accidentally sent to the Node that are not part of its components.

```solidity
function rescueTokens(address token, address recipient, uint256 amount) external onlyOwner {
    if (token == asset) revert ErrorsLib.InvalidToken();
    if (_isComponent(token)) revert ErrorsLib.InvalidToken();
    for (uint256 i; i < components.length; i++) {
        try IERC7575(components[i]).share() returns (address share) {
            if (token == share) revert ErrorsLib.InvalidToken();
        } catch {}
    }
    IERC20(token).safeTransfer(recipient, amount);
    emit EventsLib.RescueTokens(token, recipient, amount);
}
```

#### Constraints

* Only Node owner can call
* Cannot rescue Node's underlying asset
* Cannot rescue any token that is a component
* Token must implement ERC20

#### Use Cases

* Recover tokens sent to Node by mistake
* Remove airdrops or other unwanted tokens
* Clean up Node contract of non-component assets

#### Security

The function prevents extraction of:

```solidity
function _isComponent(address component) internal view returns (bool) {
    return componentAllocations[component].isComponent;
}
```

* Node's underlying asset
* Any current component tokens
* Any tokens used in Node strategies


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nashpoint.gitbook.io/nashpoint/managing-a-node/emergency-controls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
