Files
smom-dbis-138/services/checkpoint-indexer/dist/participantSurfaceLogDecode.js
defiQUG c336809676
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m3s
CI/CD Pipeline / Security Scanning (push) Successful in 2m18s
CI/CD Pipeline / Lint and Format (push) Failing after 34s
CI/CD Pipeline / Terraform Validation (push) Failing after 20s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 22s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 40s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 49s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 21s
Validation / validate-genesis (push) Successful in 25s
Validation / validate-terraform (push) Failing after 21s
Validation / validate-kubernetes (push) Failing after 8s
Validation / validate-smart-contracts (push) Failing after 8s
Validation / validate-security (push) Failing after 1m11s
Validation / validate-documentation (push) Failing after 14s
Verify Deployment / Verify Deployment (push) Failing after 45s
Add mainnet checkpoint stack: ISO attestation, participant Etherscan surface, and services.
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface,
checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services,
relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 00:30:45 -07:00

46 lines
1.9 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CHAIN138_ACTIVITY_NOTIFIED_TOPIC0 = void 0;
exports.decodeChain138ActivityNotifiedLogs = decodeChain138ActivityNotifiedLogs;
const ethers_1 = require("ethers");
const chain138Explorer_1 = require("./chain138Explorer");
/** topic0 = Chain138ActivityNotified(address,bytes32,bytes32,uint8,uint64,uint256,uint64,bool) */
exports.CHAIN138_ACTIVITY_NOTIFIED_TOPIC0 = '0x8dfc8206f97c75e58117c233ab5193e49d50c17bd4d035cdafebcf6794168ffe';
function decodeChain138ActivityNotifiedLogs(envelope, explorerBase) {
if (envelope.status !== '1' || !Array.isArray(envelope.result))
return [];
const out = [];
for (const log of envelope.result) {
const t = log.topics ?? [];
if (t.length < 4 || !log.transactionHash)
continue;
const participant = t[1] ? ethers_1.ethers.getAddress('0x' + t[1].slice(-40)) : '';
const chain138TxHash = (0, chain138Explorer_1.chain138TxHashFromLogTopic)(t[2]);
if (!chain138TxHash)
continue;
const instructionId = t[3] ?? '';
let direction = 0;
if (log.data && log.data.length >= 66) {
try {
const decoded = ethers_1.ethers.AbiCoder.defaultAbiCoder().decode(['uint8', 'uint64', 'uint256', 'uint64', 'bool'], log.data);
direction = Number(decoded[0]);
}
catch {
/* non-fatal */
}
}
out.push({
participant,
chain138TxHash,
chain138ExplorerUrl: (0, chain138Explorer_1.chain138ExplorerTxUrl)(chain138TxHash, explorerBase),
instructionId,
direction,
mainnetTxHash: log.transactionHash,
mainnetExplorerUrl: `https://etherscan.io/tx/${log.transactionHash}`,
blockNumber: String(log.blockNumber ?? ''),
logIndex: String(log.logIndex ?? ''),
});
}
return out;
}