pub struct TestRewarder {
pub label: String,
pub rewarder: AccountRef<Rewarder>,
pub mint_wrapper: TestMintWrapper,
pub minter: AccountRef<Minter>,
pub claim_fee_token_account: AccountRef<TokenAccount>,
pub authority: Pubkey,
pub rewarder_base: Keypair,
}Expand description
Test rewarder with labeled accounts
Fields§
§label: String§rewarder: AccountRef<Rewarder>§mint_wrapper: TestMintWrapper§minter: AccountRef<Minter>§claim_fee_token_account: AccountRef<TokenAccount>§rewarder_base: KeypairImplementations§
Source§impl TestRewarder
impl TestRewarder
Sourcepub fn new_rewarder(
env: &mut TestSVM,
label: &str,
authority: &Keypair,
) -> Result<Self>
pub fn new_rewarder( env: &mut TestSVM, label: &str, authority: &Keypair, ) -> Result<Self>
Create a new rewarder with the specified label and authority
Sourcepub fn create_quarry(
&self,
env: &mut TestSVM,
quarry_name: &str,
staked_token_mint: &Pubkey,
authority: &Keypair,
) -> Result<TestQuarry>
pub fn create_quarry( &self, env: &mut TestSVM, quarry_name: &str, staked_token_mint: &Pubkey, authority: &Keypair, ) -> Result<TestQuarry>
Create a replica quarry for this rewarder
Sourcepub fn create_primary_quarry(
&self,
env: &mut TestSVM,
quarry_name: &str,
staked_token_mint: &Pubkey,
authority: &Keypair,
) -> Result<TestQuarry>
pub fn create_primary_quarry( &self, env: &mut TestSVM, quarry_name: &str, staked_token_mint: &Pubkey, authority: &Keypair, ) -> Result<TestQuarry>
Create a primary quarry for this rewarder
Sourcepub fn create_replica_quarry(
&self,
env: &mut TestSVM,
quarry_name: &str,
merge_pool: &TestMergePool,
authority: &Keypair,
) -> Result<TestQuarry>
pub fn create_replica_quarry( &self, env: &mut TestSVM, quarry_name: &str, merge_pool: &TestMergePool, authority: &Keypair, ) -> Result<TestQuarry>
Create a replica quarry using the replica mint from a TestMergePool
Sourcepub fn fetch_rewarder(&self, env: &TestSVM) -> Result<Rewarder>
pub fn fetch_rewarder(&self, env: &TestSVM) -> Result<Rewarder>
Fetch the Rewarder account from chain
Sourcepub fn fetch_mint_wrapper(&self, env: &TestSVM) -> Result<MintWrapper>
pub fn fetch_mint_wrapper(&self, env: &TestSVM) -> Result<MintWrapper>
Fetch the MintWrapper account from chain
Auto Trait Implementations§
impl Freeze for TestRewarder
impl RefUnwindSafe for TestRewarder
impl Send for TestRewarder
impl Sync for TestRewarder
impl Unpin for TestRewarder
impl UnwindSafe for TestRewarder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more