fix(token-aggregation): use live Chain 138 RPC and vacuous HO coverage
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m27s
CI/CD Pipeline / Security Scanning (push) Successful in 2m28s
CI/CD Pipeline / Lint and Format (push) Failing after 51s
CI/CD Pipeline / Terraform Validation (push) Failing after 29s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 29s
Validation / validate-terraform (push) Failing after 29s
Validation / validate-kubernetes (push) Failing after 14s
Validation / validate-smart-contracts (push) Failing after 12s
Validation / validate-security (push) Failing after 1m9s
Validation / validate-documentation (push) Failing after 20s
Verify Deployment / Verify Deployment (push) Failing after 1m2s
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m27s
CI/CD Pipeline / Security Scanning (push) Successful in 2m28s
CI/CD Pipeline / Lint and Format (push) Failing after 51s
CI/CD Pipeline / Terraform Validation (push) Failing after 29s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 29s
Validation / validate-terraform (push) Failing after 29s
Validation / validate-kubernetes (push) Failing after 14s
Validation / validate-smart-contracts (push) Failing after 12s
Validation / validate-security (push) Failing after 1m9s
Validation / validate-documentation (push) Failing after 20s
Verify Deployment / Verify Deployment (push) Failing after 1m2s
Point server-side RPC default at 192.168.11.235:8545 and treat zero issued c* with funded reserves as sufficient for institutional smoke. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,7 @@ export const CHAIN138_PUBLIC_RPC_URLS = [
|
||||
] as const;
|
||||
|
||||
const DEFAULT_CHAIN138_PUBLIC_RPC_URL = CHAIN138_PUBLIC_RPC_URLS[0];
|
||||
const DEFAULT_CHAIN138_SERVER_RPC_URL = 'http://192.168.11.221:8545';
|
||||
const DEFAULT_CHAIN138_SERVER_RPC_URL = 'http://192.168.11.235:8545';
|
||||
|
||||
/** HTTPS FQDN for wallets, MetaMask, and browser JSON-RPC (same on LAN and external). */
|
||||
export function resolveChain138PublicRpcUrl(): string {
|
||||
|
||||
@@ -34,6 +34,17 @@ describe('evaluateHoReserveCoverage', () => {
|
||||
expect(row.coverageRatio).toBeCloseTo(2.78, 2);
|
||||
});
|
||||
|
||||
it('marks sufficient with vacuous coverage when no c* is issued but reserve GL is funded', () => {
|
||||
const row = evaluateHoReserveCoverage({
|
||||
reserveAssetsUsd: 1_150_000_000_000,
|
||||
issuedCStarUsd: 0,
|
||||
multiplier: 1.2,
|
||||
});
|
||||
|
||||
expect(row.status).toBe('sufficient');
|
||||
expect(row.coverageRatio).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
it('marks insufficient when reserve assets fall below 1.2× issued c* USD', () => {
|
||||
const row = evaluateHoReserveCoverage({
|
||||
reserveAssetsUsd: 400_000_000_000,
|
||||
|
||||
@@ -116,15 +116,17 @@ export function evaluateHoReserveCoverage(input: {
|
||||
const formula = `coverageRatio = reserveAssetsUsd / (${multiplier} × issuedCStarUsd)`;
|
||||
|
||||
if (input.issuedCStarUsd == null || !(input.issuedCStarUsd > 0)) {
|
||||
const reserveAssetsUsd = input.reserveAssetsUsd ?? 0;
|
||||
const vacuousCoverage = reserveAssetsUsd > 0;
|
||||
return {
|
||||
status: 'pending',
|
||||
status: vacuousCoverage ? 'sufficient' : 'pending',
|
||||
multiplier,
|
||||
headOfficeId,
|
||||
reserveAssetGlCodes,
|
||||
reserveAssetsUsd: input.reserveAssetsUsd ?? 0,
|
||||
reserveAssetsUsd,
|
||||
issuedCStarUsd: input.issuedCStarUsd ?? 0,
|
||||
requiredReserveUsd: 0,
|
||||
coverageRatio: 0,
|
||||
coverageRatio: vacuousCoverage ? 999 : 0,
|
||||
formula,
|
||||
policyId: policy.policyId,
|
||||
policyRef: policy.policyRef,
|
||||
|
||||
Reference in New Issue
Block a user