Skip to content

Commit

Permalink
update contract accordingly to the latest on rewards program
Browse files Browse the repository at this point in the history
  • Loading branch information
kstepanovdev committed Jun 27, 2024
1 parent 902616e commit 6b7c7d4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Binary file modified programs/voter-stake-registry/tests/fixtures/mplx_rewards.so
Binary file not shown.
12 changes: 0 additions & 12 deletions programs/voter-stake-registry/tests/program_test/rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,10 @@ impl RewardsCookie {
pub async fn distribute_rewards(
&self,
reward_pool: &Pubkey,
reward_mint: &Pubkey,
distribute_authority: &Keypair,
) -> std::result::Result<(), BanksClientError> {
let (reward_vault, _bump) = Pubkey::find_program_address(
&[
"vault".as_bytes(),
&reward_pool.to_bytes(),
&reward_mint.to_bytes(),
],
&self.program_id,
);

let accounts = vec![
AccountMeta::new(*reward_pool, false),
AccountMeta::new_readonly(*reward_mint, false),
AccountMeta::new(reward_vault, false),
AccountMeta::new_readonly(distribute_authority.pubkey(), true),
];

Expand Down
2 changes: 1 addition & 1 deletion programs/voter-stake-registry/tests/test_claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ async fn successeful_claim() -> Result<(), TransportError> {

context
.rewards
.distribute_rewards(&rewards_pool, reward_mint, &distribution_authority)
.distribute_rewards(&rewards_pool, &distribution_authority)
.await?;

context
Expand Down

0 comments on commit 6b7c7d4

Please sign in to comment.