2

I have found that it is not possible to use HashMap, but BtreeStorage is possible. I have already tried to use those. But I am getting errors. I was trying to use this: https://github.com/hashblock/solana-cli-program-template/blob/main/program/src/account_state.rs#L62 Error found at building

2
  • This issue might be unrelated to your use of Btrees. Does this help?
    – Ademola
    Commented Mar 10, 2023 at 21:23
  • @Ademola worked!! Commented Mar 10, 2023 at 22:49

1 Answer 1

1

Both pack and unpack are provided by the Pack trait. You'll have to first bring the trait into scope with use solana_program::program_pack::Pack;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.