OpenViSTAI · Agents · Blockchain · Crypto
Menu
Smart Contracts

SGN Contracts

SGN Contracts is a public Solidity repository containing smart contracts for Celer State Guardian Network V2 and cBridge V2. It includes commands for unit tests, gas benchmarking and contract-size reports, plus Hardhat deployment files and procedures for maintaining deployment branches.

Independent OpenViST project profile, based on linked sources.

SGN Contracts — OpenViST project profile in Smart Contracts.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use the repository when developing against its Celer SGN V2 and cBridge V2 Solidity contracts, reviewing test or gas-report output, or following its documented deployment-branch process.

Who it is for

  • Solidity developers working on Celer SGN V2 or cBridge V2 contracts.
  • Teams that need to run the repository’s tests or review gas and contract-size reports.
  • Developers following the documented Hardhat deployment and explorer-verification workflows.

Documented uses

  • Run the repository’s unit-test suite after contract changes.
  • Generate gas-cost reports and inspect contract-size output.
  • Track deployments on the designated mainnet, staging or testnet branches.
  • Deploy documented contract tags and follow the repository’s explorer-verification procedures.
Before you choose

Requirements & limits

The repository is public and licensed under GPL-3.0.

  • The source language is Solidity and the documented deployment tooling is Hardhat.
  • The README identifies separate deployment branches for mainnet, staging and testnet and specifies that deployment records belong under ./deployments on those branches.
  • Deployment configuration uses a local .env file and an account private key; certain contract deployments also require verifier variables set to the Bridge address.
  • The project is licensed under GPL-3.0.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run the contract tests and gas reports

Run the repository’s unit-test command and generate gas benchmark and summary reports.

Before you start

  • A checkout of the SGN Contracts repository.
  • Yarn and the project dependencies set up.

Steps

  1. Run yarn test to run the unit tests.

  2. Run yarn report-gas:benchmark.

  3. Run yarn report-gas:summary.

  4. Review the gas outputs under reports/gas_usage.

Expected outcome

The test command runs the repository’s unit-test suite, and the benchmark commands produce gas-cost reports for review.

Guide limitations

  • The documentation does not specify test coverage or guarantee performance on any target chain.
Source-based practical guide

Prepare and deploy a tagged contract

Follow the documented setup and Hardhat command for deploying a selected contract tag to a configured network.

Before you start

  • A repository checkout and the project’s Hardhat deployment setup.
  • A configured .env file with the required environment variables, network endpoint and account private key.

Steps

  1. Copy .env.template to .env and set the required environment variables.

  2. Set the network endpoint by replacing its INFURA-PROJECT-ID suffix and add the account private key using the environment-variable name referenced in hardhat.config.ts.

  3. For SGN and Staking, run hardhat deploy --network --tags SGNStaking; the README also documents Bridge and token-vault deployment tags.

  4. For token-vault or pegged-token-bridge deployments, set the relevant verifier variable to the Bridge address before running that contract’s tag command.

Expected outcome

Hardhat is invoked to deploy the selected tagged contracts to the configured network.

Guide limitations

  • Deployment requires network-specific configuration and a private key.
  • The README’s token-vault instructions require verifier configuration; consult the repository instructions for the exact variable and tag for the contract being deployed.
  • These instructions describe a deployment workflow, not a guarantee that a deployment will succeed.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
celer-network/sgn-v2-contracts · Official homepage title · retained in its source language