fix(baozi): correct error code mappings from current IDL#1118
fix(baozi): correct error code mappings from current IDL#1118AbhilashG12 wants to merge 1 commit into
Conversation
The Baozi Solana program was upgraded and error codes were renumbered. Changes: - BettingClosed: 6018 → 6013 - BettingFrozen: 6040 → 6014 - BetTooLow: 6020 → 6023 - BetTooHigh: 6041 → 6024 These mappings now match the current on-chain program. Added IDL version comment for future reference. Fixes pmxt-dev#1077
PR Review: PASS (NOT VERIFIED)What This DoesThis updates Baozi's Solana/Anchor program error-code mapping for closed/frozen betting and min/max bet-size failures. SDK consumers should get the same PMXT error classes/messages for the current program codes instead of generic Baozi program errors. Blast RadiusBaozi error translation only: Consumer VerificationBefore (base branch): After (PR branch): I did not submit a live Baozi transaction to trigger these program errors through the full sidecar trading path, so this is class-level verification rather than end-to-end consumer verification. Test Results
FindingsNo blocking findings. PMXT Pipeline Check
Semver Impactpatch -- error mapping correction with no public method/signature change. RiskI verified the mapper behavior for the new numeric codes, but I could not independently verify the current Baozi IDL/on-chain program code assignments from this checkout, and I did not exercise a real transaction failure through the sidecar. |
Thanks for the review!I understand the verification couldn't include live Baozi transactions. The error code mappings are based on the current Baozi program IDL. The changes are:
Class-level verification (as you performed) confirms the mapper works correctly for these codes. This PR is ready to merge. The live Baozi verification can be done later by someone with test SOL. Thank you for the thorough review! 🙏 |
Description
Fixes #1077 : incorrect error code mappings in Baozi exchange to match the current Solana program IDL.
Problem
The Baozi program was upgraded and error codes were renumbered. Current errors.ts uses old codes:
Impact
Solution
Updated the error code mappings: