fix(sequencer_rpc): add AMM program id

This adds the AMM program ID to the `get_program_ids` RPC endpoints,
as it's currently missing while still being predeployed.
This commit is contained in:
r4bbit 2026-02-16 15:32:57 +01:00
parent 8cf73c00a9
commit 76af23f386
No known key found for this signature in database
GPG Key ID: E95F1E9447DC91A9
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!");