From 10885d5e080d077c87b1d327debca55300c3b2f6 Mon Sep 17 00:00:00 2001 From: thloyi Date: Wed, 13 May 2026 17:16:45 +0800 Subject: [PATCH] fix pump wrapper buy and sell --- codex.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 codex.md diff --git a/codex.md b/codex.md new file mode 100644 index 0000000..3c81d20 --- /dev/null +++ b/codex.md @@ -0,0 +1,21 @@ +# Codex Notes + +## Tx Binary enum synchronization + +When adding or renaming transaction-facing enum values, keep the binary format definitions in sync. + +This includes, but is not limited to: + +- tx events +- programs +- platforms +- MEV agents +- swap modes, amount sides, limit types, and fee sides + +Checklist: + +1. Add the public constant in the normal source location, such as `enum.go`. +2. Add any address mapping in `consts.go` when the enum is account-derived, such as platform or MEV agent detection. +3. Append the new value to the matching versioned enum list in `tx_binary.go` under `txBinaryEnumTables`. +4. Do not reorder or insert into existing `tx_binary.go` enum lists unless the binary version is intentionally changed; append to preserve existing numeric IDs. +5. Add or update tx-binary round-trip coverage so encoding and decoding the new enum value is exercised.