> For the complete documentation index, see [llms.txt](https://docs.swarmnetwork.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swarmnetwork.org/swarm-protocol/spf/contributor-restrictions-contract.md).

# Contributor Restrictions Contract

* **Smart Contract:** specific to a Swarm Powered Fundraise for a specific SRC20
* **Created:** review the [SPF Deployment Sequence](https://www.swarmnetwork.org/swarm-protocol/spf#deployment-sequence); then referenced in the Swarm Powered Fundraise contract&#x20;
* **Purpose:** Manages whitelist and restrictions for each contributor in a Swarm Powered Fundraise
* **Example:**  TBD

## Feature Description

### Read Functions

| Function                                      | Description                                                                                                                                       |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fundraise()` returns `(address)`             | Returns the address of the Swarm Powered Fundraise contract that this Contributor Restrictions contract applies to                                |
| `maxContributors()` returns `(uint256)`       | Returns the maximum number of contributors that can participate in a Swarm Powered Fundraise                                                      |
| `isAllowed(account)` returns `(bool)`         | Checks if an account is on the whitelist of a Swarm Powered Fundraise and the contributor list has not reached the maximum number of contributors |
| `checkRestrictions(address)` returns `(bool)` | Checks if an account is on the whitelist and is not above the maximum number of contributors                                                      |

### Write Functions

| Function                            | Description                                                                                                               |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `whitelistAccount(address)`         | Adds an address to the whitelist of a Swarm Powered Fundraise and accepts any pending contribution                        |
| `unWhitelistAccount(address)`       | Removes an address from the whitelist of a Swarm Powered Fundraise and removes any qualified contributions by the address |
| `bulkWhitelistAccount(address[])`   | Whitelists an array of addresses for a Swarm Powered Fundraise                                                            |
| `bulkUnWhitelistAccount(address[])` | Removes an array of addresses from the whitelist of a Swarm Powered Fundraise                                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.swarmnetwork.org/swarm-protocol/spf/contributor-restrictions-contract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
