Created
April 9, 2022 03:17
-
-
Save alecchendev/591c174285f3cbc36df95203ddf20f4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get accounts | |
let accounts_iter = &mut accounts.iter(); | |
let ribbon_account = next_account_info(&accounts_iter)?; | |
// serialize | |
let ribbon_data = RibbonAccount { // random struct, idk how I thought of this | |
length: 10, | |
color: 3 | |
}; | |
ribbon_data.serialize(&mut *ribbon_account.try_borrow_mut_data()?)?; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment