872 B
872 B
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:
- Add the public constant in the normal source location, such as
enum.go. - Add any address mapping in
consts.gowhen the enum is account-derived, such as platform or MEV agent detection. - Append the new value to the matching versioned enum list in
tx_binary.goundertxBinaryEnumTables. - Do not reorder or insert into existing
tx_binary.goenum lists unless the binary version is intentionally changed; append to preserve existing numeric IDs. - Add or update tx-binary round-trip coverage so encoding and decoding the new enum value is exercised.