Verbosely Documented, Minimal Starknet Contract Examples.

Overview

cairo-by-example • tests & lints GitHub GitHub package.json version Vercel Deployment

Verbosely Documented, Minimal Starknet Contract Examples.

Cairo By Example deployed to https://cairo-by-example.xyz

Developing

Clone the repository

git clone [email protected]:a5f9t4/cairo-by-example.git
cd cairo-by-example

Install Dependencies

yarn

Run locally

yarn dev

Contracts

Contracts are defined and available for extensible use in the contracts subdirectory.

Usage

First time?

Further installation instructions provided in the cairo-lang docs

Before installing Cairo on your machine, you need to install gmp:

sudo apt install -y libgmp3-dev # linux
brew install gmp # mac

If you have any troubles installing gmp on your Apple M1 computer, here’s a list of potential solutions.

For VSCode support:

Download cairo-0.6.2.vsix from https://github.com/starkware-libs/cairo-lang/releases/tag/v0.6.2

And run:

code --install-extension cairo-0.6.2.vsix

Set up the environment

cd into it and create a Python virtual environment:

python3 -m venv env
source env/bin/activate

Nile

Install the Nile dev environment and then run install to get the Cairo language, a local network, and a testing framework.

pip3 install cairo-nile
nile install

Compile the contracts

nile compile

Run tests

pytest

Acknowledgements

Security

This project is still in a very early and experimental phase. It has never been audited nor thoroughly reviewed for security vulnerabilities. Not recommended for production use.

Please report any security issues you find by opening up an issue in this reposisitory.

License

Cairo-by-example Contracts are released under the AGPL-3.0-only.

You might also like...

🤪 A list of funny and tricky JavaScript examples

🤪 A list of funny and tricky JavaScript examples

🤪 A list of funny and tricky JavaScript examples

Jan 1, 2023

🚀🚀 A Shopify embedded app starter template, with updated dependencies, session storage, app context and examples for basic functionalities.

Shopify Node App Starter This is a starter template for embedded shopify apps based on the shopify cli node app. Contributions to create the perfect s

Jan 8, 2023

Live Reload Examples

Live Reload Examples Examples of live reloading code to create a fast feedback loop. Examples in this code repo accompany a soon to be published blog

Sep 29, 2022

Examples for Evolllution talk about omni api's

These are examples for the 2022 Evolution Conference. These are only intended for learning puposes so you can learn and develop your own tool set. P

Jun 3, 2022

Offline rendering examples at the command line with Node.js

Elementary Audio Offline Rendering Examples This repository holds a set of small examples using Elementary in Node.js to process audio files. Each sub

Jun 12, 2022

Examples and challenges of my video about Creating and testing a complete Node.js Rest API (Without frameworks)

Building a complete Node.js WebApi + testing with no frameworks Welcome, this repo is part of my youtube video about Creating and testing a complete N

Dec 23, 2022

This is a demo project for the SecTester JS SDK framework, with some installation and usage examples

This is a demo project for the SecTester JS SDK framework, with some installation and usage examples

SecTester SDK Demo Table of contents About this project About SecTester Setup Fork and clone this repo Get a Bright API key Explore the demo applicati

Dec 16, 2022

three.js examples. if you are first in learning three.js , this will give you much help.

three.js examples. if you are first in learning three.js , this will give you much help.

three-projected-material Three.js Material which lets you do Texture Projection on a 3d Model. Installation After having installed three.js, install i

Nov 2, 2022

Examples for Wonderland Engine -- development platform for VR, AR and 3D on the web.

Wonderland Engine Examples Repository of official examples for Wonderland Engine, development platform for VR, AR and 3D on the web. License The code

Nov 5, 2022
StarkNet support extension for VSCode. Visualize StarkNet contracts: view storage variables, external and view functions, and events.

StarkNet Explorer extension This VSCode extension quickly shows relevant aspects of StarkNet contracts: Storage variables of the current contract, and

Crytic 6 Nov 4, 2022
This is a development platform to quickly generate, develop & deploy smart contract based applications on StarkNet.

generator-starknet This is a development platform to quickly generate, develop, & deploy smart contract based apps on StarkNet. Installation First, in

Only Dust 34 Nov 18, 2022
Modern, Flexible Starknet Dapp Template

cairopal • Modern, Flexible Starknet Dapp Template. Developing Clone the repository git clone [email protected]:a5f9t4/cairopal.git cd cairopal Install D

andreas 38 Sep 28, 2022
A set of librairies in Cairo for use on StarkNet

Sekai StarkNet Libraries A series of libraries to help using Cairo on StarkNet. Examples for use in other Cairo contracts are provided in examples. Co

Sekai 38 Nov 14, 2022
StarkNet wallet <-> dApp bridge

get-starknet StarkNet wallet <-> dApp bridge Alpha version Goals Allow dApps to seamlessly connect to any wallet on StarkNet Allow wallets to seamless

null 44 Dec 21, 2022
Adapter application for consuming web3 messages from ie. wallets, and passing them on to starknet

?? StarknNet web3 account Development setup Clone deps with submodules git clone --recurse-submodules [email protected]:software-mansion-labs/starknet-we

Software Mansion – Labs 20 Nov 21, 2022
scaffold-stark is a forkable StarkNet dev stack focused on fast product iterations, inspired by scaffold-eth.

?? scaffold-stark scaffold-stark is a forkable StarkNet dev stack focused on fast product iterations, inspired by scaffold-eth. Drop in your Cairo sma

parketh 25 Oct 7, 2022
Gatsby-starter-minimal-blog - Typography driven, feature-rich blogging theme with minimal aesthetics.

Gatsby-starter-minimal-blog - Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting.

Priya Chakraborty 0 Jan 29, 2022
Examples of how to do query, style, dom, ajax, event etc like jQuery with plain javascript.

You (Might) Don't Need jQuery Frontend environments evolve rapidly nowadays and modern browsers have already implemented a great deal of DOM/BOM APIs

NEFE 20.3k Dec 24, 2022
Functions Recipes is a library of examples to help you getting started with Salesforce Functions and get used to their main features.

Functions Recipes Introduction Salesforce Functions lets you use the Salesforce Platform for building event-driven, elastically scalable apps and expe

Trailhead Apps 172 Dec 29, 2022