Skip to content

Commit

Permalink
reorg so manager functions are more grouped
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Aug 9, 2023
1 parent 690135b commit e5ef8e2
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 140 deletions.
12 changes: 6 additions & 6 deletions programs/drift_vaults/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ pub mod drift_vaults {
instructions::withdraw(ctx)
}

pub fn force_withdraw<'info>(
ctx: Context<'_, '_, '_, 'info, ForceWithdraw<'info>>,
) -> Result<()> {
instructions::force_withdraw(ctx)
}

pub fn liquidate<'info>(ctx: Context<'_, '_, '_, 'info, Liquidate<'info>>) -> Result<()> {
instructions::liquidate(ctx)
}
Expand Down Expand Up @@ -102,4 +96,10 @@ pub mod drift_vaults {
) -> Result<()> {
instructions::apply_profit_share(ctx)
}

pub fn force_withdraw<'info>(
ctx: Context<'_, '_, '_, 'info, ForceWithdraw<'info>>,
) -> Result<()> {
instructions::force_withdraw(ctx)
}
}
268 changes: 134 additions & 134 deletions ts/sdk/src/types/drift_vaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,72 +385,6 @@ export type DriftVaults = {
];
args: [];
},
{
name: 'forceWithdraw';
accounts: [
{
name: 'vault';
isMut: true;
isSigner: false;
},
{
name: 'manager';
isMut: false;
isSigner: true;
},
{
name: 'vaultDepositor';
isMut: true;
isSigner: false;
},
{
name: 'vaultTokenAccount';
isMut: true;
isSigner: false;
},
{
name: 'driftUserStats';
isMut: true;
isSigner: false;
},
{
name: 'driftUser';
isMut: true;
isSigner: false;
},
{
name: 'driftState';
isMut: false;
isSigner: false;
},
{
name: 'driftSpotMarketVault';
isMut: true;
isSigner: false;
},
{
name: 'driftSigner';
isMut: false;
isSigner: false;
},
{
name: 'userTokenAccount';
isMut: true;
isSigner: false;
},
{
name: 'driftProgram';
isMut: false;
isSigner: false;
},
{
name: 'tokenProgram';
isMut: false;
isSigner: false;
}
];
args: [];
},
{
name: 'liquidate';
accounts: [
Expand Down Expand Up @@ -652,7 +586,7 @@ export type DriftVaults = {
];
},
{
name: 'managerCrankProfitShare';
name: 'applyProfitShare';
accounts: [
{
name: 'vault';
Expand Down Expand Up @@ -696,6 +630,72 @@ export type DriftVaults = {
}
];
args: [];
},
{
name: 'forceWithdraw';
accounts: [
{
name: 'vault';
isMut: true;
isSigner: false;
},
{
name: 'manager';
isMut: false;
isSigner: true;
},
{
name: 'vaultDepositor';
isMut: true;
isSigner: false;
},
{
name: 'vaultTokenAccount';
isMut: true;
isSigner: false;
},
{
name: 'driftUserStats';
isMut: true;
isSigner: false;
},
{
name: 'driftUser';
isMut: true;
isSigner: false;
},
{
name: 'driftState';
isMut: false;
isSigner: false;
},
{
name: 'driftSpotMarketVault';
isMut: true;
isSigner: false;
},
{
name: 'driftSigner';
isMut: false;
isSigner: false;
},
{
name: 'userTokenAccount';
isMut: true;
isSigner: false;
},
{
name: 'driftProgram';
isMut: false;
isSigner: false;
},
{
name: 'tokenProgram';
isMut: false;
isSigner: false;
}
];
args: [];
}
];
accounts: [
Expand Down Expand Up @@ -1724,72 +1724,6 @@ export const IDL: DriftVaults = {
],
args: [],
},
{
name: 'forceWithdraw',
accounts: [
{
name: 'vault',
isMut: true,
isSigner: false,
},
{
name: 'manager',
isMut: false,
isSigner: true,
},
{
name: 'vaultDepositor',
isMut: true,
isSigner: false,
},
{
name: 'vaultTokenAccount',
isMut: true,
isSigner: false,
},
{
name: 'driftUserStats',
isMut: true,
isSigner: false,
},
{
name: 'driftUser',
isMut: true,
isSigner: false,
},
{
name: 'driftState',
isMut: false,
isSigner: false,
},
{
name: 'driftSpotMarketVault',
isMut: true,
isSigner: false,
},
{
name: 'driftSigner',
isMut: false,
isSigner: false,
},
{
name: 'userTokenAccount',
isMut: true,
isSigner: false,
},
{
name: 'driftProgram',
isMut: false,
isSigner: false,
},
{
name: 'tokenProgram',
isMut: false,
isSigner: false,
},
],
args: [],
},
{
name: 'liquidate',
accounts: [
Expand Down Expand Up @@ -1991,7 +1925,7 @@ export const IDL: DriftVaults = {
],
},
{
name: 'managerCrankProfitShare',
name: 'applyProfitShare',
accounts: [
{
name: 'vault',
Expand Down Expand Up @@ -2036,6 +1970,72 @@ export const IDL: DriftVaults = {
],
args: [],
},
{
name: 'forceWithdraw',
accounts: [
{
name: 'vault',
isMut: true,
isSigner: false,
},
{
name: 'manager',
isMut: false,
isSigner: true,
},
{
name: 'vaultDepositor',
isMut: true,
isSigner: false,
},
{
name: 'vaultTokenAccount',
isMut: true,
isSigner: false,
},
{
name: 'driftUserStats',
isMut: true,
isSigner: false,
},
{
name: 'driftUser',
isMut: true,
isSigner: false,
},
{
name: 'driftState',
isMut: false,
isSigner: false,
},
{
name: 'driftSpotMarketVault',
isMut: true,
isSigner: false,
},
{
name: 'driftSigner',
isMut: false,
isSigner: false,
},
{
name: 'userTokenAccount',
isMut: true,
isSigner: false,
},
{
name: 'driftProgram',
isMut: false,
isSigner: false,
},
{
name: 'tokenProgram',
isMut: false,
isSigner: false,
},
],
args: [],
},
],
accounts: [
{
Expand Down

0 comments on commit e5ef8e2

Please sign in to comment.