Minimal end-to-end project for shipping a dApp on Sentrix Chain (chain ID 7119 mainnet, 7120 testnet) — deploys a small ERC-20 from a Foundry script, wraps native SRX into WSRX, reads it back with viem, and verifies the contract source against the self-hosted Sourcify at verify.sentrixchain.com.
If you can deploy on Ethereum, you can deploy on Sentrix — Sentrix runs an embedded revm 38 interpreter so every Solidity / Vyper contract that targets Cancun-era EIPs works with no Sentrix-specific changes.
SentrixDemoToken— a 1M-supply ERC-20 you mint to your deploy wallet.- WSRX wrap demo — deposit native SRX into the canonical
WSRXcontract and read the wrapped balance back. - Sourcify verification — submit your
SentrixDemoTokensource so it shows up green-checkmarked onscan.sentrixchain.com.
- Foundry (
forge,cast) - Node 22+ +
pnpmfor the viem read-side script - A funded wallet on testnet — grab tSRX from
faucet.sentrixchain.com
.
├── contracts/
│ └── SentrixDemoToken.sol # ERC-20 (OpenZeppelin)
├── script/
│ ├── Deploy.s.sol # Foundry deploy
│ └── WrapSrx.s.sol # Native SRX → WSRX wrap demo
├── scripts/
│ └── read-balance.ts # viem read-side smoke test
├── test/
│ └── SentrixDemoToken.t.sol # `forge test` — mint + transfer + permit
├── foundry.toml
├── remappings.txt
├── package.json
└── .env.example
# 1. Install deps
forge install OpenZeppelin/openzeppelin-contracts --no-commit
pnpm install
# 2. Configure
cp .env.example .env
# Edit .env: set DEPLOY_PRIVATE_KEY (NEVER commit this) + RPC_URL
# 3. Deploy + wrap
forge build
forge test
forge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcast --legacy
forge script script/WrapSrx.s.sol --rpc-url $RPC_URL --broadcast --legacy
# 4. Read it back
pnpm read
# 5. Verify on Sourcify (testnet 7120 example)
forge verify-contract \
--verifier sourcify \
--verifier-url https://verify.sentrixchain.com \
--chain 7120 \
<DEPLOYED_ADDRESS> \
contracts/SentrixDemoToken.sol:SentrixDemoTokenPulled from https://sentrixchain.com/chain.json. Drop these into MetaMask, ethers, viem, or any tool that knows about eth_chainId:
--legacyflag onforge scriptbecause the public RPC currently rejects EIP-1559 transactions during the early-launch window. Will lift once gas-price oracles stabilise.- 8-decimal native ledger, 18-decimal EVM view. Sentrix's underlying ledger is BTC-style 8-decimal (1 SRX = 100,000,000 sentri). EVM tooling sees the standard 18-decimal wei-scaled view —
eth_getBalancereturnsbalance * 1e10so MetaMask + ethers + viem display correctly without any Sentrix-specific config. debug_traceTransactionis not exposed. The chain doesn't currently serve the trace surface; tools that depend on it (Tenderly, etc.) won't work. Standard event logs + receipts cover most use cases.- Block time = 1 second. Plan your gas / mempool assumptions accordingly.
- Finality = 2/3+1 stake-weighted precommit supermajority. A block is "justified" when its precommits cross 2/3+1 and "finalized" when a descendant block is justified. For exchange / bridge integrations: wait for finalized, not just included.
MIT — copy and modify freely.
