marethyu
marethyu

Reputation: 215

its trait bounds were not satisfied label: method `serialize` not found for this struct

I'm trying to save AccountInfo in a struct that #[derive(BorshSerialize, BorshDeserialize, Clone, Debug)] to send SOL to this account. AccountInfo is a struct in library that don't impl serialize method. This account is randomly chosen from a map in contract so I cannot pass it into data to make instructions. This is the code:

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug)]
pub struct State<'a> {
    pub owner: AccountInfo<'a>,
}

Upvotes: 0

Views: 231

Answers (0)

Related Questions