Skip to content

eightfilms/kickstark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kickstark

An ERC20 crowdfund implementation on StarkNet, inspired by Solidity By Example.

Disclaimer: This code is not intended for production use and has not been audited or tested thoroughly. It is not an exact 1-1 implementation

Crowd fund ERC20 token:

  1. User creates a campaign.

  2. Users can pledge, transferring their token to a campaign.

  3. After the campaign ends, campaign creator can claim the funds if total amount pledged is more than the campaign goal.

  4. Otherwise, campaign did not reach it's goal, users can withdraw their pledge.

Setup

python3.7 -m venv venv
source venv/bin/activate
python -m pip install cairo-nile
nile install

Test

In this repo I made a small change to Makefile to enforce usage of @pytest.mark.asyncio and @pytest.asyncio.fixture to suppress warnings regarding pytest-asyncio usage.

The tests mostly test the happy paths and only a few unhappy paths. There could definitely be more work done on testing the unhappy paths.

test :; pytest tests/ --asyncio-mode=strict

Run tests:

make test

Acknowledgements

Here are some acknowledgements for people who wrote very helpful resources that I referred to while learning:

sambarnes, for their work on cairo-dutch, used it extensively as a reference

perama for their notes on Cairo

RoboTeddy for their notes on Practical StarkNet lessons learned

About

ERC20 Crowdfund implementation for StarkNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published