Solana IDL reference › Raydium CPMM (CP Swap) › ObservationState
Raydium CPMM (CP Swap) account type. Program ID CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C. Data starts with the 8-byte account discriminator, published in the IDL.
Discriminator (published in the IDL)
hex 0x7aaec5358109a584
bytes [122, 174, 197, 53, 129, 9, 165, 132]
base58 MXBCWmifBBR
| Field | Type | Offset | Size |
|---|---|---|---|
| initialized | bool | 8 | 1 |
| observation_index | u16 | 9 | 2 |
| pool_id | pubkey | 11 | 32 |
| observations | [Observation; 100] | 43 | 4000 |
| padding | [u64; 4] | 4043 | 32 |
bytemuckunsafe, repr packed). Every field here is naturally aligned or the struct is packed, so the in-memory layout matches the offsets shown.Every ObservationState account starts with the same discriminator, so a memcmp at offset 0 selects this account type. The second filter matches pool_id at offset 11. A dataSize: 4075 filter would also work only while live accounts still have the snapshot size; programs often add fields in upgrades, so it is left out here. getProgramAccounts on a large program is heavy; many RPC providers limit or disable it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C",
{
"encoding": "base64",
"filters": [
{
"memcmp": {
"offset": 0,
"bytes": "MXBCWmifBBR"
}
},
{
"memcmp": {
"offset": 11,
"bytes": "<pool_id as base58>"
}
}
]
}
]
}
Decoding runs on Rugsight's server against the bundled snapshot. Nothing is fetched from the chain. Paste public account data only; never paste a private key or seed phrase.
Raydium CPMM (CP Swap) instructions · Explain a transaction
Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.