2828 <a href =" https://crates.io/crates/carbon-atlas-fee-payer-decoder " >
2929 <img src="https://img.shields.io/crates/v/carbon-atlas-fee-payer-decoder?logo=rust&label=atlas-fee-payer" />
3030 </a >
31+ <a href =" https://crates.io/crates/carbon-cargo-decoder " >
32+ <img src="https://img.shields.io/crates/v/carbon-cargo-decoder?logo=rust&label=cargo" />
33+ </a >
3134 <a href =" https://crates.io/crates/carbon-crew-decoder " >
3235 <img src="https://img.shields.io/crates/v/carbon-crew-decoder?logo=rust&label=crew" />
3336 </a >
@@ -57,66 +60,56 @@ This project generates and maintains Rust decoders for Star Atlas programs on So
5760### Supported Decoders
5861
5962- ** sage-starbased** : SAGE Starbase program (` SAGE2HAwep459SNq61LHvjxPk4pLPEJLoMETef7f7EE ` )
60- - Fetches IDL directly from Solana mainnet
61- - Custom deserialization for Fleet and StarbasePlayer accounts
63+ - Fleet and starbase management for Star Atlas
64+ - Custom patches for remaining data deserialization
6265
6366- ** sage-holosim** : SAGE Holosim program (` SAgEeT8u14TE69JXtanGSgNkEdoPUcLabeyZD2uw8x9 ` )
64- - Uses local IDL file from ` ./idl/ ` directory
65- - Custom deserialization for Fleet and StarbasePlayer accounts
67+ - Fleet and starbase management for Star Atlas (uses local IDL)
68+ - Custom patches for remaining data deserialization
6669
6770- ** atlas-staking** : Atlas Staking program (` ATLocKpzDbTokxgvnLew3d7drZkEzLzDpzwgrgWKDbmc ` )
68- - Fetches IDL directly from Solana mainnet
6971 - ATLAS token staking with configurable rewards and cooldown periods
70- - Minimal patches needed - adds serialization support for account types
72+ - Minimal patches for serialization support
7173
7274- ** locked-voter** : Locked Voter program (` Lock7kBijGCQLEFAmXcengzXKA88iDNQPriQ7TbgeyG ` )
73- - Fetches IDL directly from Solana mainnet
7475 - POLIS governance and voting with escrow and whitelist controls
75- - Minimal patches needed - adds serialization support for account types
76+ - Minimal patches for serialization support
7677
7778- ** marketplace** : Galactic Marketplace program (` traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg ` )
78- - Fetches IDL directly from Solana mainnet
7979 - NFT marketplace with order books, currency management, and royalty tiers
80- - Minimal patches needed - adds serialization support for account types
80+ - Minimal patches for serialization support
8181
8282- ** atlas-fee-payer** : ATLAS Fee Payer program (` APR1MEny25pKupwn72oVqMH4qpDouArsX8zX4VwwfoXD ` )
83- - Fetches IDL directly from Solana mainnet
8483 - Fee payment management for Star Atlas transactions
85- - Minimal patches needed - adds serialization support for account types
84+ - Minimal patches for serialization support
85+
86+ - ** cargo** : Cargo program (` Cargo2VNTPPTi9c1vq1Jw5d3BWUNr18MjRtSupAghKEk ` )
87+ - Resource container management with dynamic stat tracking
88+ - Custom patches for remaining data deserialization
8689
8790- ** crew** : Crew Management program (` CREWiq8qbxvo4SKkAFpVnc6t7CRQC4tAAscsNAENXgrJ ` )
88- - Fetches IDL directly from Solana mainnet
8991 - Crew management for Star Atlas ships and operations
90- - Uses serde_big_array for large byte arrays
91- - Minimal patches needed - adds serialization support for account types
92+ - Minimal patches for serialization support
9293
9394- ** profile-vault** : Profile Vault program (` pv1ttom8tbyh83C1AVh6QH2naGRdVQUVt3HY1Yst5sv ` )
94- - Fetches IDL directly from Solana mainnet
9595 - Profile vault management for Star Atlas player profiles
96- - Minimal patches needed - adds serialization support for account types
96+ - Minimal patches for serialization support
9797
9898- ** srsly** : Fleet Rentals (SRSLY) program (` SRSLY1fq9TJqCk1gNSE7VZL2bztvTn9wm4VR8u8jMKT ` )
99- - Fetches IDL directly from Solana mainnet
10099 - Fleet rental contracts and automated payment processing
101- - Custom patches - adds serialization support and f64 rate field workaround
100+ - Custom patches for numeric field handling
102101
103102- ** tcomp** : Tensor cNFT Compressed program (` TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp ` )
104- - Fetches IDL directly from Solana mainnet
105103 - Compressed NFT marketplace for trading cNFTs
106- - Uses serde_big_array for large byte arrays
107- - Minimal patches needed - adds serialization support for account types
104+ - Minimal patches for serialization support
108105
109106- ** player-profile** : Player Profile program (` pprofELXjL5Kck7Jn5hCpwAL82DpTkSYBENzahVtbc9 ` )
110- - Fetches IDL directly from Solana mainnet
111107 - Player identity and role-based access control for Star Atlas
112- - Custom patches - adds serialization and ergonomic permission bitflags with helper methods
113- - Includes permission checking, key expiration validation, and role management
108+ - Custom patches for remaining data deserialization
114109
115110- ** profile-faction** : Profile Faction program (` pFACSRuobDmvfMKq1bAzwj27t6d2GJhSCHb1VcfnRmq ` )
116- - Fetches IDL directly from Solana mainnet
117111 - Player faction affiliation management for Star Atlas universe
118- - Custom patches - adds serialization and type-safe Faction enum
119- - Supports Unaligned, MUD, ONI, and Ustur factions
112+ - Custom patches for type-safe faction handling
120113
121114## Prerequisites
122115
@@ -142,46 +135,18 @@ Run `./scripts/check-tools.sh` to verify all required tools are installed:
142135```
143136star-atlas-decoders/
144137├── carbon-decoders/ # Published decoder crates
145- │ ├── sage-starbased-decoder/
146- │ ├── sage-holosim-decoder/
147- │ ├── atlas-staking-decoder/
148- │ ├── locked-voter-decoder/
149- │ ├── marketplace-decoder/
150- │ ├── atlas-fee-payer-decoder/
151- │ ├── crew-decoder/
152- │ ├── profile-vault-decoder/
153- │ ├── srsly-decoder/
154- │ ├── tcomp-decoder/
155- │ ├── player-profile-decoder/
156- │ └── profile-faction-decoder/
157138├── dist/ # Temporary build directory (gitignored)
158139├── patches/ # Custom patches for decoders
159- │ ├── sage-starbased-01-accounts.patch
160- │ ├── sage-holosim-01-disable-ix-combat-log-event.patch
161- │ ├── atlas-staking-01-accounts-serialize.patch
162- │ ├── locked-voter-01-accounts-serialize.patch
163- │ ├── marketplace-01-accounts-serialize.patch
164- │ ├── atlas-fee-payer-01-accounts-serialize.patch
165- │ ├── crew-01-accounts-serialize.patch
166- │ ├── profile-vault-01-accounts-serialize.patch
167- │ ├── srsly-01-accounts-serialize.patch
168- │ ├── srsly-02-rate-f64-workaround.patch
169- │ ├── tcomp-01-accounts-serialize.patch
170- │ ├── player-profile-01-accounts-serialize.patch
171- │ ├── player-profile-02-permissions-helpers.patch
172- │ ├── player-profile-03-remaining-data.patch
173- │ └── player-profile-04-instruction-remaining-accounts.patch
174- │ ├── profile-faction-01-accounts-serialize.patch
175- │ └── profile-faction-02-use-faction-enum.patch
176140├── idl/ # Local IDL files
177141├── scripts/ # CI and utility scripts
178- │ ├── ci.sh # Full CI pipeline
179- │ └── check-tools.sh # Tool verification
142+ │ ├── ci-clean.sh # Full CI pipeline
143+ │ ├── ci.sh # GitHub CI pipeline
144+ │ └── check-tools.sh # Tool verification
180145├── docs/ # Documentation
146+ │ ├── adding-new-decoder.md
181147│ ├── patch-development-workflow.md
182- │ └── readmes/ # Individual decoder READMEs
183- └── justfile # Build automation
184-
148+ │ └── readmes/ # Individual decoder READMEs
149+ └── justfile # Build automation
185150```
186151
187152## Development Workflow
@@ -269,13 +234,17 @@ just list-patches
269234
270235The decoders include custom deserialization for accounts with:
271236
272- - ** Variable-length "remaining data" fields** : e.g., Fleet's ` fleet_state `
273- - ** Dynamic arrays not in IDL** : e.g., StarbasePlayer's ` ship_escrows `
237+ - ** Variable-length "remaining data" fields** : e.g., Fleet's ` fleet_state ` , CargoType's ` cargo_stats ` , CargoPod's ` cargo_contents `
238+ - ** Dynamic arrays not in IDL** : e.g., StarbasePlayer's ` ship_escrows ` , Profile's ` profile_keys `
274239- ** Complex nested structures** : Custom BorshDeserialize implementations
275240
276241Example accounts with custom deserialization:
277242- ` Fleet ` : Includes ` fleet_state ` enum for current fleet activity
278243- ` StarbasePlayer ` : Includes dynamic ` ship_escrows ` list
244+ - ` CargoType ` : Includes ` cargo_stats ` array (length = ` stats_count ` )
245+ - ` CargoPod ` : Includes ` cargo_contents ` array of u64 values
246+
247+ > For detailed patch implementations, see the ` patches/ ` directory and individual decoder READMEs in ` docs/readmes/ ` .
279248
280249## Technical Details
281250
0 commit comments