{"id":37475415,"url":"https://github.com/aboutcircles/circles-contracts-v2","last_synced_at":"2026-01-16T07:21:11.472Z","repository":{"id":228568831,"uuid":"774324631","full_name":"aboutcircles/circles-contracts-v2","owner":"aboutcircles","description":"Circles Protocol contracts","archived":false,"fork":false,"pushed_at":"2025-05-12T10:58:41.000Z","size":5119,"stargazers_count":6,"open_issues_count":16,"forks_count":8,"subscribers_count":1,"default_branch":"beta","last_synced_at":"2025-05-12T11:43:48.966Z","etag":null,"topics":["social-money","web-of-trust"],"latest_commit_sha":null,"homepage":"https://aboutcircles.com","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboutcircles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T10:56:54.000Z","updated_at":"2025-05-12T10:43:52.000Z","dependencies_parsed_at":"2024-03-19T12:58:55.822Z","dependency_job_id":"8b614b04-d879-4f9b-ac48-4c708bcc932f","html_url":"https://github.com/aboutcircles/circles-contracts-v2","commit_stats":null,"previous_names":["aboutcircles/circles-contracts-v2"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/aboutcircles/circles-contracts-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcircles%2Fcircles-contracts-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcircles%2Fcircles-contracts-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcircles%2Fcircles-contracts-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcircles%2Fcircles-contracts-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboutcircles","download_url":"https://codeload.github.com/aboutcircles/circles-contracts-v2/tar.gz/refs/heads/beta","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcircles%2Fcircles-contracts-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["social-money","web-of-trust"],"created_at":"2026-01-16T07:21:10.654Z","updated_at":"2026-01-16T07:21:11.426Z","avatar_url":"https://github.com/aboutcircles.png","language":"Solidity","funding_links":[],"categories":["Protocol \u0026 Architecture"],"sub_categories":["Developer Demos"],"readme":"# Circles Protocol\n\nCircles is a decentralized protocol for creating and distributing fair and social money through personal currencies. Built on the Gnosis Chain, it utilizes smart contracts to manage the creation, distribution, and transfer of personal currencies using the ERC1155 multi-token standard.\n\n## Key Concepts\n\n- **Personal Currencies**: Each individual can mint their own currency at a rate of one Circle per hour.\n- **Trust Networks**: Currencies become valuable and transferable through trust relationships between participants.\n- **Demurrage**: A 7% annual cost applied to held currencies, encouraging circulation and maintaining equity.\n\n## Features\n\n- Retroactive minting for up to 14 days\n- Path-based transactions through trust connections\n- Flexible economic interactions between individuals, organizations, and groups\n- Equilibrium mechanism balancing issuance and demurrage\n\n## Documentation\n\nFor more details on Circles and details of the implementation please refer to [https://aboutcircles.github.io/circles-contracts-v2/](https://aboutcircles.github.io/circles-contracts-v2/)\n\n## Getting Started\n\n🐲 **Beta Status**: This repository is in beta and actively developed in the open. Initial reviews have been completed, we welcome community engagement for wider testing and integration. As AGPL-licensed software, it's provided as-is. We encourage thorough review and testing before any production use.\n\n\n### Prerequisites\n\n- [Foundry](https://book.getfoundry.sh/getting-started/installation)\n\n### Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/aboutcircles/circles-contracts-v2\n    cd circles-contracts-v2\n    ```\n2. Install dependencies:\n    ```bash\n    forge install\n    ```\n### Building\n\n1. Compile the contracts:\n    ```bash\n    forge build\n    ```\n\n### Testing\n\n1. Run the test suite:\n    ```bash\n    forge test\n    ```\n2. For a gas report:\n    ```bash\n    forge test --gas-report\n    ```\n\n### Deployment\n\n#### To deploy to the Chiado testnet:\n\n1. Copy `.env.example` to `.env` and set your (Chiado) private key and (Blockscout) API keys.\n2. Run the deployment script:\n    ```bash\n    ./script/deployments/chiadoDeploy.sh\n    ```\n\n#### To deploy to Gnosis Chain mainnet:\n\n1. **Checkout out the release candidate `rc-v1.0.0-beta`**\n    ```\n    git checkout rc-v1.0.0-beta\n    ```\n2. If you haven't already, be sure to first build the code so that we separate that step from the deployment process (forge test will `build` and then run the unit tests).\n    ```\n    forge test\n    ```\n2. Copy `.env.example` to `.env` and set your private key; in particular for deployment the script only requires a private key for a deployer address on Gnosis Chain (with minimal funding, deployment costs are far less than 1 XDAI):\n    ```\n    PRIVATE_KEY_GNOSIS='YOUR_PRIVATE_KEY'\n    ```\n3. Run the mainnet deployment script (CORRECTION: be sure to also run `npm install`):\n    ```\n    cd script/deployments\n    npm install\n    ./gnosisChainDeploy.sh\n    ```\n    Forge SHOULD auto-configure the build parameters from the foundry.toml file,\n    but for clarity on a deterministic build, we require the following build parameters:\n    - solc compiler version: v0.8.24+commit.e11b9ed9\n    - optimization enabled: Yes\n    - Optimizer runs: 200\n    - EVM version: cancun\n    - License: GNU AGPLv3\n\n    Note that the production deployment script waits 20 seconds between each deployment,\n    so feel free to go stretch your legs.\n\n4. The deploy script will create a folder locally on your machine:\n    ```\n    \u003croot\u003e/script/deployments/gnosischain-rc-1.0.0-beta-bb1ed9a-\u003cday\u003e-\u003ctime\u003e/\n    ```\n    with two important files (and extra helper files):\n    - `gnosischain-artefacts-\u003cidentifier\u003e.txt` with verification data for each deployed contract\n    - and `gnosischain-\u003cidentifier\u003e.log` with a better human-readable summary of the deployment\n\nThe deployment script should have deployed 9 contracts:   \n- Hub,\n- Migration,\n- NameRegistry,\n- ERC20Lift,\n- StandardTreasury,\n- BaseGroupMintPolicy,\n- MastercopyDemurrageERC20,\n- MastercopyInflationaryERC20 and \n- MastercopyStandardVault\n\n### Optionally, verifying your contracts\n\nNote, as we are looking for redundant deterministic deployments, it is likely for `rc-v1.0.0-beta` that your deployment will already be recognised by the block explorers.\n\nHowever, in case that is not the case, below are instructions to help you get started\n\n#### Gnosis Blockscout\n\nYou will need to set a `BLOCKSCOUT_API_KEY` set in the `.env` file. Go to Blockscout.com to configure your account and get an API key.\n\nAn easy way to verify the contracts on `gnosis.blockscout.com` is to run the same deployment \non Chiado testnet (see instructions above). You will need to add a private key with testnet xdai funding on Chiado to the `.env` file.\nThe Chiado deployment script will attempt to directly verify as it is deploying the contracts to Chiado through blockscout. This can intermittently fail, so we don't use these options for the mainnet deployment script. However, on Chiado, should this fail you can run it a second time. Once a contract is verified on Chaido it will also be recognised on Blockscout Gnosis Chain.\n\n### Gnosisscan\n\nWIP: there is a `verifyDeployment.sh` script which aims to verify through the gnosisscan.io API, however it has a bug where Gnosisscan does not receive the correct EVM version `cancun` and compilation on their side will fail for Hub.sol.\n\nManually verifying on gnosisscan.io can be done, by going to your deployed address and following the instructions there.\nThe required parameters are listed above in the deployment section. However to obtain a single \"flattened source code file\" (recommended), you can use forge as follows, eg. for Hub.sol from the project root:\n\n```\nforge flatten ./src/hub/Hub.sol -o flattened_hub.sol\n```\n\n### Sourcify\n\n(later), might also help with gnosisscan.io if they cooperate.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the [AGPL-3.0 License](LICENSE).\n\n## Disclaimer\n\nThis project is currently under active development and should be considered in beta stage. While the contracts for Circles v2 have undergone both internal and external reviews (reports available in the `/reviews` directory), users should be aware of the following:\n\n- **Caution for Production Use**: This software is in beta stage. Use in production environments should be approached with caution and only after thorough review, testing, and appropriate risk assessment.\n- **As-Is Basis**: The software is provided \"as-is\" without any warranties, express or implied.\n- **No Liability**: The developers and contributors of this project shall not be held liable for any damages or losses arising from the use of this software.\n- **License**: This project is released under the GNU Affero General Public License v3.0 (AGPL-3.0). Users must comply with the terms of this license when using, modifying, or distributing the software.\n- **Security**: While efforts have been made to ensure the security of the contracts, users should conduct their own security audits before any significant use.\n- **Updates**: This software may undergo significant changes. Users are advised to regularly check for updates and review the changelog.\n\nBy using this software, you acknowledge that you have read this disclaimer, understand its contents, and agree to its terms.\n\n## Contact\n\nFor questions or support regarding this project, please contact:\n\n- About Circles \u003csupport@aboutcircles.com\u003e\n- Ben \u003cbenjamin.bollen@gnosis.io\u003e\n\nWe appreciate your interest, feedback and contributions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutcircles%2Fcircles-contracts-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboutcircles%2Fcircles-contracts-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutcircles%2Fcircles-contracts-v2/lists"}