Awesome
<div align="center"> <h1 align="center">Carbon Protocol on Starknet</h1> <p align="center"> <a href="https://discord.gg/twyWfTGd6m"> <img src="https://img.shields.io/badge/Discord-6666FF?style=for-the-badge&logo=discord&logoColor=white"> </a> <a href="https://twitter.com/intent/follow?screen_name=Carbonable_io"> <img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white"> </a> </p> <h3 align="center">Carbonable contracts written in Cairo for StarkNet.</h3> </div>Usage
β οΈ WARNING! β οΈ
This repo contains highly experimental code. Expect rapid iteration. Use at your own risk.
Set up the project
π¦ Install the requirements
π Install
protostar install
βοΈ Compile
protostar build
π‘οΈ Test
# 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:
starknet deploy_account --network=<network>
It will generate the account information into the ~/.starknet_accounts/starknet_open_zeppelin_accounts.json
file.
See also starknet documentation for more details.
π Format code
cairo-format -i src/**/*.cairo tests/**/**/*.cairo
π Documentation
Requirements
- python environment (python >=3.9)
mdutils
dependency installedkaaper-cli
installedthoth
installed
Generation
cd docs
kaaper generate ../src ./data
python build.py
callgraphs.sh
π Deployment
See How to deploy Carbonable Protocol
Inputs
To manage inputs sent to constructor during the deployment, you can customize the config files.
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
- How: Voyager > Write contract >
- Approve the Minter contract to spend the admin payment tokens
- How: Voyager > Write contract >
approve
- Verify: Voyager > Read contract >
allowance
- How: Voyager > Write contract >
- Buy NFT through the Minter contract
- How: Voyager > Write contract >
buy
- Verify: Voyager > Read contract >
balanceOf
(of the NFT contract)
- How: Voyager > Write contract >
π License
carbon-protocol is released under the Apache License, Version 2.0.
Contributors β¨
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="http://starknet.io"><img src="https://avatars.githubusercontent.com/u/45264458?v=4?s=100" width="100px;" alt="AβΏdel β/21M πΊ - π±"/><br /><sub><b>AβΏdel β/21M πΊ - π±</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=AbdelStark" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Bal7hazar"><img src="https://avatars.githubusercontent.com/u/97087040?v=4?s=100" width="100px;" alt="Bal7hazar"/><br /><sub><b>Bal7hazar</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=Bal7hazar" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/tekkac"><img src="https://avatars.githubusercontent.com/u/98529704?v=4?s=100" width="100px;" alt="Trunks @ Carbonable"/><br /><sub><b>Trunks @ Carbonable</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=tekkac" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/julienbrs"><img src="https://avatars.githubusercontent.com/u/106234742?v=4?s=100" width="100px;" alt="Ainur"/><br /><sub><b>Ainur</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=julienbrs" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Marchand-Nicolas"><img src="https://avatars.githubusercontent.com/u/60229704?v=4?s=100" width="100px;" alt="Nico"/><br /><sub><b>Nico</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=Marchand-Nicolas" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/rmzlb"><img src="https://avatars.githubusercontent.com/u/25151724?v=4?s=100" width="100px;" alt="rmzlb"/><br /><sub><b>rmzlb</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=rmzlb" title="Code">π»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cloudvenger"><img src="https://avatars.githubusercontent.com/u/3840436?v=4?s=100" width="100px;" alt="Arn0d"/><br /><sub><b>Arn0d</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=cloudvenger" title="Code">π»</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/MartianGreed"><img src="https://avatars.githubusercontent.com/u/11038484?v=4?s=100" width="100px;" alt="valdo.carbonaboyz.stark"/><br /><sub><b>valdo.carbonaboyz.stark</b></sub></a><br /><a href="https://github.com/Carbonable/carbon-protocol/commits?author=MartianGreed" title="Code">π»</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->This project follows the all-contributors specification. Contributions of any kind welcome!