mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-03 05:29:50 +00:00
`idl-gen` emits IDL instructions in source order, and `spel` uses each instruction's IDL position as its serde variant index. When the `#[instruction]` function order diverges from the `twap_oracle_core::Instruction` enum order, spel addresses the wrong instruction. Move `update_current_tick` ahead of the TWAP-computation instruction so the function order in twap_oracle.rs lines up with the enum variant order, and regenerate artifacts/twap_oracle-idl.json to match. No behavioral change — the instruction bodies are unchanged, only reordered.