GithubHelp home page GithubHelp logo

thaddeus19 / carbon-protocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carbonable/carbon-protocol

0.0 0.0 0.0 52.89 MB

Carbon Starknet Protocol written in Cairo.

License: MIT License

Shell 0.22% Python 0.68% Makefile 0.31% Cairo 98.79%

carbon-protocol's Introduction

Carbon Protocol on Starknet

Carbonable contracts written in Cairo for StarkNet.

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

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
  • 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 MIT.

carbon-protocol's People

Contributors

abdelstark avatar adrien-vieilleribiere avatar bal7hazar avatar cloudvenger avatar marchand-nicolas avatar tekkac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.