-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e9bd71
commit 911446f
Showing
13 changed files
with
179 additions
and
254 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
6 changes: 4 additions & 2 deletions
6
programs/uxd/tests/integration_tests/api/program_uxd/procedures/mod.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
pub mod process_deploy_program; | ||
pub mod process_set_router_depositories; | ||
pub mod process_set_controller_router_depositories; | ||
pub mod process_setup_router_depositories_fields; | ||
|
||
pub use process_deploy_program::*; | ||
pub use process_set_router_depositories::*; | ||
pub use process_set_controller_router_depositories::*; | ||
pub use process_setup_router_depositories_fields::*; |
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
85 changes: 85 additions & 0 deletions
85
.../integration_tests/api/program_uxd/procedures/process_setup_router_depositories_fields.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,85 @@ | ||
use solana_sdk::pubkey::Pubkey; | ||
use solana_sdk::signature::Keypair; | ||
|
||
use uxd::instructions::EditCredixLpDepositoryFields; | ||
use uxd::instructions::EditIdentityDepositoryFields; | ||
use uxd::instructions::EditMercurialVaultDepositoryFields; | ||
use uxd::instructions::EditAlloyxVaultDepositoryFields; | ||
|
||
use crate::integration_tests::api::program_context; | ||
use crate::integration_tests::api::program_uxd; | ||
|
||
pub async fn process_setup_router_depositories_fields( | ||
program_context: &mut Box<dyn program_context::ProgramContext>, | ||
payer: &Keypair, | ||
authority: &Keypair, | ||
collateral_mint: &Pubkey, | ||
supply_cap: u64, | ||
minting_fee_in_bps: Option<u8>, | ||
redeeming_fee_in_bps: Option<u8>, | ||
minting_disabled: Option<bool>, | ||
profits_beneficiary_collateral: Option<Pubkey>, | ||
) -> Result<(), program_context::ProgramError> { | ||
// Set the identity_depository cap and make sure minting is not disabled | ||
program_uxd::instructions::process_edit_identity_depository( | ||
program_context, | ||
payer, | ||
authority, | ||
&EditIdentityDepositoryFields { | ||
redeemable_amount_under_management_cap: Some(supply_cap.into()), | ||
minting_disabled, | ||
}, | ||
) | ||
.await?; | ||
|
||
// Set the mercurial_vault_depository cap and make sure minting is not disabled | ||
program_uxd::instructions::process_edit_mercurial_vault_depository( | ||
program_context, | ||
payer, | ||
authority, | ||
collateral_mint, | ||
&EditMercurialVaultDepositoryFields { | ||
redeemable_amount_under_management_cap: Some(supply_cap.into()), | ||
minting_fee_in_bps, | ||
redeeming_fee_in_bps, | ||
minting_disabled, | ||
profits_beneficiary_collateral, | ||
}, | ||
) | ||
.await?; | ||
|
||
// Set the credix_lp_depository cap and make sure minting is not disabled | ||
program_uxd::instructions::process_edit_credix_lp_depository( | ||
program_context, | ||
payer, | ||
authority, | ||
collateral_mint, | ||
&EditCredixLpDepositoryFields { | ||
redeemable_amount_under_management_cap: Some(supply_cap.into()), | ||
minting_fee_in_bps, | ||
redeeming_fee_in_bps, | ||
minting_disabled, | ||
profits_beneficiary_collateral, | ||
}, | ||
) | ||
.await?; | ||
|
||
// Set the alloyx_vault_depository cap and make sure minting is not disabled | ||
program_uxd::instructions::process_edit_alloyx_vault_depository( | ||
program_context, | ||
payer, | ||
authority, | ||
collateral_mint, | ||
&EditAlloyxVaultDepositoryFields { | ||
redeemable_amount_under_management_cap: Some(supply_cap), | ||
minting_fee_in_bps, | ||
redeeming_fee_in_bps, | ||
minting_disabled, | ||
profits_beneficiary_collateral, | ||
}, | ||
) | ||
.await?; | ||
|
||
// Done | ||
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
Oops, something went wrong.