add group to mintinfo, for better gpa support
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
897260f7c7
commit
a44120c470
|
@ -115,12 +115,13 @@ pub fn register_token(
|
|||
let alt_previous_size = 0;
|
||||
let mut mint_info = ctx.accounts.mint_info.load_init()?;
|
||||
*mint_info = MintInfo {
|
||||
group: ctx.accounts.group.key(),
|
||||
mint: ctx.accounts.mint.key(),
|
||||
bank: ctx.accounts.bank.key(),
|
||||
vault: ctx.accounts.vault.key(),
|
||||
oracle: ctx.accounts.oracle.key(),
|
||||
bank: ctx.accounts.bank.key(),
|
||||
token_index,
|
||||
address_lookup_table,
|
||||
token_index,
|
||||
address_lookup_table_bank_index: alt_previous_size as u8,
|
||||
address_lookup_table_oracle_index: alt_previous_size as u8 + 1,
|
||||
reserved: Default::default(),
|
||||
|
|
|
@ -11,6 +11,7 @@ use super::TokenIndex;
|
|||
#[account(zero_copy)]
|
||||
pub struct MintInfo {
|
||||
// TODO: none of these pubkeys are needed, remove?
|
||||
pub group: Pubkey,
|
||||
pub mint: Pubkey,
|
||||
pub bank: Pubkey,
|
||||
pub vault: Pubkey,
|
||||
|
@ -25,5 +26,5 @@ pub struct MintInfo {
|
|||
|
||||
pub reserved: [u8; 4],
|
||||
}
|
||||
const_assert_eq!(size_of::<MintInfo>(), 5 * 32 + 2 + 2 + 4);
|
||||
const_assert_eq!(size_of::<MintInfo>(), 6 * 32 + 2 + 2 + 4);
|
||||
const_assert_eq!(size_of::<MintInfo>() % 8, 0);
|
||||
|
|
Loading…
Reference in New Issue