More Premium Hugo Themes Premium Nextjs Themes

Cairo By Example

Verbosely Documented, Minimal Starknet Contract Examples.

Cairo By Example

Verbosely Documented, Minimal Starknet Contract Examples.

Author Avatar Theme by refcell
Github Stars Github Stars: 66
Last Commit Last Commit: Jan 3, 2022 -
First Commit Created: Dec 18, 2023 -
default image

Overview

Cairo By Example is a project that aims to provide minimal StarkNet contract examples in the Cairo programming language. It is deployed and can be accessed at cairo-by-example.xyz. The project is still in the early and experimental phase and has not been audited or reviewed for security vulnerabilities. Therefore, it is not recommended for production use.

Features

  • Verbosely documented minimal StarkNet contract examples
  • Contracts defined and available for extensible use in the contracts subdirectory

Installation

To use Cairo By Example, follow these steps:

  1. Clone the repository.
  2. Install the required dependencies.
  3. Run the project locally.
  4. Compile the contracts.
  5. Run tests.

Additional installation instructions can be found in the cairo-lang documentation. Before installing Cairo on your machine, make sure to install gmp. If you encounter any issues with the installation on an Apple M1 computer, refer to the list of potential solutions provided.

For Visual Studio Code (VSCode) support, download cairo-0.6.2.vsix from the GitHub releases page and follow the instructions for setup.

To set up the environment, navigate to the cloned repository and create a Python virtual environment called Nile. Then, install the Nile dev environment to obtain the Cairo language, a local network, and a testing framework.

Summary

Cairo By Example is a project that provides minimal StarkNet contract examples written in the Cairo programming language. It is deployed and can be accessed at cairo-by-example.xyz. The project is still in the early and experimental phase and should not be used in production environments due to potential security vulnerabilities. Installation instructions are provided to clone the repository, install dependencies, compile contracts, and run tests. Additional instructions and support for Visual Studio Code are available.