-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add admin endpoint to fix SubDaoEpochInfoV0 onboarding fees paid (#694)
- Loading branch information
1 parent
a3fb6cd
commit f1e38b0
Showing
5 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
33 changes: 33 additions & 0 deletions
33
programs/helium-sub-daos/src/instructions/admin_set_dc_onboarding_fees_paid_epoch_info.rs
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,33 @@ | ||
use anchor_lang::prelude::*; | ||
|
||
use crate::{DaoV0, SubDaoEpochInfoV0, SubDaoV0}; | ||
|
||
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Default)] | ||
pub struct AdminSetDcOnboardingFeesPaidEpochInfoArgs { | ||
pub dc_onboarding_fees_paid: u64, | ||
} | ||
|
||
#[derive(Accounts)] | ||
pub struct AdminSetDcOnboardingFeesPaidEpochInfo<'info> { | ||
#[account( | ||
has_one = authority, | ||
)] | ||
pub dao: Account<'info, DaoV0>, | ||
#[account( | ||
has_one = dao, | ||
)] | ||
pub sub_dao: Account<'info, SubDaoV0>, | ||
#[account( | ||
has_one = sub_dao | ||
)] | ||
pub sub_dao_epoch_info: Account<'info, SubDaoEpochInfoV0>, | ||
pub authority: Signer<'info>, | ||
} | ||
|
||
pub fn handler( | ||
ctx: Context<AdminSetDcOnboardingFeesPaidEpochInfo>, | ||
args: AdminSetDcOnboardingFeesPaidEpochInfoArgs, | ||
) -> Result<()> { | ||
ctx.accounts.sub_dao_epoch_info.dc_onboarding_fees_paid = args.dc_onboarding_fees_paid; | ||
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