Skip to content

SupremeSingh/zkpBootcampJuly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo overview

This package contains small exercises to get you used to reading and writing Cairo code, all while abstracting away much of the legwork that revolves around development, such as compilation or deployment. Abstraction is accomplished using a script that automatically compiles, deploys and tests .cario files, so what is left is to fix the code so that it fulfils desired criteria.

There are two distinct exercise sets:

  • Cairo programs
  • Starknet contracts

After the invocation, the Python script will iterate over the exercises, Cairo programs and StarkNet contracts.

This form of the tutorial has been inspired by rustlings repo (used for learning rust) and likewise to communicate to the script to proceed to the next exercise tag ## I am not done at the top of the file has to be removed.

Quick Start

gitpod.io/#github.com/SupremeSingh/zkpBootcampJuly/

Set-up

Precursors necessary are:

Starting autoloader script

From within the main repo directory, run:

python3 main.py

In the background, it will invoke the following command (for the first exercise)

protostar test test/test_ex1.cairo

with the exception that the python script will recompile and retest upon saving of any .cairo exercise file.

All tests should pass without any modification of the test files.

Hence you must only modify the .cairo files in the /exercises/ directory.

Cairo programs exercises

Cairo is a programming language for writing provable programs, where one party can prove computational integrity to the other party without revealing computation or the input data.

These are single purpose functions that accomplish some logic, that rather than being useful to some application, forces you to think the "cairo" way. Function declarations are not to be modified, as they are invoked from within the tests. If you find a way to solve a challenge without using up all of the available parameter slots, leave some unused rather than remove them.

Conversion helper

File conversion.py in the root directory can be used for conversion between felt and strings and numbers and uint256.

To use that helper iteratively interactively run:

python3 -i conversion.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published