diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index 46cf3c6..784dd60 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -90,4 +90,4 @@ jobs: echo "debug = 0" >> Cargo.toml - name: Run tests - run: cargo test-sbf \ No newline at end of file + run: cargo test-sbf diff --git a/Anchor.toml b/Anchor.toml index 15d211c..f99eb61 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -2,13 +2,13 @@ anchor_version = "0.26.0" solana_version = "1.14.10" [programs.localnet] -voter_stake_registry = "9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8" +voter_stake_registry = "C62KFt3Ujv4GmgaNRpTzyvkERVW2jPSje7cGaw4L5hAx" [programs.devnet] -voter_stake_registry = "9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8" +voter_stake_registry = "C62KFt3Ujv4GmgaNRpTzyvkERVW2jPSje7cGaw4L5hAx" [programs.mainnet] -voter_stake_registry = "9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8" +voter_stake_registry = "C62KFt3Ujv4GmgaNRpTzyvkERVW2jPSje7cGaw4L5hAx" [provider] cluster = "devnet" diff --git a/Cargo.lock b/Cargo.lock index 3456758..16386a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1980,7 +1980,7 @@ dependencies = [ [[package]] name = "mpl-common-constants" version = "0.1.0" -source = "git+https://github.com/metaplex-foundation/mpl-common-constants#46675e94a5f5e383543d08e71e2ef8e111edb52a" +source = "git+https://github.com/metaplex-foundation/mpl-common-constants#0595ff629b4b1ba574431657f411ce269f906e5e" [[package]] name = "mpl-staking" diff --git a/program-states/Cargo.toml b/program-states/Cargo.toml index c24dcf7..16dc88f 100644 --- a/program-states/Cargo.toml +++ b/program-states/Cargo.toml @@ -12,7 +12,8 @@ readme = "README.md" crate-type = ["cdylib", "lib"] [features] -test-sbf = [] +no-entrypoint = [] +cpi = ["no-entrypoint"] [dependencies] anchor-lang = { workspace = true, features = ["init-if-needed"] } diff --git a/program-states/src/lib.rs b/program-states/src/lib.rs index a5afd1e..088b24d 100644 --- a/program-states/src/lib.rs +++ b/program-states/src/lib.rs @@ -7,4 +7,4 @@ pub mod error; pub mod state; // Requires by Anchor to declare accounts in crate -declare_id!("9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8"); +declare_id!("C62KFt3Ujv4GmgaNRpTzyvkERVW2jPSje7cGaw4L5hAx"); diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index 5013cf8..5a1f0ae 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -14,11 +14,7 @@ doctest = false [features] no-entrypoint = [] -no-idl = [] cpi = ["no-entrypoint"] -default = [] -localnet = [] -test-sbf = [] [dependencies] # a) for deployment use these @@ -31,7 +27,7 @@ bytemuck = "1.9.1" spl-governance = { version = "3.1.1", features = ["no-entrypoint"] } spl-governance-addin-api = "0.1.3" mplx-staking-states = { path="../../program-states" } -mpl-common-constants = { git = "https://github.com/metaplex-foundation/mpl-common-constants", features = ["devnet"] } +mpl-common-constants = { git = "https://github.com/metaplex-foundation/mpl-common-constants", features = ["mainnet"] } spl-associated-token-account = { version = "^1.0.3", features = ["no-entrypoint"] } [dev-dependencies] diff --git a/programs/voter-stake-registry/src/cpi_instructions.rs b/programs/voter-stake-registry/src/cpi_instructions.rs index c0fe29c..a352ead 100644 --- a/programs/voter-stake-registry/src/cpi_instructions.rs +++ b/programs/voter-stake-registry/src/cpi_instructions.rs @@ -9,8 +9,13 @@ use solana_program::{ system_program, }; -#[derive(Debug, BorshSerialize, BorshDeserialize, PartialEq, Eq)] +/// Address: +pub const REWARDS_PROGRAM_ADDRESS: Pubkey = Pubkey::new_from_array([ + 187, 144, 22, 85, 66, 234, 175, 207, 244, 245, 195, 176, 62, 198, 185, 87, 88, 123, 166, 137, + 125, 120, 47, 188, 37, 228, 127, 164, 75, 100, 222, 33, +]); +#[derive(Debug, BorshSerialize, BorshDeserialize, PartialEq, Eq)] pub enum RewardsInstruction { /// Creates and initializes a reward pool account /// diff --git a/programs/voter-stake-registry/src/instructions/change_delegate.rs b/programs/voter-stake-registry/src/instructions/change_delegate.rs index 0491b10..e464347 100644 --- a/programs/voter-stake-registry/src/instructions/change_delegate.rs +++ b/programs/voter-stake-registry/src/instructions/change_delegate.rs @@ -1,4 +1,8 @@ -use crate::{clock_unix_timestamp, cpi_instructions, find_mining_address}; +use crate::{ + clock_unix_timestamp, + cpi_instructions::{self, REWARDS_PROGRAM_ADDRESS}, + find_mining_address, +}; use anchor_lang::prelude::*; use mplx_staking_states::{ error::MplStakingError, @@ -61,7 +65,7 @@ pub struct ChangeDelegate<'info> { pub deposit_mining: UncheckedAccount<'info>, /// CHECK: Rewards Program account - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/src/instructions/claim.rs b/programs/voter-stake-registry/src/instructions/claim.rs index aec24b9..28413d2 100644 --- a/programs/voter-stake-registry/src/instructions/claim.rs +++ b/programs/voter-stake-registry/src/instructions/claim.rs @@ -1,4 +1,7 @@ -use crate::{borsh::BorshDeserialize, cpi_instructions}; +use crate::{ + borsh::BorshDeserialize, + cpi_instructions::{self, REWARDS_PROGRAM_ADDRESS}, +}; use anchor_lang::prelude::*; use anchor_spl::token::{Token, TokenAccount}; use mpl_common_constants::constants::DAO_PUBKEY; @@ -67,7 +70,7 @@ pub struct Claim<'info> { pub token_program: Program<'info, Token>, /// CHECK: Rewards Program account - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/src/instructions/close_voter.rs b/programs/voter-stake-registry/src/instructions/close_voter.rs index 85d123c..04b8346 100644 --- a/programs/voter-stake-registry/src/instructions/close_voter.rs +++ b/programs/voter-stake-registry/src/instructions/close_voter.rs @@ -1,4 +1,4 @@ -use crate::cpi_instructions; +use crate::cpi_instructions::{self, REWARDS_PROGRAM_ADDRESS}; use anchor_lang::prelude::*; use anchor_spl::token::{self, CloseAccount, Token, TokenAccount}; use bytemuck::bytes_of_mut; @@ -61,7 +61,7 @@ pub struct CloseVoter<'info> { pub token_program: Program<'info, Token>, /// CHECK: Rewards Program account - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/src/instructions/create_registrar.rs b/programs/voter-stake-registry/src/instructions/create_registrar.rs index d8fbbf4..e54284c 100644 --- a/programs/voter-stake-registry/src/instructions/create_registrar.rs +++ b/programs/voter-stake-registry/src/instructions/create_registrar.rs @@ -1,4 +1,4 @@ -use crate::cpi_instructions; +use crate::cpi_instructions::{self, REWARDS_PROGRAM_ADDRESS}; use anchor_lang::prelude::*; use anchor_spl::token::{Mint, Token}; use mplx_staking_states::{error::MplStakingError, state::Registrar}; @@ -59,7 +59,7 @@ pub struct CreateRegistrar<'info> { pub token_program: Program<'info, Token>, /// CHECK: Rewards Program account - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/src/instructions/create_voter.rs b/programs/voter-stake-registry/src/instructions/create_voter.rs index b0902af..7b1abd7 100644 --- a/programs/voter-stake-registry/src/instructions/create_voter.rs +++ b/programs/voter-stake-registry/src/instructions/create_voter.rs @@ -1,4 +1,7 @@ -use crate::{cpi_instructions, voter::VoterWeightRecord}; +use crate::{ + cpi_instructions::{self, REWARDS_PROGRAM_ADDRESS}, + voter::VoterWeightRecord, +}; use anchor_lang::prelude::*; use mplx_staking_states::{ error::MplStakingError, @@ -64,7 +67,7 @@ pub struct CreateVoter<'info> { pub deposit_mining: UncheckedAccount<'info>, /// CHECK: Rewards program ID - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/src/lib.rs b/programs/voter-stake-registry/src/lib.rs index bb2f2db..c515845 100644 --- a/programs/voter-stake-registry/src/lib.rs +++ b/programs/voter-stake-registry/src/lib.rs @@ -1,4 +1,5 @@ use anchor_lang::prelude::*; +use cpi_instructions::REWARDS_PROGRAM_ADDRESS; use instructions::*; use mplx_staking_states::{ error::MplStakingError, @@ -15,7 +16,7 @@ mod instructions; pub mod voter; // The program address. -declare_id!("9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8"); +declare_id!("C62KFt3Ujv4GmgaNRpTzyvkERVW2jPSje7cGaw4L5hAx"); /// # Introduction /// @@ -214,7 +215,7 @@ pub struct Stake<'info> { pub deposit_mining: UncheckedAccount<'info>, /// CHECK: Rewards Program account - #[account(executable)] + #[account(executable, address = REWARDS_PROGRAM_ADDRESS)] pub rewards_program: UncheckedAccount<'info>, } diff --git a/programs/voter-stake-registry/tests/change_authorized_agent.rs b/programs/voter-stake-registry/tests/change_authorized_agent.rs index 39d4111..52f12ab 100644 --- a/programs/voter-stake-registry/tests/change_authorized_agent.rs +++ b/programs/voter-stake-registry/tests/change_authorized_agent.rs @@ -15,7 +15,7 @@ async fn stake_with_delegate() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/close_voter.rs b/programs/voter-stake-registry/tests/close_voter.rs index a0fc1ee..ac8ffe6 100644 --- a/programs/voter-stake-registry/tests/close_voter.rs +++ b/programs/voter-stake-registry/tests/close_voter.rs @@ -19,7 +19,7 @@ async fn two_the_same_voting_mints_fail() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -163,7 +163,7 @@ async fn zero_ata_passed_instead_of_two() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -306,7 +306,7 @@ async fn one_ata_passed_instead_of_two() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -449,7 +449,7 @@ async fn success() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -607,7 +607,7 @@ async fn wrong_order_of_passed_in_ata() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/fixtures/mplx_rewards.so b/programs/voter-stake-registry/tests/fixtures/mplx_rewards.so index 0799068..7cf2f80 100755 Binary files a/programs/voter-stake-registry/tests/fixtures/mplx_rewards.so and b/programs/voter-stake-registry/tests/fixtures/mplx_rewards.so differ diff --git a/programs/voter-stake-registry/tests/fixtures/spl-governance-3.1.0 b/programs/voter-stake-registry/tests/fixtures/spl-governance-3.1.0 deleted file mode 100644 index bb8a89e..0000000 Binary files a/programs/voter-stake-registry/tests/fixtures/spl-governance-3.1.0 and /dev/null differ diff --git a/programs/voter-stake-registry/tests/program_test/governance.rs b/programs/voter-stake-registry/tests/program_test/governance.rs index f1bf64e..7cd9c28 100644 --- a/programs/voter-stake-registry/tests/program_test/governance.rs +++ b/programs/voter-stake-registry/tests/program_test/governance.rs @@ -5,7 +5,10 @@ use solana_sdk::{ signature::{Keypair, Signer}, }; use spl_governance::state::{ - proposal, realm::GoverningTokenConfigAccountArgs, realm_config::GoverningTokenType, vote_record, + proposal, + realm::{get_realm_address, GoverningTokenConfigAccountArgs}, + realm_config::GoverningTokenType, + vote_record, }; use std::rc::Rc; @@ -55,11 +58,8 @@ impl GovernanceCookie { payer: &Keypair, voter_weight_addin: &Pubkey, ) -> GovernanceRealmCookie { - let realm = Pubkey::find_program_address( - &[b"governance".as_ref(), name.as_ref()], - &self.program_id, - ) - .0; + let realm = get_realm_address(&self.program_id, name); + let community_token_account = Pubkey::find_program_address( &[ b"governance".as_ref(), diff --git a/programs/voter-stake-registry/tests/program_test/mod.rs b/programs/voter-stake-registry/tests/program_test/mod.rs index 7a6b1af..6245d7b 100644 --- a/programs/voter-stake-registry/tests/program_test/mod.rs +++ b/programs/voter-stake-registry/tests/program_test/mod.rs @@ -5,7 +5,6 @@ pub use addin::*; pub use cookies::*; pub use governance::*; use log::*; -use mpl_common_constants::constants::GOVERNANCE_PROGRAM_ID; pub use solana::*; use solana_program::{program_option::COption, program_pack::Pack}; use solana_program_test::*; @@ -121,14 +120,11 @@ impl TestContext { // intentionally set to half the limit, to catch potential problems early test.set_compute_max_units(120000); - let governance_program_id = Pubkey::from(GOVERNANCE_PROGRAM_ID); - test.add_program( - "spl_governance_3_1_1", - governance_program_id, - processor!(spl_governance::processor::process_instruction), - ); + let governance_program_id = + Pubkey::from_str("AEauWRrpn9Cs6GXujzdp1YhMmv2288kBt3SdEcPYEerr").unwrap(); + test.add_program("spl_governance_3_1_1", governance_program_id, None); let rewards_program_id = - Pubkey::from_str("J8oa8UUJBydrTKtCdkvwmQQ27ZFDq54zAxWJY5Ey72Ji").unwrap(); + Pubkey::from_str("DdAfv8RS2BS41FRjDX5nLXSmQWrPsdC17sbgD66oKcU8").unwrap(); test.add_program("mplx_rewards", rewards_program_id, None); // Setup the environment @@ -141,7 +137,9 @@ impl TestContext { unit: 10u64.pow(6) as f64, base_lot: 100_f64, quote_lot: 10_f64, - pubkey: Some(Pubkey::new_unique()), //Some(mngo_token::ID), + pubkey: Some( + Pubkey::from_str("METAewgxyPbgwsseH8T16a39CQ5VyVxZi9zXiDPY18m").unwrap(), + ), authority: Keypair::new(), }, // symbol: "MNGO".to_string() MintCookie { diff --git a/programs/voter-stake-registry/tests/test_all_deposits.rs b/programs/voter-stake-registry/tests/test_all_deposits.rs index c6c4bc1..6aefca3 100644 --- a/programs/voter-stake-registry/tests/test_all_deposits.rs +++ b/programs/voter-stake-registry/tests/test_all_deposits.rs @@ -15,7 +15,7 @@ async fn test_all_deposits() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_basic.rs b/programs/voter-stake-registry/tests/test_basic.rs index 0d8fe61..f9c615a 100644 --- a/programs/voter-stake-registry/tests/test_basic.rs +++ b/programs/voter-stake-registry/tests/test_basic.rs @@ -19,7 +19,7 @@ async fn test_basic() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -250,7 +250,7 @@ async fn close_voter_with_locked_tokens_should_fail() -> Result<(), TransportErr let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_change_delegate.rs b/programs/voter-stake-registry/tests/test_change_delegate.rs index 68d2995..cc70de5 100644 --- a/programs/voter-stake-registry/tests/test_change_delegate.rs +++ b/programs/voter-stake-registry/tests/test_change_delegate.rs @@ -19,7 +19,7 @@ async fn change_from_own_delegate_to_new_delegate() -> Result<(), TransportError let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -244,7 +244,7 @@ async fn stake_is_too_little() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -467,7 +467,7 @@ async fn delegate_is_the_same() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -620,7 +620,7 @@ async fn change_from_own_delegate_to_new_delegate_and_back_with_cooldown( let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -858,7 +858,7 @@ async fn change_from_own_delegate_to_new_delegate_and_back_instantly() -> Result let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_claim.rs b/programs/voter-stake-registry/tests/test_claim.rs index a035caa..d7e2071 100644 --- a/programs/voter-stake-registry/tests/test_claim.rs +++ b/programs/voter-stake-registry/tests/test_claim.rs @@ -1,16 +1,16 @@ use anchor_spl::token::TokenAccount; -use mpl_common_constants::constants::{GOVERNANCE_PROGRAM_ID, REALM_NAME}; use mplx_staking_states::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program::pubkey::Pubkey; use solana_program_test::*; use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError}; use spl_governance::state::vote_record::get_vote_record_address; +use std::str::FromStr; mod program_test; #[tokio::test] -async fn successeful_claim() -> Result<(), TransportError> { +async fn successful_claim() -> Result<(), TransportError> { let context = TestContext::new().await; let payer = &context.users[0].key; @@ -18,7 +18,7 @@ async fn successeful_claim() -> Result<(), TransportError> { let realm = context .governance .create_realm( - REALM_NAME, + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -222,7 +222,8 @@ async fn successeful_claim() -> Result<(), TransportError> { .await .unwrap(); let vote_record = get_vote_record_address( - &Pubkey::from(GOVERNANCE_PROGRAM_ID), + // MPL DAO Governance addr + &Pubkey::from_str("AEauWRrpn9Cs6GXujzdp1YhMmv2288kBt3SdEcPYEerr").unwrap(), &proposal.address, &proposal.owner_token_owner_record, ); diff --git a/programs/voter-stake-registry/tests/test_deposit_constant.rs b/programs/voter-stake-registry/tests/test_deposit_constant.rs index d996107..891ca13 100644 --- a/programs/voter-stake-registry/tests/test_deposit_constant.rs +++ b/programs/voter-stake-registry/tests/test_deposit_constant.rs @@ -55,7 +55,7 @@ async fn test_deposit_constant() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -244,7 +244,7 @@ async fn test_withdrawing_without_unlocking() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_deposit_no_locking.rs b/programs/voter-stake-registry/tests/test_deposit_no_locking.rs index 08cbb60..4579abf 100644 --- a/programs/voter-stake-registry/tests/test_deposit_no_locking.rs +++ b/programs/voter-stake-registry/tests/test_deposit_no_locking.rs @@ -55,7 +55,7 @@ async fn test_deposit_no_locking() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_extend_deposit.rs b/programs/voter-stake-registry/tests/test_extend_deposit.rs index 58f1e0a..7fb2614 100644 --- a/programs/voter-stake-registry/tests/test_extend_deposit.rs +++ b/programs/voter-stake-registry/tests/test_extend_deposit.rs @@ -21,7 +21,7 @@ async fn extend_from_flex() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -182,7 +182,7 @@ async fn extend_from_three_months_deposit() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -344,7 +344,7 @@ async fn extend_deposit_after_one_year_for_three_months_with_top_up() -> Result< let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -505,7 +505,7 @@ async fn extend_from_flex_deposit_with_top_up() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -662,7 +662,7 @@ async fn extend_from_three_month_to_one_year() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -816,7 +816,7 @@ async fn prolongs_with_delegate() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_lockup.rs b/programs/voter-stake-registry/tests/test_lockup.rs index bafcde8..6f1c780 100644 --- a/programs/voter-stake-registry/tests/test_lockup.rs +++ b/programs/voter-stake-registry/tests/test_lockup.rs @@ -19,7 +19,7 @@ async fn test_unlock_and_withdraw_before_end_ts() -> Result<(), TransportError> let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -182,7 +182,7 @@ async fn test_unlock_after_end_ts() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, @@ -352,7 +352,7 @@ async fn test_unlock_and_withdraw_after_end_ts_and_cooldown() -> Result<(), Tran let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_log_voter_info.rs b/programs/voter-stake-registry/tests/test_log_voter_info.rs index 31cce0f..f93e438 100644 --- a/programs/voter-stake-registry/tests/test_log_voter_info.rs +++ b/programs/voter-stake-registry/tests/test_log_voter_info.rs @@ -36,7 +36,7 @@ async fn test_log_voter_info() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_stake.rs b/programs/voter-stake-registry/tests/test_stake.rs index 2709aa8..c1b189f 100644 --- a/programs/voter-stake-registry/tests/test_stake.rs +++ b/programs/voter-stake-registry/tests/test_stake.rs @@ -15,7 +15,7 @@ async fn stake_with_delegate() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer, diff --git a/programs/voter-stake-registry/tests/test_voting.rs b/programs/voter-stake-registry/tests/test_voting.rs index 48d0d5f..3172f25 100644 --- a/programs/voter-stake-registry/tests/test_voting.rs +++ b/programs/voter-stake-registry/tests/test_voting.rs @@ -14,7 +14,7 @@ async fn test_voting() -> Result<(), TransportError> { let realm = context .governance .create_realm( - "testrealm", + "Metaplex DAO", realm_authority.pubkey(), &context.mints[0], payer,