Stabilize All Mainnet routing evidence
All checks were successful
Deploy to Phoenix / validate (push) Successful in 1m13s
Deploy to Phoenix / deploy (push) Successful in 45s
Deploy to Phoenix / deploy-atomic-swap-dapp (push) Successful in 1m22s
phoenix-deploy Deployed to cloudflare-sync
Deploy to Phoenix / cloudflare (push) Successful in 59s
All checks were successful
Deploy to Phoenix / validate (push) Successful in 1m13s
Deploy to Phoenix / deploy (push) Successful in 45s
Deploy to Phoenix / deploy-atomic-swap-dapp (push) Successful in 1m22s
phoenix-deploy Deployed to cloudflare-sync
Deploy to Phoenix / cloudflare (push) Successful in 59s
This commit is contained in:
@@ -30,6 +30,15 @@ function pair(row) {
|
||||
return `${row.baseToken?.symbol || "?"}/${row.quoteToken?.symbol || "?"}`;
|
||||
}
|
||||
|
||||
function matchingAggregatorRow(row) {
|
||||
return matrix.rows.find((candidate) => (
|
||||
candidate.chainId === row.chainId &&
|
||||
candidate.protocol === "oneinch_aggregator" &&
|
||||
candidate.baseToken?.symbol === row.baseToken?.symbol &&
|
||||
candidate.quoteToken?.symbol === row.quoteToken?.symbol
|
||||
));
|
||||
}
|
||||
|
||||
const matrix = readJson(matrixPath);
|
||||
const sources = readJson(sourcesPath);
|
||||
const discovery = readJson(discoveryPath);
|
||||
@@ -45,16 +54,21 @@ const oneInchSupport = sources.protocols?.oneinch_aggregator?.chainSupport || {}
|
||||
const unsupportedRoutingTasks = unsupportedDodoRows.map((row) => {
|
||||
const support = oneInchSupport[String(row.chainId)];
|
||||
const hasAggregatorSupport = Boolean(support);
|
||||
const aggregatorRow = hasAggregatorSupport ? matchingAggregatorRow(row) : null;
|
||||
return {
|
||||
poolId: row.poolId,
|
||||
chainId: row.chainId,
|
||||
network: row.network,
|
||||
pair: pair(row),
|
||||
currentReplacementPool: row.poolAddress,
|
||||
matchingAggregatorPoolId: aggregatorRow?.poolId || null,
|
||||
matchingAggregatorStatus: aggregatorRow?.status || null,
|
||||
targetSupportProtocol: hasAggregatorSupport ? "oneinch_aggregator" : "official_alternate_required",
|
||||
supportStatus: support?.status || "needs_official_source",
|
||||
tasks: hasAggregatorSupport ? [
|
||||
"create_or_promote matching oneinch_aggregator row for this pair",
|
||||
aggregatorRow
|
||||
? "promote matching oneinch_aggregator row after official quote and canary evidence"
|
||||
: "create matching oneinch_aggregator row for this pair",
|
||||
"wire official 1inch quote/swap API chain support evidence",
|
||||
"verify token address import/direct contract-address quote for both directions",
|
||||
"run dry-run quote and minimum-output route simulation",
|
||||
@@ -107,6 +121,8 @@ const report = {
|
||||
summary: {
|
||||
unsupportedDodoRows: unsupportedRoutingTasks.length,
|
||||
oneInchSupportableRows: unsupportedRoutingTasks.filter((row) => row.targetSupportProtocol === "oneinch_aggregator").length,
|
||||
oneInchRowsAlreadyInventoried: unsupportedRoutingTasks.filter((row) => row.matchingAggregatorPoolId).length,
|
||||
oneInchRowsMissingInventory: unsupportedRoutingTasks.filter((row) => row.targetSupportProtocol === "oneinch_aggregator" && !row.matchingAggregatorPoolId).length,
|
||||
cronosRowsNeedingNativeDexProfile: unsupportedRoutingTasks.filter((row) => row.targetSupportProtocol === "cronos_native_dex_profile_required").length,
|
||||
zeroOrUnusableOfficialPools: zeroPoolTasks.length,
|
||||
},
|
||||
@@ -124,12 +140,13 @@ const md = [
|
||||
"## Unsupported DODO Rows",
|
||||
"",
|
||||
table(
|
||||
["Pool", "Chain", "Pair", "Target Support", "Status", "First Task"],
|
||||
["Pool", "Chain", "Pair", "Target Support", "Inventory Row", "Status", "First Task"],
|
||||
unsupportedRoutingTasks.map((row) => [
|
||||
row.poolId,
|
||||
row.chainId,
|
||||
row.pair,
|
||||
row.targetSupportProtocol,
|
||||
row.matchingAggregatorPoolId || "missing",
|
||||
row.supportStatus,
|
||||
row.tasks[0],
|
||||
]),
|
||||
|
||||
@@ -80,13 +80,19 @@ if (errors.length > 0) {
|
||||
|
||||
for (const evidence of evidenceRows) {
|
||||
const row = rowsByPoolId.get(evidence.poolId);
|
||||
const shouldBeProduction = (
|
||||
evidence.status === "production" ||
|
||||
row.status === "production" ||
|
||||
Boolean(row.productionEvidence)
|
||||
);
|
||||
row.canaryEvidence = {
|
||||
poolId: evidence.poolId,
|
||||
generatedAt: evidence.generatedAt || new Date().toISOString(),
|
||||
sourceFile: evidenceArg || "config/all-mainnet-canary-evidence.json",
|
||||
canaryTransactions: evidence.canaryTransactions,
|
||||
notes: evidence.notes || [],
|
||||
};
|
||||
row.status = evidence.status === "production" ? "production" : "canary_passed";
|
||||
row.status = shouldBeProduction ? "production" : "canary_passed";
|
||||
if (!row.notes.includes("Canary evidence recorded from explicit All Mainnet canary evidence file.")) {
|
||||
row.notes.push("Canary evidence recorded from explicit All Mainnet canary evidence file.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user