# Maintained Smart Contracts

We declare & maintain Smart Contracts for the community so they can be used as library calls.

\
Those contracts:

* Are *declared* **both** Starknet Sepolia **and** Mainnet.
* Those contracts are re-deployed at each release, so their code correspond to the release commit.
* The source code is always available in the main garaga repository under `src/contracts`
* The contracts are only declared and not deployed, their expected usage is through [library syscalls.](https://book.cairo-lang.org/ch15-03-executing-code-from-another-class.html#library-calls), so their usage is done through their class hashes and not their contract address (which don't exist unless you deploy them yourself)

### Class hashes for Garaga v1.1.0.

| Contract                                                                                                                         | Class hash                                                        | Description                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| [Universal ECIP](https://github.com/keep-starknet-strange/garaga/tree/main/src/contracts/universal_ecip)                         | 0x396d5915ecf475aab117bb25a0272b261e9e25ffe1c0ce05a51a3f77489c89e | A contract allowing to compute elliptic curve multi scalar multiplication for all supported curve identifiers |
| [RiscZero Verifier](https://github.com/keep-starknet-strange/garaga/tree/main/src/contracts/autogenerated/risc0_verifier_bn254)  | 0x41d5e111b93acbf1afb531253e0bc64d43f90a8a99290361e851ec0c4968ab1 | A verifier for RiscZero Groth16-wrapped proofs.                                                               |
| [Drand Quicknet Verifier](https://github.com/keep-starknet-strange/garaga/tree/main/src/contracts/drand_quicknet)                | 0x86bf4360e082cd786bd785d3345df32777db89cd26b761f3e85b1993addfd0  | A contract to verify Drand BLS signatures and store them on-chain for randomness and tlock decryption.        |
| [Drand Decrypt Quicknet](https://github.com/keep-starknet-strange/garaga/tree/main/src/contracts/drand_decrypt_quicknet)         | 0x68e2381aa99c02aabe2a0fec18d9fb7cde6138b588dc0bcf0135a26d8ae7e22 | A contract for on-chain tlock decryption using drand. Wraps the verifier via library call.                    |
| [SP1 Groth16 Verifier](https://github.com/keep-starknet-strange/garaga/tree/main/src/contracts/autogenerated/sp1_verifier_bn254) | 0x230d8612bd464979000193e4eaa73489da965a6593fb563dd2244e0b6e0443a | A verifier for SP1 Groth16-wrapped proofs.                                                                    |

{% hint style="warning" %}
**Version Compatibility:** When generating calldata for these contracts, use the **same Garaga SDK version** as the release that declared the class hashes. For v1.1.0 contracts above, use `garaga==1.1.0` (pip), `garaga_rs` tag `v1.1.0`, or `garaga@1.1.0` (npm).

The SDK generates hints that are specific to each contract version. Mismatched versions will cause verification to fail.
{% endhint %}

{% hint style="info" %}
In case you need to obtain class hashes for different versions of Garaga or declare them yourself if they do not exist, you can checkout the Garaga repo at a particular commit and run `python .github/scripts/declare_maintained_contracts.py` or `python .github/scripts/verify_contracts.py`.

At each release tag, the CI ensures all contracts are declared before publishing packages.
{% endhint %}
