Skip to content

a set of useful functions utils for manipulating arrays in Cairo lang

License

Notifications You must be signed in to change notification settings

CodeforDAO/cairo-array-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeforDAO Contracts in Cairo (StarkNet)

Base on, build upon and code for DAOs.

Make DAO the next generation of productivity tools for global collaboration.

Follow us on Twitter @codefordao.

mit license

Cairo-array-utils

This module is implemented on StarkNet in Cairo language. Using this module requires that you have a basic understanding of the Cairo language and python.

Install

pip install git+https://github.com/CodeforDAO/cairo-array-utils.git

APIs

from codefordao.utils.array import Array

# APIs
Array.save(
  arr_len: felt,
  arr: felt*
) -> (key: felt)

Array.get_item(
  key: felt,
  index: felt
) -> (res: felt)

Array.get_array(
  key: felt,
) -> (
  arr_len: felt,
  arr: felt*
)

Set up the project

Create a Python virtual environment

python -m venv env
source env/bin/activate

📦 Install the requirements

pip install -r requirements.txt

⛏️ Compile

nile compile --directory src

🌡️ Test

# Run all tests
pytest tests

📄 License

cairo-array-utils is released under the MIT.

About

a set of useful functions utils for manipulating arrays in Cairo lang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published