22 lines
872 B
Markdown
22 lines
872 B
Markdown
# 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.
|