Merge pull request #335 from logos-blockchain/fix/add-amm-to-rpc-endpoint

fix(sequencer_rpc): add AMM program id
This commit is contained in:
Sergio Chouhy 2026-02-17 14:57:00 -03:00 committed by GitHub
commit f1293ec77b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -292,6 +292,7 @@ impl<BC: BlockSettlementClientTrait, IC: IndexerClientTrait> JsonHandler<BC, IC>
);
program_ids.insert("token".to_string(), Program::token().id());
program_ids.insert("pinata".to_string(), Program::pinata().id());
program_ids.insert("amm".to_string(), Program::amm().id());
program_ids.insert(
"privacy_preserving_circuit".to_string(),
nssa::PRIVACY_PRESERVING_CIRCUIT_ID,

View File

@ -139,6 +139,12 @@ pub async fn execute_subcommand(
if circuit_id != &nssa::PRIVACY_PRESERVING_CIRCUIT_ID {
panic!("Local ID for privacy preserving circuit is different from remote");
}
let Some(amm_id) = remote_program_ids.get("amm") else {
panic!("Missing AMM program ID from remote");
};
if amm_id != &Program::amm().id() {
panic!("Local ID for AMM program is different from remote");
}
println!("✅All looks good!");