# Smart Contracts

### Overview

The Charged Particles protocol consists of a series of smart contracts, but there are four primary smart contracts that control the majority of the logic and are the only ones required to integrate with:

***ChargedParticles.sol***

> The primary contract for interfacing with the Charged Particles protocol. This contract controls the logic for viewing and updating a Particle's balances / nested assets.&#x20;

***ChargedSettings.sol***

> Used to view and update rules for how the Charged Particles contract functions.

***ChargedState.sol***

> For viewing and setting permissions, approvals, and time locks on Particles.

***Proton.sol / ProtonB.sol***

> The Proton contract is the base NFT of the Charged Particles system. It is a standard ERC-721 NFT with some added functionality. \
> \
> ProtonB provides the exact same functionality as the Proton, but has some minor changes for gas improvements, and was rolled out for V2 of the protocol.

### Latest Contract Addresses

The addresses to the 4 primary Charged Particles contracts can be found in the respective V1 and [V2](/charged-particles-protocol/developing-on-the-protocol/smart-contracts/v2.md) sections of the docs, along with links to block explorers and source code. Additional contract addresses can be found in [**this npm package**](https://cdn.jsdelivr.net/npm/@charged-particles/protocol-subgraph@latest/networks/)**:**

<https://cdn.jsdelivr.net/npm/@charged-particles/protocol-subgraph@latest/networks/>

The complete list of our contract addresses includes "helper" contracts associated with the four primary contracts of the protocol, contracts associated with our [IONX rewards](https://rewards.charged.fi) program, and some legacy contracts that are no longer used. To check what the latest version number of the protocol subgraph npm package is, check [here](https://www.npmjs.com/package/@charged-particles/protocol-subgraph). &#x20;


---

# 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://docs.charged.fi/charged-particles-protocol/developing-on-the-protocol/smart-contracts.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.
