0.7.38-B
This commit is contained in:
@@ -166,7 +166,8 @@
|
||||
<div class="mb-3">
|
||||
<label for="demoPipeline2ValidationProfileSelect" class="form-label">Validation profile</label>
|
||||
<select id="demoPipeline2ValidationProfileSelect" class="form-select">
|
||||
<option value="0.7.38_token_metadata_gap_prioritization" selected>0.7.38 — token metadata gap prioritization</option>
|
||||
<option value="0.7.39_launch_surface_origin_baseline" selected>0.7.39 — launch surface origin baseline</option>
|
||||
<option value="0.7.38_token_metadata_gap_prioritization">0.7.38 — token metadata gap prioritization</option>
|
||||
<option value="0.7.37_token_metadata_catalog_enrichment">0.7.37 — token metadata/catalog enrichment</option>
|
||||
<option value="0.7.36_meteora_family_consolidation">0.7.36 — Meteora family consolidation</option>
|
||||
<option value="0.7.35_non_trade_fee_reward_admin">0.7.35 — non-trade fee/reward admin</option>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Local launch-origin diagnostic sample for the UI.
|
||||
*/
|
||||
export type DemoPipeline2LocalLaunchOriginDiagnosticSample = {
|
||||
/**
|
||||
* Launch attribution id.
|
||||
*/
|
||||
launchAttributionId: number,
|
||||
/**
|
||||
* Launch surface code.
|
||||
*/
|
||||
launchSurfaceCode: string,
|
||||
/**
|
||||
* Launch surface display name.
|
||||
*/
|
||||
launchSurfaceName: string,
|
||||
/**
|
||||
* Transaction signature.
|
||||
*/
|
||||
transactionSignature: string,
|
||||
/**
|
||||
* Decoded event id.
|
||||
*/
|
||||
decodedEventId: number,
|
||||
/**
|
||||
* Effective protocol recorded on the decoded event.
|
||||
*/
|
||||
protocolName: string,
|
||||
/**
|
||||
* Match kind used for attribution.
|
||||
*/
|
||||
matchKind: string,
|
||||
/**
|
||||
* Matched key value.
|
||||
*/
|
||||
matchedValue: string,
|
||||
/**
|
||||
* Optional pool id.
|
||||
*/
|
||||
poolId: number | null,
|
||||
/**
|
||||
* Optional pool address.
|
||||
*/
|
||||
poolAddress: string | null,
|
||||
/**
|
||||
* Optional pair id.
|
||||
*/
|
||||
pairId: number | null,
|
||||
/**
|
||||
* Optional pair symbol.
|
||||
*/
|
||||
pairSymbol: string | null, };
|
||||
@@ -3,6 +3,7 @@ import type { DemoPipeline2LocalDecodedEventDiagnosticSummary } from "./DemoPipe
|
||||
import type { DemoPipeline2LocalDexDiagnosticSummary } from "./DemoPipeline2LocalDexDiagnosticSummary";
|
||||
import type { DemoPipeline2LocalDuplicateDecodedEventTradeDiagnosticSample } from "./DemoPipeline2LocalDuplicateDecodedEventTradeDiagnosticSample";
|
||||
import type { DemoPipeline2LocalEventClassificationDiagnosticSummary } from "./DemoPipeline2LocalEventClassificationDiagnosticSummary";
|
||||
import type { DemoPipeline2LocalLaunchOriginDiagnosticSample } from "./DemoPipeline2LocalLaunchOriginDiagnosticSample";
|
||||
import type { DemoPipeline2LocalMissingTradeEventDiagnosticSample } from "./DemoPipeline2LocalMissingTradeEventDiagnosticSample";
|
||||
import type { DemoPipeline2LocalMissingTradeEventReasonSummary } from "./DemoPipeline2LocalMissingTradeEventReasonSummary";
|
||||
import type { DemoPipeline2LocalMultiTradeSignaturePairDiagnosticSample } from "./DemoPipeline2LocalMultiTradeSignaturePairDiagnosticSample";
|
||||
@@ -11,6 +12,7 @@ import type { DemoPipeline2LocalPairActionabilityDiagnosticSummary } from "./Dem
|
||||
import type { DemoPipeline2LocalPairDiagnosticSummary } from "./DemoPipeline2LocalPairDiagnosticSummary";
|
||||
import type { DemoPipeline2LocalPairGapDiagnosticSample } from "./DemoPipeline2LocalPairGapDiagnosticSample";
|
||||
import type { DemoPipeline2LocalPairTradingReadinessDiagnosticSummary } from "./DemoPipeline2LocalPairTradingReadinessDiagnosticSummary";
|
||||
import type { DemoPipeline2LocalPoolOriginDiagnosticSample } from "./DemoPipeline2LocalPoolOriginDiagnosticSample";
|
||||
import type { DemoPipeline2LocalTokenMetadataGapDiagnosticSample } from "./DemoPipeline2LocalTokenMetadataGapDiagnosticSample";
|
||||
|
||||
/**
|
||||
@@ -246,6 +248,14 @@ eventClassificationSummaries: Array<DemoPipeline2LocalEventClassificationDiagnos
|
||||
* Missing trade events grouped by diagnostic reason.
|
||||
*/
|
||||
missingTradeEventReasonSummaries: Array<DemoPipeline2LocalMissingTradeEventReasonSummary>,
|
||||
/**
|
||||
* Samples of launch-origin attributions.
|
||||
*/
|
||||
launchOriginSamples: Array<DemoPipeline2LocalLaunchOriginDiagnosticSample>,
|
||||
/**
|
||||
* Samples of pool-origin rows and their optional launch linkage.
|
||||
*/
|
||||
poolOriginSamples: Array<DemoPipeline2LocalPoolOriginDiagnosticSample>,
|
||||
/**
|
||||
* Prioritized samples of tokens whose display metadata is still incomplete.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Local pool-origin diagnostic sample for the UI.
|
||||
*/
|
||||
export type DemoPipeline2LocalPoolOriginDiagnosticSample = {
|
||||
/**
|
||||
* Pool-origin id.
|
||||
*/
|
||||
poolOriginId: number,
|
||||
/**
|
||||
* Effective DEX code attached to the pool.
|
||||
*/
|
||||
dexCode: string,
|
||||
/**
|
||||
* Pool id.
|
||||
*/
|
||||
poolId: number,
|
||||
/**
|
||||
* Pool address.
|
||||
*/
|
||||
poolAddress: string,
|
||||
/**
|
||||
* Optional pair id.
|
||||
*/
|
||||
pairId: number | null,
|
||||
/**
|
||||
* Optional pair symbol.
|
||||
*/
|
||||
pairSymbol: string | null,
|
||||
/**
|
||||
* Optional launch surface code.
|
||||
*/
|
||||
launchSurfaceCode: string | null,
|
||||
/**
|
||||
* Founding transaction signature.
|
||||
*/
|
||||
foundingSignature: string,
|
||||
/**
|
||||
* Founding effective protocol.
|
||||
*/
|
||||
foundingProtocolName: string,
|
||||
/**
|
||||
* Founding decoded event kind.
|
||||
*/
|
||||
foundingEventKind: string, };
|
||||
@@ -15,6 +15,7 @@ import type { DemoPipeline2PairCandlesRequest } from "./bindings/DemoPipeline2Pa
|
||||
import type { DemoPipeline2PairCandlesPayload } from "./bindings/DemoPipeline2PairCandlesPayload.ts";
|
||||
import type { DemoPipeline2LocalDiagnosticsPayload } from "./bindings/DemoPipeline2LocalDiagnosticsPayload.ts";
|
||||
import type { DemoPipeline2LocalValidationPayload } from "./bindings/DemoPipeline2LocalValidationPayload.ts";
|
||||
import type { DemoPipeline2LocalValidationRequest } from "./bindings/DemoPipeline2LocalValidationRequest.ts";
|
||||
import type { DemoPipeline2ProgramInstructionDiscriminatorSummaryRequest } from "./bindings/DemoPipeline2ProgramInstructionDiscriminatorSummaryRequest.ts";
|
||||
import type { DemoPipeline2ProgramInstructionDiscriminatorSummaryPayload } from "./bindings/DemoPipeline2ProgramInstructionDiscriminatorSummaryPayload.ts";
|
||||
import { DemoPipeline2ProtocolCandidateSummaryRequest } from './bindings/DemoPipeline2ProtocolCandidateSummaryRequest.ts';
|
||||
@@ -363,6 +364,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
const replayLocalPipelineButton = document.querySelector<HTMLButtonElement>("#demoPipeline2ReplayLocalPipelineButton");
|
||||
const diagnoseLocalPipelineButton = document.querySelector<HTMLButtonElement>("#demoPipeline2DiagnoseLocalPipelineButton");
|
||||
const validateLocalPipelineButton = document.querySelector<HTMLButtonElement>("#demoPipeline2ValidateLocalPipelineButton");
|
||||
const validationProfileSelect = document.querySelector<HTMLSelectElement>("#demoPipeline2ValidationProfileSelect");
|
||||
|
||||
const discriminatorProgramIdInput = document.querySelector<HTMLInputElement>("#demoPipeline2DiscriminatorProgramIdInput");
|
||||
const discriminatorLimitInput = document.querySelector<HTMLInputElement>("#demoPipeline2DiscriminatorLimitInput");
|
||||
@@ -409,6 +411,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
!replayLocalPipelineButton ||
|
||||
!diagnoseLocalPipelineButton ||
|
||||
!validateLocalPipelineButton ||
|
||||
!validationProfileSelect ||
|
||||
!discriminatorProgramIdInput ||
|
||||
!discriminatorLimitInput ||
|
||||
!loadDiscriminatorSummariesButton ||
|
||||
@@ -653,11 +656,19 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
});
|
||||
|
||||
validateLocalPipelineButton.addEventListener("click", async () => {
|
||||
appendLogLine(logTextarea, "[ui] validating local pipeline");
|
||||
const request: DemoPipeline2LocalValidationRequest = {
|
||||
profileCode: validationProfileSelect.value,
|
||||
};
|
||||
|
||||
appendLogLine(
|
||||
logTextarea,
|
||||
`[ui] validating local pipeline with '${request.profileCode}' profile`,
|
||||
);
|
||||
|
||||
try {
|
||||
const payload = await invoke<DemoPipeline2LocalValidationPayload>(
|
||||
"demo_pipeline2_validate_local_pipeline",
|
||||
{ request },
|
||||
);
|
||||
|
||||
localValidationTextarea.value = payload.validationJson;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "kb-demo-app",
|
||||
"private": true,
|
||||
"version": "0.7.38",
|
||||
"version": "0.7.39",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -451,6 +451,10 @@ pub(crate) struct DemoPipeline2LocalPipelineDiagnosticSummary {
|
||||
/// Missing trade events grouped by diagnostic reason.
|
||||
pub missing_trade_event_reason_summaries:
|
||||
std::vec::Vec<DemoPipeline2LocalMissingTradeEventReasonSummary>,
|
||||
/// Samples of launch-origin attributions.
|
||||
pub launch_origin_samples: std::vec::Vec<DemoPipeline2LocalLaunchOriginDiagnosticSample>,
|
||||
/// Samples of pool-origin rows and their optional launch linkage.
|
||||
pub pool_origin_samples: std::vec::Vec<DemoPipeline2LocalPoolOriginDiagnosticSample>,
|
||||
/// Prioritized samples of tokens whose display metadata is still incomplete.
|
||||
pub token_metadata_gap_samples:
|
||||
std::vec::Vec<DemoPipeline2LocalTokenMetadataGapDiagnosticSample>,
|
||||
@@ -896,6 +900,77 @@ pub(crate) struct DemoPipeline2LocalPairGapDiagnosticSample {
|
||||
pub pair_candle_count: i64,
|
||||
}
|
||||
|
||||
/// Local launch-origin diagnostic sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
export,
|
||||
export_to = "../frontend/ts/bindings/DemoPipeline2LocalLaunchOriginDiagnosticSample.ts"
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub(crate) struct DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
/// Launch attribution id.
|
||||
#[ts(type = "number")]
|
||||
pub launch_attribution_id: i64,
|
||||
/// Launch surface code.
|
||||
pub launch_surface_code: std::string::String,
|
||||
/// Launch surface display name.
|
||||
pub launch_surface_name: std::string::String,
|
||||
/// Transaction signature.
|
||||
pub transaction_signature: std::string::String,
|
||||
/// Decoded event id.
|
||||
#[ts(type = "number")]
|
||||
pub decoded_event_id: i64,
|
||||
/// Effective protocol recorded on the decoded event.
|
||||
pub protocol_name: std::string::String,
|
||||
/// Match kind used for attribution.
|
||||
pub match_kind: std::string::String,
|
||||
/// Matched key value.
|
||||
pub matched_value: std::string::String,
|
||||
/// Optional pool id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pool_id: std::option::Option<i64>,
|
||||
/// Optional pool address.
|
||||
pub pool_address: std::option::Option<std::string::String>,
|
||||
/// Optional pair id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pair_id: std::option::Option<i64>,
|
||||
/// Optional pair symbol.
|
||||
pub pair_symbol: std::option::Option<std::string::String>,
|
||||
}
|
||||
|
||||
/// Local pool-origin diagnostic sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
export,
|
||||
export_to = "../frontend/ts/bindings/DemoPipeline2LocalPoolOriginDiagnosticSample.ts"
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub(crate) struct DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
/// Pool-origin id.
|
||||
#[ts(type = "number")]
|
||||
pub pool_origin_id: i64,
|
||||
/// Effective DEX code attached to the pool.
|
||||
pub dex_code: std::string::String,
|
||||
/// Pool id.
|
||||
#[ts(type = "number")]
|
||||
pub pool_id: i64,
|
||||
/// Pool address.
|
||||
pub pool_address: std::string::String,
|
||||
/// Optional pair id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pair_id: std::option::Option<i64>,
|
||||
/// Optional pair symbol.
|
||||
pub pair_symbol: std::option::Option<std::string::String>,
|
||||
/// Optional launch surface code.
|
||||
pub launch_surface_code: std::option::Option<std::string::String>,
|
||||
/// Founding transaction signature.
|
||||
pub founding_signature: std::string::String,
|
||||
/// Founding effective protocol.
|
||||
pub founding_protocol_name: std::string::String,
|
||||
/// Founding decoded event kind.
|
||||
pub founding_event_kind: std::string::String,
|
||||
}
|
||||
|
||||
/// Local token metadata gap sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
@@ -1188,7 +1263,7 @@ pub(crate) async fn demo_pipeline2_validate_local_pipeline(
|
||||
let service = kb_lib::LocalPipelineValidationService::new(database.clone());
|
||||
let profile_code = match request {
|
||||
Some(request) => request.profile_code,
|
||||
None => "0.7.38_token_metadata_gap_prioritization".to_string(),
|
||||
None => "0.7.39_launch_surface_origin_baseline".to_string(),
|
||||
};
|
||||
let run_result = match profile_code.as_str() {
|
||||
"0.7.27" | "0.7.27_dexes_non_regression" => {
|
||||
@@ -1227,6 +1302,9 @@ pub(crate) async fn demo_pipeline2_validate_local_pipeline(
|
||||
"0.7.38" | "0.7.38_token_metadata_gap_prioritization" => {
|
||||
service.validate_v0_7_38_current_database().await
|
||||
},
|
||||
"0.7.39" | "0.7.39_launch_surface_origin_baseline" => {
|
||||
service.validate_v0_7_39_current_database().await
|
||||
},
|
||||
other => Err(kb_lib::Error::InvalidState(format!(
|
||||
"unsupported local pipeline validation profile: {other}"
|
||||
))),
|
||||
@@ -1777,6 +1855,14 @@ fn demo_pipeline2_map_local_diagnostics_summary(
|
||||
multi_trade_signature_pair_samples
|
||||
.push(demo_pipeline2_map_multi_trade_signature_pair_sample(sample));
|
||||
}
|
||||
let mut launch_origin_samples = std::vec::Vec::new();
|
||||
for sample in summary.launch_origin_samples {
|
||||
launch_origin_samples.push(demo_pipeline2_map_launch_origin_sample(sample));
|
||||
}
|
||||
let mut pool_origin_samples = std::vec::Vec::new();
|
||||
for sample in summary.pool_origin_samples {
|
||||
pool_origin_samples.push(demo_pipeline2_map_pool_origin_sample(sample));
|
||||
}
|
||||
let mut token_metadata_gap_samples = std::vec::Vec::new();
|
||||
for sample in summary.token_metadata_gap_samples {
|
||||
token_metadata_gap_samples.push(demo_pipeline2_map_token_metadata_gap_sample(sample));
|
||||
@@ -1853,6 +1939,8 @@ fn demo_pipeline2_map_local_diagnostics_summary(
|
||||
decoded_event_summaries,
|
||||
event_classification_summaries,
|
||||
missing_trade_event_reason_summaries,
|
||||
launch_origin_samples,
|
||||
pool_origin_samples,
|
||||
token_metadata_gap_samples,
|
||||
non_actionable_pair_count: summary.non_actionable_pair_count,
|
||||
non_actionable_pair_summaries,
|
||||
@@ -2052,6 +2140,42 @@ fn demo_pipeline2_map_multi_trade_signature_pair_sample(
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_launch_origin_sample(
|
||||
sample: kb_lib::LocalLaunchOriginDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
return DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
launch_attribution_id: sample.launch_attribution_id,
|
||||
launch_surface_code: sample.launch_surface_code,
|
||||
launch_surface_name: sample.launch_surface_name,
|
||||
transaction_signature: sample.transaction_signature,
|
||||
decoded_event_id: sample.decoded_event_id,
|
||||
protocol_name: sample.protocol_name,
|
||||
match_kind: sample.match_kind,
|
||||
matched_value: sample.matched_value,
|
||||
pool_id: sample.pool_id,
|
||||
pool_address: sample.pool_address,
|
||||
pair_id: sample.pair_id,
|
||||
pair_symbol: sample.pair_symbol,
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_pool_origin_sample(
|
||||
sample: kb_lib::LocalPoolOriginDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
return DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
pool_origin_id: sample.pool_origin_id,
|
||||
dex_code: sample.dex_code,
|
||||
pool_id: sample.pool_id,
|
||||
pool_address: sample.pool_address,
|
||||
pair_id: sample.pair_id,
|
||||
pair_symbol: sample.pair_symbol,
|
||||
launch_surface_code: sample.launch_surface_code,
|
||||
founding_signature: sample.founding_signature,
|
||||
founding_protocol_name: sample.founding_protocol_name,
|
||||
founding_event_kind: sample.founding_event_kind,
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_token_metadata_gap_sample(
|
||||
sample: kb_lib::LocalTokenMetadataGapDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalTokenMetadataGapDiagnosticSample {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "kb-demo-app",
|
||||
"version": "0.7.38",
|
||||
"version": "0.7.39",
|
||||
"identifier": "com.sasedev.kb-demo-app",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
||||
Reference in New Issue
Block a user