abaleo / sx-starknet

Core smart contracts of Snapshot X for Starknet

Home Page:https://docs.snapshotx.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snapshot X

A Cairo implementation of the Snapshot X Protocol. Refer to the documentation for more information.

Architecture

The repository is split into two different parts:

  1. The Cairo files are in a Scarb package under ./starknet. (Tested with Scarb version 0.7.0)
  2. The Solidity files are in a Forge package under ./ethereum. (Tested with Forge version 0.2.0)

There is also Hardhat Project in the root directory for crosschain tests.

Run Cairo Tests

Enter directory:

cd starknet

Build contracts:

scarb build

Run tests:

scarb test

Run Solidity Tests

Enter directory:

cd ethereum

Build contracts:

forge build

Run tests:

forge test

Run Hardhat Tests

The Hardhat tests can be run following the procedure followed in the CI. You will need local Starknet Devnet and Ethereum devnet instances running.

About

Core smart contracts of Snapshot X for Starknet

https://docs.snapshotx.xyz

License:MIT License


Languages

Language:Cairo 69.3%Language:TypeScript 19.8%Language:Solidity 10.6%Language:Shell 0.3%