feat: OMNL Bank online production — 128 chains, Central Bank UI, settlement stack
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m22s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 27s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 31s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 56s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 34s
Validation / validate-terraform (push) Failing after 39s
Validation / validate-kubernetes (push) Failing after 14s
Validation / validate-smart-contracts (push) Failing after 20s
Validation / validate-security (push) Failing after 1m19s
Validation / validate-documentation (push) Failing after 27s
Verify Deployment / Verify Deployment (push) Failing after 1m13s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 08:44:42 -07:00
parent 2b1a3ba6af
commit 5dd67e2b1d
113 changed files with 13223 additions and 98 deletions

View File

@@ -0,0 +1,100 @@
#!/usr/bin/env bash
# OMNL Bank — production deploy on server (128-chain, Office 24)
set -euo pipefail
REPO_DIR="${OMNL_BANK_ROOT:-$HOME/smom-dbis-138}"
BRANCH="${OMNL_BANK_BRANCH:-main}"
LOG_DIR="${OMNL_BANK_LOG_DIR:-$HOME/omnl-bank/logs}"
ENV_FILE="${OMNL_BANK_ENV:-$REPO_DIR/.env}"
log() { echo "[$(date -Iseconds)] $*"; }
mkdir -p "$LOG_DIR"
if [ ! -d "$REPO_DIR/.git" ]; then
log "Cloning smom-dbis-138..."
git clone "https://gitea.d-bis.org/d-bis/smom-dbis-138.git" "$REPO_DIR"
fi
cd "$REPO_DIR"
log "Pull latest ($BRANCH)..."
git fetch origin
git checkout "$BRANCH"
git pull --ff-only origin "$BRANCH"
log "Generate 128-chain registry..."
node scripts/generate-omnl-128-chains.mjs
export SETTLEMENT_MIDDLEWARE_CONFIG="${SETTLEMENT_MIDDLEWARE_CONFIG:-config/settlement-middleware.production.v1.json}"
export DBIS_EXCHANGE_CONFIG="${DBIS_EXCHANGE_CONFIG:-config/dbis-exchange.production.v1.json}"
export OMNL_SUPPORTED_CHAINS_CONFIG="${OMNL_SUPPORTED_CHAINS_CONFIG:-config/omnl-supported-chains.v1.json}"
export OMNL_M2_TOKEN_REGISTRY="${OMNL_M2_TOKEN_REGISTRY:-config/omnl-m2-token-registry.v1.json}"
if [ -f "$ENV_FILE" ]; then
set -a
# shellcheck disable=SC1090
source "$ENV_FILE"
set +a
fi
build_pkg() {
local dir="$1"
log "Building $dir..."
cd "$REPO_DIR/$dir"
npm install --no-fund --no-audit
npm run build
}
for dir in packages/integration-foundation packages/settlement-core \
services/token-aggregation services/settlement-middleware services/dbis-exchange; do
build_pkg "$dir"
done
log "Building frontend..."
cd "$REPO_DIR/frontend-dapp"
if command -v pnpm >/dev/null 2>&1; then
pnpm install --frozen-lockfile 2>/dev/null || pnpm install
pnpm run build
else
npm install
npm run build
fi
start_svc() {
local name="$1"
local dir="$2"
local port="$3"
local cmd="$4"
log "Starting $name on :$port"
cd "$REPO_DIR/$dir"
pkill -f "node.*$dir" 2>/dev/null || true
nohup bash -c "$cmd" >"$LOG_DIR/$name.log" 2>&1 &
echo $! >"$LOG_DIR/$name.pid"
}
start_svc token-aggregation services/token-aggregation 3000 "npm run start"
sleep 2
start_svc settlement-middleware services/settlement-middleware 3011 "npm run start"
sleep 2
start_svc dbis-exchange services/dbis-exchange 3012 "npm run start"
sleep 2
FRONTEND_PORT="${OMNL_BANK_FRONTEND_PORT:-3002}"
pkill -f "serve -s.*$FRONTEND_PORT" 2>/dev/null || true
cd "$REPO_DIR/frontend-dapp"
nohup npx --yes serve -s dist -l "$FRONTEND_PORT" >"$LOG_DIR/frontend.log" 2>&1 &
echo $! >"$LOG_DIR/frontend.pid"
sleep 5
log "Health checks..."
curl -sf "http://127.0.0.1:3011/api/v1/settlement/health" | head -c 200 || true
echo
curl -sf "http://127.0.0.1:3012/api/v1/exchange/health" | head -c 200 || true
echo
curl -sf -o /dev/null -w "frontend=%{http_code}\n" "http://127.0.0.1:$FRONTEND_PORT/central-bank"
log "OMNL Bank deploy complete"
log " Central Bank: http://127.0.0.1:$FRONTEND_PORT/central-bank"
log " Office 24: http://127.0.0.1:$FRONTEND_PORT/office-24"
log " DBIS Trade: http://127.0.0.1:$FRONTEND_PORT/trade"
log " 128 chains: http://127.0.0.1:3011/api/v1/settlement/chains"

View File

@@ -0,0 +1,142 @@
#!/usr/bin/env node
/**
* Generate config/omnl-supported-chains.v1.json — 128-chain OMNL Bank registry.
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const outPath = path.resolve(__dirname, '../config/omnl-supported-chains.v1.json');
const CORE = [
{ chainId: 138, name: 'DeFi Oracle Meta Mainnet', symbol: 'ETH', tier: 'primary', omnlRole: 'settlement-hub', explorer: 'https://explorer.d-bis.org', rpcDefault: 'http://192.168.11.221:8545' },
{ chainId: 651940, name: 'ALL Mainnet', symbol: 'ALL', tier: 'primary', omnlRole: 'mirror-target', explorer: 'https://alltra.global', rpcDefault: 'https://mainnet-rpc.alltra.global' },
{ chainId: 1, name: 'Ethereum', symbol: 'ETH', tier: 'l1', omnlRole: 'reserve', explorer: 'https://etherscan.io', rpcDefault: 'https://eth.llamarpc.com' },
{ chainId: 56, name: 'BNB Smart Chain', symbol: 'BNB', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://bscscan.com', rpcDefault: 'https://bsc-dataseed.binance.org' },
{ chainId: 137, name: 'Polygon', symbol: 'POL', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://polygonscan.com', rpcDefault: 'https://polygon-bor-rpc.publicnode.com' },
{ chainId: 43114, name: 'Avalanche C-Chain', symbol: 'AVAX', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://snowtrace.io', rpcDefault: 'https://api.avax.network/ext/bc/C/rpc' },
{ chainId: 42161, name: 'Arbitrum One', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://arbiscan.io', rpcDefault: 'https://arb1.arbitrum.io/rpc' },
{ chainId: 10, name: 'Optimism', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://optimistic.etherscan.io', rpcDefault: 'https://mainnet.optimism.io' },
{ chainId: 8453, name: 'Base', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://basescan.org', rpcDefault: 'https://mainnet.base.org' },
{ chainId: 100, name: 'Gnosis', symbol: 'xDAI', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://gnosisscan.io', rpcDefault: 'https://rpc.gnosischain.com' },
{ chainId: 25, name: 'Cronos', symbol: 'CRO', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://cronoscan.com', rpcDefault: 'https://evm.cronos.org' },
{ chainId: 42220, name: 'Celo', symbol: 'CELO', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://celoscan.io', rpcDefault: 'https://forno.celo.org' },
{ chainId: 1111, name: 'Wemix', symbol: 'WEMIX', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://scan.wemix.com', rpcDefault: 'https://api.wemix.com' },
{ chainId: 250, name: 'Fantom', symbol: 'FTM', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://ftmscan.com', rpcDefault: 'https://rpc.ftm.tools' },
{ chainId: 1284, name: 'Moonbeam', symbol: 'GLMR', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://moonscan.io', rpcDefault: 'https://rpc.api.moonbeam.network' },
{ chainId: 1285, name: 'Moonriver', symbol: 'MOVR', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://moonriver.moonscan.io', rpcDefault: 'https://rpc.api.moonriver.moonbeam.network' },
{ chainId: 324, name: 'zkSync Era', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.zksync.io', rpcDefault: 'https://mainnet.era.zksync.io' },
{ chainId: 59144, name: 'Linea', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://lineascan.build', rpcDefault: 'https://rpc.linea.build' },
{ chainId: 534352, name: 'Scroll', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://scrollscan.com', rpcDefault: 'https://rpc.scroll.io' },
{ chainId: 81457, name: 'Blast', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://blastscan.io', rpcDefault: 'https://rpc.blast.io' },
{ chainId: 5000, name: 'Mantle', symbol: 'MNT', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.mantle.xyz', rpcDefault: 'https://rpc.mantle.xyz' },
{ chainId: 169, name: 'Manta Pacific', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://pacific-explorer.manta.network', rpcDefault: 'https://pacific-rpc.manta.network/http' },
{ chainId: 1101, name: 'Polygon zkEVM', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://zkevm.polygonscan.com', rpcDefault: 'https://zkevm-rpc.com' },
{ chainId: 34443, name: 'Mode', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.mode.network', rpcDefault: 'https://mainnet.mode.network' },
{ chainId: 7777777, name: 'Zora', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.zora.energy', rpcDefault: 'https://rpc.zora.energy' },
{ chainId: 204, name: 'opBNB', symbol: 'BNB', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://opbnbscan.com', rpcDefault: 'https://opbnb-mainnet-rpc.bnbchain.org' },
{ chainId: 1088, name: 'Metis', symbol: 'METIS', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.metis.io', rpcDefault: 'https://andromeda.metis.io/?owner=1088' },
{ chainId: 122, name: 'Fuse', symbol: 'FUSE', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://explorer.fuse.io', rpcDefault: 'https://rpc.fuse.io' },
{ chainId: 288, name: 'Boba', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://bobascan.com', rpcDefault: 'https://mainnet.boba.network' },
{ chainId: 1313161554, name: 'Aurora', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.aurora.dev', rpcDefault: 'https://mainnet.aurora.dev' },
{ chainId: 8217, name: 'Klaytn', symbol: 'KLAY', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://scope.klaytn.com', rpcDefault: 'https://public-node-api.klaytnapi.io/v1/cypress' },
{ chainId: 1666600000, name: 'Harmony', symbol: 'ONE', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://explorer.harmony.one', rpcDefault: 'https://api.harmony.one' },
{ chainId: 4689, name: 'IoTeX', symbol: 'IOTX', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://iotexscan.io', rpcDefault: 'https://babel-api.mainnet.iotex.io' },
{ chainId: 9001, name: 'Evmos', symbol: 'EVMOS', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://escan.live', rpcDefault: 'https://evmos.lava.build' },
{ chainId: 321, name: 'KCC', symbol: 'KCS', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://explorer.kcc.io', rpcDefault: 'https://rpc-mainnet.kcc.network' },
{ chainId: 1030, name: 'Conflux eSpace', symbol: 'CFX', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://evm.confluxscan.net', rpcDefault: 'https://evm.confluxrpc.com' },
{ chainId: 7700, name: 'Canto', symbol: 'CANTO', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://tuber.build', rpcDefault: 'https://canto.gravitychain.io' },
{ chainId: 592, name: 'Astar', symbol: 'ASTR', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://astar.subscan.io', rpcDefault: 'https://evm.astar.network' },
{ chainId: 1818, name: 'Cube', symbol: 'CUBE', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://www.cubescan.network', rpcDefault: 'https://http-mainnet.cube.network' },
{ chainId: 888, name: 'Wanchain', symbol: 'WAN', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://wanscan.org', rpcDefault: 'https://gwan-ssl.wandevs.org:56891' },
{ chainId: 61, name: 'Ethereum Classic', symbol: 'ETC', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://blockscout.com/etc/mainnet', rpcDefault: 'https://etc.rivet.link' },
{ chainId: 520, name: 'XT Smart Chain', symbol: 'XT', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://www.xscan.ai', rpcDefault: 'https://datarpc1.xsc.pub' },
{ chainId: 23294, name: 'Oasis Sapphire', symbol: 'ROSE', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://explorer.oasis.io', rpcDefault: 'https://sapphire.oasis.io' },
{ chainId: 71402, name: 'Godwoken', symbol: 'CKB', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://v1.gwscan.com', rpcDefault: 'https://v1.mainnet.godwoken.io/rpc' },
{ chainId: 1116, name: 'Core', symbol: 'CORE', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://scan.coredao.org', rpcDefault: 'https://rpc.coredao.org' },
{ chainId: 42793, name: 'Etherlink', symbol: 'XTZ', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.etherlink.com', rpcDefault: 'https://node.mainnet.etherlink.com' },
{ chainId: 1135, name: 'Lisk', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://blockscout.lisk.com', rpcDefault: 'https://rpc.api.lisk.com' },
{ chainId: 252, name: 'Fraxtal', symbol: 'FRAX', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://fraxscan.com', rpcDefault: 'https://rpc.frax.com' },
{ chainId: 480, name: 'World Chain', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://worldscan.org', rpcDefault: 'https://worldchain-mainnet.g.alchemy.com/public' },
{ chainId: 1480, name: 'Vana', symbol: 'VANA', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://vanascan.io', rpcDefault: 'https://rpc.vana.org' },
{ chainId: 80094, name: 'Berachain', symbol: 'BERA', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://berascan.com', rpcDefault: 'https://rpc.berachain.com' },
{ chainId: 130, name: 'Unichain', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://uniscan.xyz', rpcDefault: 'https://mainnet.unichain.org' },
{ chainId: 196, name: 'X Layer', symbol: 'OKB', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://www.oklink.com/xlayer', rpcDefault: 'https://rpc.xlayer.tech' },
{ chainId: 199, name: 'BitTorrent Chain', symbol: 'BTT', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://bttcscan.com', rpcDefault: 'https://rpc.bittorrentchain.io' },
{ chainId: 106, name: 'Velas', symbol: 'VLX', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://evmexplorer.velas.com', rpcDefault: 'https://evmexplorer.velas.com/rpc' },
{ chainId: 1000, name: 'GTON', symbol: 'GCD', tier: 'l1', omnlRole: 'staged', explorer: '', rpcDefault: '' },
{ chainId: 2222, name: 'Kava EVM', symbol: 'KAVA', tier: 'l1', omnlRole: 'liquidity', explorer: 'https://explorer.kava.io', rpcDefault: 'https://evm.kava.io' },
{ chainId: 1996, name: 'Sanko', symbol: 'DMT', tier: 'l1', omnlRole: 'staged', explorer: 'https://sanko-arbiscan.io', rpcDefault: 'https://mainnet.sanko.xyz' },
{ chainId: 167000, name: 'Taiko', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://taikoscan.io', rpcDefault: 'https://rpc.mainnet.taiko.xyz' },
{ chainId: 690, name: 'Redstone', symbol: 'ETH', tier: 'l2', omnlRole: 'liquidity', explorer: 'https://explorer.redstone.xyz', rpcDefault: 'https://rpc.redstonechain.com' },
{ chainId: 810180, name: 'zkLink Nova', symbol: 'ETH', tier: 'l2', omnlRole: 'staged', explorer: 'https://explorer.zklink.io', rpcDefault: 'https://rpc.zklink.io' },
{ chainId: 534351, name: 'Scroll Sepolia', symbol: 'ETH', tier: 'testnet', omnlRole: 'test', explorer: 'https://sepolia.scrollscan.com', rpcDefault: 'https://sepolia-rpc.scroll.io' },
{ chainId: 11155111, name: 'Ethereum Sepolia', symbol: 'ETH', tier: 'testnet', omnlRole: 'test', explorer: 'https://sepolia.etherscan.io', rpcDefault: 'https://rpc.sepolia.org' },
{ chainId: 2138, name: 'Defi Oracle Meta Testnet', symbol: 'ETH', tier: 'testnet', omnlRole: 'test', explorer: 'https://public-2138.defi-oracle.io', rpcDefault: 'https://rpc.public-2138.defi-oracle.io' },
];
function toEntry(c, status) {
return {
chainId: c.chainId,
name: c.name,
type: 'evm',
nativeSymbol: c.symbol,
tier: c.tier,
omnlRole: c.omnlRole,
status,
rpcEnv: `CHAIN_${c.chainId}_RPC_URL`,
explorerUrl: c.explorer || undefined,
rpcDefault: c.rpcDefault || undefined,
settlement: {
m2LoadEnabled: status === 'active',
swapEnabled: status === 'active',
bridgeEnabled: ['primary', 'l1', 'l2', 'liquidity'].includes(c.omnlRole) || c.tier === 'primary',
officeId: 24,
},
complianceEnv: `OMNL_COMPLIANCE_CORE_${c.chainId}`,
};
}
const chains = CORE.map((c) =>
toEntry(c, c.tier === 'staged' || c.tier === 'testnet' ? 'staged' : 'active'),
);
let nextId = 900001;
while (chains.length < 128) {
const n = chains.length - CORE.length + 1;
chains.push({
chainId: nextId++,
name: `OMNL Expansion Slot ${n}`,
type: 'evm',
nativeSymbol: 'ETH',
tier: 'reserved',
omnlRole: 'expansion',
status: 'reserved',
rpcEnv: `CHAIN_${nextId - 1}_RPC_URL`,
settlement: { m2LoadEnabled: false, swapEnabled: false, bridgeEnabled: false, officeId: 24 },
complianceEnv: `OMNL_COMPLIANCE_CORE_${nextId - 1}`,
});
}
const doc = {
$schema: 'OMNL Bank supported chains — 128-chain production registry',
version: '1.0.0',
brand: 'OMNL Central Bank',
maxCapacity: 128,
primaryChainId: 138,
mirrorChainId: 651940,
settlementOfficeId: 24,
generatedAt: new Date().toISOString(),
chains,
stats: {
total: chains.length,
active: chains.filter((c) => c.status === 'active').length,
staged: chains.filter((c) => c.status === 'staged').length,
reserved: chains.filter((c) => c.status === 'reserved').length,
},
};
fs.writeFileSync(outPath, JSON.stringify(doc, null, 2));
console.log(`Wrote ${chains.length} chains to ${outPath}`);
console.log(JSON.stringify(doc.stats));