I'm trying to fetch all of a certain account that matches defined u32 values. My account struct looks something like this:
#[account]
pub struct Round {
pub bump: u8, // 1
pub authority: Pubkey, // 32
pub state: RoundState, // 1
pub participants: u16, // 2
pub id: u32, // 4,
}
What I have now is, but it doesn't seem to be fetching anything. I've tried using different iterations of UInt8Array, but can't quite figure it out. Is it possible to search like this?
const rounds = [
{ dataSize: ROUND_SIZE },
{
memcmp: {
offset: 1 + 32 + 1 + 2,
bytes: roundId,
},
},
];
Also, is it possible to search for multiple different parameters?