Conversation
| use core::mem::MaybeUninit; | ||
| use pinocchio::{account_info::AccountInfo, instruction::AccountMeta}; | ||
|
|
||
| const UNINIT_BYTE: MaybeUninit<u8> = MaybeUninit::<u8>::uninit(); |
There was a problem hiding this comment.
this constant is already duplicated in pinocchio-token, pinocchio--token-2022, pinocchio-logger, and pinocchio crates.
i guess we are ready to extract it into either utils/helpers or import from pinocchio directly.
no need to do it in the scope of this MR, I believe, and better to make it as a separate one.
There was a problem hiding this comment.
Really good point, but I have a counter argument to this:
Afaik Febo said that pinocchio should be as barebone as possible (meaning that probably this wouldn't fit there) and pinocchio should be the only import for any clients (meaning we can't put it anywhere else)
I don't mind it having it plastered across all clients, but at the same time having it in pinocchio would be great since it's always used across all clients
There was a problem hiding this comment.
makes sense.
anyways, i have already made a small refactoring MR to show how it can be used, and taking into account this crate already dependent on pinocchio we can achieve the next usage:
-use core::mem::MaybeUninit;
-use pinocchio::{account_info::AccountInfo, instruction::AccountMeta};
+use pinocchio::{account_info::AccountInfo, bytes::UNINIT_BYTE, instruction::AccountMeta};
-const UNINIT_BYTE: MaybeUninit<u8> = MaybeUninit::<u8>::uninit();|
|
A no-std efficient client to interact with the stake-program