All Projects → a5f9t4 → cairomate

a5f9t4 / cairomate

Licence: AGPL-3.0 license
Structured, dependable legos for Starknet development.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cairomate

cairomate
Structured, dependable legos for Starknet development.
Stars: ✭ 78 (-41.79%)
Mutual labels:  cairo, nile, starknet
ape
The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
Stars: ✭ 339 (+152.99%)
Mutual labels:  cairo, starknet
cairo-by-example
Verbosely Documented, Minimal Starknet Contract Examples.
Stars: ✭ 63 (-52.99%)
Mutual labels:  cairo, starknet
argent-x
ArgentX browser extension for StarkNet - made with ❤️ by Argent
Stars: ✭ 419 (+212.69%)
Mutual labels:  cairo, starknet
conky-for-macOS
macOS port of the Light-weight system monitor for X.
Stars: ✭ 139 (+3.73%)
Mutual labels:  cairo
mplcairo
A (new) cairo backend for Matplotlib.
Stars: ✭ 87 (-35.07%)
Mutual labels:  cairo
gagar
Standalone graphical agar.io Python client/bot using GTK and agarnet
Stars: ✭ 21 (-84.33%)
Mutual labels:  cairo
node-poppler
Asynchronous node.js wrapper for the Poppler PDF rendering library
Stars: ✭ 97 (-27.61%)
Mutual labels:  cairo
ocaml-cairo
Binding to Cairo, a 2D Vector Graphics Library.
Stars: ✭ 39 (-70.9%)
Mutual labels:  cairo
oxbar
configurable X11 status bar for OpenBSD (and xstatbar successor)
Stars: ✭ 36 (-73.13%)
Mutual labels:  cairo
SublimeEthereum
Ethereum Solidity, Vyper, Yul and StarkNet Cairo language syntaxes
Stars: ✭ 102 (-23.88%)
Mutual labels:  cairo
cairo jpg
Reading and writing JPEG files from/to Cairo surfaces.
Stars: ✭ 26 (-80.6%)
Mutual labels:  cairo
Cairo
Swift library for Cairo
Stars: ✭ 33 (-75.37%)
Mutual labels:  cairo
lambda-layer-canvas-nodejs
AWS Lambda Layer with node-canvas and its dependencies packaged, provides a Cairo backed Mozilla Web Canvas API implementation
Stars: ✭ 36 (-73.13%)
Mutual labels:  cairo
cairo-cr
Cairo bindings for Crystal language.
Stars: ✭ 29 (-78.36%)
Mutual labels:  cairo
gtk-rs-core
Rust bindings for GNOME libraries
Stars: ✭ 179 (+33.58%)
Mutual labels:  cairo
slope
C/Gtk+ data visualization library.
Stars: ✭ 91 (-32.09%)
Mutual labels:  cairo
NaquadahBrowser
A web browser built in Julia Language from the ground up.
Stars: ✭ 31 (-76.87%)
Mutual labels:  cairo
Conky
Light-weight system monitor for X.
Stars: ✭ 5,123 (+3723.13%)
Mutual labels:  cairo
live-chart
A real-time charting library for Vala and GTK3 based on Cairo
Stars: ✭ 47 (-64.93%)
Mutual labels:  cairo

cairomate • Tests Lints GitHub GitHub package.json version

Structured, dependable legos for starknet development.

Directory Structure

contracts
├─ defi
│  ├─ ChainlinkPriceOracle"Simple price oracle using Chainlink's V3 Aggregator"
│  ├─ MultiExchange"Permissionless, ERC1155 Multitoken Exchange"
│  └─ StakingRewards"Flexible, stripped staking rewards measured by blocks"
├─ interfaces
│  ├─ IAccount"Account Interface"
│  ├─ IAggregatorV3"Chainlink V3 Aggregator Interface"
│  ├─ IERC20"ERC20 Contract Interface"
│  ├─ IERC165"ERC165 Contract Interface"
│  ├─ IERC721"ERC721 Contract Interface"
|  ├─ INERC721"N-ERC721 Contract Interface (felt-based ERC721)"
│  └─ IERC1155"ERC1155 Contract Interface"
├─ tokens
│  ├─ ERC20"Modern and gas efficient ERC20 + EIP-2612 implementation"
│  ├─ ERC721
│  │  ├─ ERC721 - "Modern and gas efficient ERC721 | Uint256-based + EIP-2612 implementation"
│  │  └─ N-ERC721 - "Modern and gas efficient ERC721 | felt-based + EIP-2612 implementation"
│  └─ ERC1155"Modern and gas efficient ERC1155 + EIP-165 implementation"
├─ utils
│  ├─ Account"Stripped account"
│  ├─ Ownable"Minimal, ownable contract instance"
│  ├─ Context"Port of OZ's Solidity Context Abstraction"
│  └─ Pausible"Pausible Solidity Functionality"
tests
├─ test_StakingRewards — "Flexible, stripped staking rewards measured by blocks"
├─ test_ERC20 - "Test ERC20 contract"
├─ test_ERC721 - "Test ERC721 contract"
└─ test_Ownable - "Test Ownable contract"

Installation

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.7.0.vsix from https://github.com/starkware-libs/cairo-lang/releases/tag/v0.7.0

And run:

code --install-extension cairo-0.7.0.vsix

Set up the project

Clone the repository

git clone [email protected]:abigger87/cairomate.git

cd into it and create a Python virtual environment:

cd cairomate
python3 -m venv env
source env/bin/activate

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

Usage

Compile the contracts

nile compile

Run tests

pytest

Running a specific test file (eg tests/test_ERC20.py):

pytest tests/test_ERC20.py

Test a specific test case:

pytest tests/test_ERC20.py -k 'test_mint'

Extending Cairo contracts

There's no clear contract extensibility pattern for Cairo smart contracts yet. In the meantime the best way to extend our contracts is copypasting and modifying them at your own risk. Remember this contracts are still under development and they have not gone through any audit or security review whatsoever.

Acknowledgements

Big thanks to:

Security

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

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

License

Cairomate Contracts are released under the AGPL-3.0-only.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].