Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Carbonable/carbon-protocol
Carbon Starknet Protocol written in Cairo.
https://github.com/Carbonable/carbon-protocol
cairo carbon-offsetting starknet
Last synced: about 1 month ago
JSON representation
Carbon Starknet Protocol written in Cairo.
- Host: GitHub
- URL: https://github.com/Carbonable/carbon-protocol
- Owner: Carbonable
- License: apache-2.0
- Created: 2022-05-16T16:29:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T09:55:42.000Z (5 months ago)
- Last Synced: 2024-08-01T22:45:33.375Z (4 months ago)
- Topics: cairo, carbon-offsetting, starknet
- Language: Cairo
- Homepage:
- Size: 52 MB
- Stars: 55
- Watchers: 3
- Forks: 20
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starknet - Carbon Protocol - Carbon Protocol written in Cairo. (Open-source projects)
README
## Usage
> ## β οΈ WARNING! β οΈ
>
> This repo contains highly experimental code.
> Expect rapid iteration.
> **Use at your own risk.**### Set up the project
#### π¦ Install the requirements
- [protostar](https://github.com/software-mansion/protostar)
### π Install
```bash
protostar install
```### βοΈ Compile
```bash
protostar build
```### π‘οΈ Test
```bash
# Run all tests
protostar test# Run only unit tests
protostar test tests/units# Run only integration tests
protostar test tests/integrations
```### π Test account
If you want a fresh account for tests, you can deploy an account with the following command:
```bash
starknet deploy_account --network=
```It will generate the account information into the `~/.starknet_accounts/starknet_open_zeppelin_accounts.json` file.
See also starknet [documentation](https://www.cairo-lang.org/docs/hello_starknet/account_setup.html#creating-an-account) for more details.### π Format code
```bash
cairo-format -i src/**/*.cairo tests/**/**/*.cairo
```### π Documentation
#### Requirements
- python environment (python >=3.9)
- [`mdutils`](https://pypi.org/project/mdutils/) dependency installed
- [`kaaper-cli`](https://github.com/onlydustxyz/kaaper) installed
- [`thoth`](https://github.com/FuzzingLabs/thoth) installed#### Generation
```bash
cd docs
kaaper generate ../src ./data
python build.py
callgraphs.sh
```## π Deployment
See [How to deploy Carbonable Protocol](https://carbonable.notion.site/How-to-deploy-Carbonable-Protocol-099b947ee1c74ff0923bbcf2178b5979)
### Inputs
To manage inputs sent to constructor during the deployment, you can customize the [config files](./scripts/configs/).
### Prepare the contracts before tests
After deployment, the **admin** account (according to parameters) is the owner of all contracts.
So far, you have to do the following actions manually:- Change the NFT contract owner from **admin** to **Minter contract**
- How: _Voyager > Write contract > `transferOwnership`_
- Verify: _Voyager > Read contract > `owner`_
- Approve the **Minter contract** to spend the **admin payment tokens**
- How: Voyager > _Write contract > `approve`_
- Verify: Voyager > _Read contract > `allowance`_
- Buy NFT through the **Minter contract**
- How: _Voyager > Write contract > `buy`_
- Verify: _Voyager > Read contract > `balanceOf` (of the NFT contract)_## π License
**carbon-protocol** is released under the [Apache License, Version 2.0](LICENSE).
## Contributors β¨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
AβΏdel β/21M πΊ - π±
π»
Bal7hazar
π»
Trunks @ Carbonable
π»
Ainur
π»
Nico
π»
rmzlb
π»
Arn0d
π»
valdo.carbonaboyz.stark
π»
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!