add oracle to to token registration
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
ccab3b867f
commit
362b180069
|
@ -40,6 +40,8 @@ pub struct RegisterToken<'info> {
|
|||
)]
|
||||
pub vault: Account<'info, TokenAccount>,
|
||||
|
||||
pub oracle: UncheckedAccount<'info>,
|
||||
|
||||
#[account(mut)]
|
||||
pub payer: Signer<'info>,
|
||||
|
||||
|
@ -81,6 +83,7 @@ pub fn register_token(
|
|||
group: ctx.accounts.group.key(),
|
||||
mint: ctx.accounts.mint.key(),
|
||||
vault: ctx.accounts.vault.key(),
|
||||
oracle: ctx.accounts.oracle.key(),
|
||||
deposit_index: INDEX_START,
|
||||
borrow_index: INDEX_START,
|
||||
indexed_total_deposits: I80F48::ZERO,
|
||||
|
|
|
@ -8,6 +8,7 @@ pub struct TokenBank {
|
|||
pub group: Pubkey,
|
||||
pub mint: Pubkey,
|
||||
pub vault: Pubkey,
|
||||
pub oracle: Pubkey,
|
||||
|
||||
/// the index used to scale the value of an IndexedPosition
|
||||
/// TODO: should always be >= 0, add checks?
|
||||
|
|
Loading…
Reference in New Issue