---
description: Explore the architecture of the Kolektivo Framework's smart contracts
---

# Smart Contracts

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td></td><td><strong>Monetary System</strong></td><td></td><td><a href="smart-contracts/monetary-system">monetary-system</a></td><td><a href="https://807599655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIhKhzl8NzsNE6Q8tO6lW%2Fuploads%2FzSqlDEh7WzKysCTKxpCn%2Freserve.PNG?alt=media&#x26;token=c2181409-7226-4307-8b3b-945fe999e315">reserve.PNG</a></td></tr><tr><td></td><td><strong>Governance System</strong></td><td></td><td><a href="smart-contracts/badger-governance-system">badger-governance-system</a></td><td><a href="https://807599655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIhKhzl8NzsNE6Q8tO6lW%2Fuploads%2FyF7748JyvbbFhInDUBYE%2Fbadges.PNG?alt=media&#x26;token=2f498c3f-45a7-4d27-9b01-07910770cf9d">badges.PNG</a></td></tr></tbody></table>

{% hint style="danger" %}
Please note that this experimental software is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
{% endhint %}

## Installation

Kolektivo's smart contracts are developed using the [foundry toolchain](https://getfoundry.sh/).

However, the project also uses hardhat _tasks_ and also depends on hardhat.

1. Clone the repository
2. `cd` into the repository
3. Run `forge install` to install contract dependencies
4. Run `yarn` to install hardhat dependencies
5. (_Optional_) Run `source dev.env` to setup environment variables

## Usage

Common tasks are executed through a `Makefile`.

The `Makefile` supports a help command, i.e. `make help`.

```
$ make help
> build                    Build project
> clean                    Remove build artifacts
> test                     Run whole testsuite
> update                   Update dependencies
> [...]
```

## Simulation

This project includes a framework to simulate the contracts on a local node.

To start the simulation, first follow each step described in _Installation_.

Afterwards, start an `anvil` node in a second terminal session.

To start the simulation, run `npx hardhat simulation`.

## Dependencies

* [byterocket's solrocket](https://github.com/byterocket/solrocket)
* [Rari Capital's solmate](https://github.com/rari-capital/solmate)
