Skip to content

sentrix-labs/canonical-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentrix Labs

Sentrix Canonical Contracts

Production EVM contracts for Sentrix Chain — WSRX, Multicall3, SentrixSafe, TokenFactory.

CI Security License Solidity Foundry


What's in here

Deployed on both chains (mainnet 7119 + testnet 7120)

Contract Purpose
WSRX Wrapped SRX — ERC-20 (18 decimals) backed 1:1 by native SRX. Lets EVM dApps hold SRX as a token.
Multicall3 Standard Multicall3 (mds1/multicall) for batched read/write calls.
SentrixSafe Minimal multi-sig wallet (Gnosis Safe v1.4.1-derived) for treasury management. Currently configured 1-of-1 with the Sentrix Labs authority signer (0xa25236925bc10954e0519731cc7ba97f4bb5714b) on both chains — see docs/ADDRESSES.md.
TokenFactory Deploys minimal ERC-20 tokens via a single function call. v1 + v1.1.0 both deployed (see addresses doc).

Deployed on mainnet (7119) only

Contract Purpose
CoinBlastCurve Bonding-curve token contract. The CBLAST genesis token launched via this curve on 2026-05-01 — first on-chain CoinBlast bonding-curve launch.

In-tree but not yet deployed

Contract Purpose
CoinBlastFactory Launchpad-style factory that spawns new CoinBlastCurve instances. Code-complete; deployment gated on the launchpad UX surface landing.
MerkleAirdrop Merkle-root airdrop distribution contract for the planned eligibility-based SRX drops. Code-complete; deployment gated on the airdrop campaign go-signal.
StrategicReserveTimelock Time-locked treasury vault for the Strategic Reserve allocation. Code-complete; deployment gated on Strategic Reserve EOA → contract migration plan.

See docs/ADDRESSES.md for deployed addresses on each chain.

Quickstart

git clone --recurse-submodules https://github.com/sentrix-labs/canonical-contracts.git
cd canonical-contracts

# Install Foundry: https://getfoundry.sh
curl -L https://foundry.paradigm.xyz | bash && foundryup

# Install dependencies
make install

# Build + test
make build
make test

# Coverage
make coverage     # outputs coverage/lcov.info

Integrate

npm install @sentrix-labs/canonical-contracts ethers
import { ethers } from "ethers";
import abi from "@sentrix-labs/canonical-contracts/deployments/abi/WSRX.json";
import deployments from "@sentrix-labs/canonical-contracts/deployments/7119.json";

const provider = new ethers.JsonRpcProvider("https://rpc.sentrixchain.com");
const wsrx = new ethers.Contract(deployments.WSRX.address, abi.abi, provider);
console.log("totalSupply:", await wsrx.totalSupply());

Full integration guide → docs/INTEGRATION.md.

Deploy

End-to-end runbook: docs/DEPLOYMENT.md. High-level flow:

# 1. One-time: import the deployer key into Foundry's encrypted keystore.
#    Prompts for the key + a passphrase; the key never lands in shell
#    history, `ps aux`, or this README. Subsequent forge commands
#    reference the account by name and Foundry prompts for the passphrase
#    at use time.
cast wallet import sentrix-deployer --interactive

# 2. Per-network env (RPC URL aliases; safe to commit, no secrets).
cp .env.example .env
$EDITOR .env

# 3. Deploy.
forge script script/DeployWSRX.s.sol --rpc-url sentrix_testnet --broadcast --account sentrix-deployer
forge script script/DeployWSRX.s.sol --rpc-url sentrix_mainnet --broadcast --account sentrix-deployer

# 4. Update deployments/7119.json + 7120.json + CHANGELOG.md
# 5. Tag release
git tag v1.0.0 && git push --tags

Important

Never deploy a production contract using --private-key $HEX on the command line. The hex appears in shell history, ps, and any CI logs that capture the invocation. Foundry's cast wallet import + --account <name> keeps the key in ~/.foundry/keystores/ under AES-128-CTR + scrypt and is the safer default.

CI auto-creates a GitHub Release from the CHANGELOG entry.

Verify

Sourcify-equivalent verification is on the ecosystem readiness Tier 1 backlog. Until that lands, run manual verification per docs/DEPLOYMENT.md §12.

Health-check a deployment:

WSRX_ADDR=0x... MULTICALL3_ADDR=0x... SAFE_ADDR=0x... FACTORY_ADDR=0x... \
  forge script script/CheckDeployment.s.sol --rpc-url sentrix_testnet

Security

  • All contracts immutable (no upgrade proxy — see docs/SECURITY_MODEL.md)
  • Pre-merge: forge test, forge build --sizes, slither, gitleaks
  • Daily: scheduled slither + mythril runs (security.yml)
  • Vulnerability disclosure: security@sentrixchain.com (SECURITY.md)

Docs

Doc What it covers
docs/ARCHITECTURE.md Contract relationships + 8↔18 decimal conversion
docs/DEPLOYMENT.md Step-by-step deploy runbook
docs/INTEGRATION.md Code examples (ethers, wagmi)
docs/SECURITY_MODEL.md Trust assumptions + threat model
docs/ADDRESSES.md Deployed addresses (auto-gen)
docs/FAQ.md Common questions
docs/STORAGE_LAYOUT.md Storage slots per contract
docs/AUDIT.md Audit status + findings (when available)

Contributing

See CONTRIBUTING.md. PRs welcome — forge test + forge fmt --check + slither --fail-high must pass before merge.

Community

License

BUSL-1.1 (see LICENSE + NOTICE). Change Date: 2030-01-01 → MIT.

Multicall3.sol is a verbatim mirror of mds1/multicall (MIT) — license preserved in the file's SPDX header.


Built by Sentrix Labs for Sentrix Chain.

About

Production EVM contracts for Sentrix Chain — WSRX, Multicall3, Safe, TokenFactory

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors