fix(portal): restart LXC services on port bind; register gazette routes before API key gate
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m16s
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
Deploy ChainID 138 / Deploy ChainID 138 (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
Verify Deployment / Verify Deployment (push) Has been cancelled
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 22s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-03 04:12:28 -07:00
parent 1b1c106dc0
commit 7ced6106aa
2 changed files with 26 additions and 26 deletions

View File

@@ -50,12 +50,20 @@ export OMNL_BANK_ROOT="$ROOT"
start() {
local name="$1" dir="$2" cmd="$3"
local name="$1" dir="$2" cmd="$3" port="${4:-}"
cd "${ROOT}/${dir}"
pkill -f "${ROOT}/${dir}" 2>/dev/null || true
if [[ -n "$port" ]]; then
fuser -k "${port}/tcp" 2>/dev/null || true
sleep 1
fi
nohup env \
SETTLEMENT_MIDDLEWARE_CONFIG="$SETTLEMENT_MIDDLEWARE_CONFIG" \
@@ -128,15 +136,15 @@ start() {
start token-aggregation services/token-aggregation "npm run start"
start token-aggregation services/token-aggregation "npm run start" 3000
sleep 2
start settlement-middleware services/settlement-middleware "npm run start"
start settlement-middleware services/settlement-middleware "npm run start" 3011
sleep 2
start dbis-exchange services/dbis-exchange "npm run start"
start dbis-exchange services/dbis-exchange "npm run start" 3012
sleep 2

View File

@@ -54,36 +54,18 @@ function resolveMintTokenAddress(lineId: string, symbol?: string, tokenAddress?:
const router = Router();
router.use(omnlRateLimiter);
router.use(omnlAuditMiddleware);
router.use(omnlRequireApiKeyInProduction);
const REGISTRY_ABI: InterfaceAbi = [
'function allLineIds() view returns (bytes32[])',
'function getLine(bytes32 lineId) view returns (tuple(address tokenM0,address tokenM1,uint8 decimals,uint16 iso4217Numeric,bool isXAU,bool active))',
];
const COORDINATOR_ABI: InterfaceAbi = [
'function mirrorChainSelector() view returns (uint64)',
'function mirrorReceiver() view returns (address)',
'function feeToken() view returns (address)',
];
/**
* GET /omnl/openapi.json — OpenAPI 3.0 document for Swagger UI / codegen.
* Public discovery + gazette (registered before production API key gate).
*/
router.get('/omnl/openapi.json', (_req: Request, res: Response) => {
res.type('application/json').json(omnlOpenApi as Record<string, unknown>);
});
/**
* GET /omnl/catalog — machine-readable list of OMNL HTTP integrations.
*/
router.get('/omnl/catalog', (_req: Request, res: Response) => {
res.json(getOmnlApiCatalog());
});
/**
* GET /omnl/integration-status — which env-backed integrations are present (no secrets).
*/
router.get('/omnl/integration-status', (_req: Request, res: Response) => {
res.json({
generatedAt: new Date().toISOString(),
@@ -91,9 +73,6 @@ router.get('/omnl/integration-status', (_req: Request, res: Response) => {
});
});
/**
* GET /omnl/gazette/notices — GUOSMM official gazette registry (public disclosure).
*/
router.get('/omnl/gazette/notices', (_req: Request, res: Response) => {
const reg = loadGuosmmNotices();
res.json({
@@ -114,6 +93,19 @@ router.get('/omnl/gazette/notices/:documentId', (req: Request, res: Response) =>
res.json(notice);
});
router.use(omnlRequireApiKeyInProduction);
const REGISTRY_ABI: InterfaceAbi = [
'function allLineIds() view returns (bytes32[])',
'function getLine(bytes32 lineId) view returns (tuple(address tokenM0,address tokenM1,uint8 decimals,uint16 iso4217Numeric,bool isXAU,bool active))',
];
const COORDINATOR_ABI: InterfaceAbi = [
'function mirrorChainSelector() view returns (uint64)',
'function mirrorReceiver() view returns (address)',
'function feeToken() view returns (address)',
];
/**
* GET /omnl/reconcile-anchor — same SHA-256 as omnl-reconcile-report.mjs (IPSAS + matrix files).
*/