-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
- Loading branch information
1 parent
629eaaf
commit 998d0b6
Showing
5 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use anchor_lang::prelude::*; | ||
|
||
use crate::{error::MangoError, state::*}; | ||
|
||
#[derive(Accounts)] | ||
pub struct IxToggler<'info> { | ||
#[account( | ||
mut, | ||
has_one = admin, | ||
)] | ||
pub group: AccountLoader<'info, Group>, | ||
pub admin: Signer<'info>, | ||
} | ||
|
||
pub fn ix_gate_toggler(ctx: Context<IxToggler>, ix_gate: u16) -> Result<()> { | ||
let mut group = ctx.accounts.group.load_mut()?; | ||
group.ix_gate = ix_gate; | ||
Ok(()) | ||
} |
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
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