The Requester struct looks like this
#[account(zero_copy)]
pub struct Requester {
pub authority: Pubkey,
pub oracle: Pubkey,
pub created_at: i64,
pub count: u64,
pub last_updated: i64,
pub random: [u8; 64],
pub pkt_id: [u8; 32],
pub tls_id: [u8; 32],
pub active_request: bool,
pub uuid: u64,
pub bump: u8,
}
and this is one of the use case
pub struct Initialize<'info> {
#[account(
init,
seeds = [b"r-seed".as_ref(), authority.key().as_ref(), &uuid.to_le_bytes()],
bump,
payer = authority,
space = 8 + size_of::<Requester>()
)]
pub requester: Account<'info, Requester>,
but i get this error when i run anchor build
the trait bound `Requester: anchor_lang::AccountSerialize` is not satisfied
--> /home/icus/.cargo/registry/src/github.com-1ecc6299db9ec823/solrand-0.1.5/src/lib.rs:151:20
|
151 | pub requester: Account<'info, Requester>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `anchor_lang::AccountSerialize` is not implemented for `Requester`
pub struct Account<'info, T: AccountSerialize + AccountDeserialize + Owner + Clone> {
| ^^^^^^^^^^^^^^^^ required by this bound in `anchor_lang::prelude::Account`
Any help on how this can be solved will be appreciated.