Claim Rewards

1. Claim all rewards

Use the claim_all_rewards function from the liquidity_stake_pool module. Claim all rewards: Collect from all pools, including active and burned NFT positions

 public entry fun claim_all_rewards(
        user: &signer,
        pools: vector<address>,
        nfts: vector<address>
    ) {
        ....
    }

Function Parameters

  • user: The transaction signer (liquidity provider).

  • pools: An array of pools.

  • nfts: An array of nfts.

2. Claim Pool Rewards

Use the claim_rewards function from the liquidity_stake_pool module.

public fun claim_rewards(
        user: &signer,
        pool: Object<LiquidityPool>,
    ): vector<FungibleAsset> {
        ...
    }

Function Parameters

  • user: The transaction signer (liquidity provider).

  • pool: The pool address.

3. Claim NFT Rewards (Burned Positions)

Use the nft_claim_rewards function from the liquidity_stake_pool module.

public fun nft_claim_rewards(
        user: &signer,
        nft: Object<LiquidityPosition>
    ): vector<FungibleAsset> {
        ...
    }

Function Parameters

  • user: The transaction signer (liquidity provider).

  • nft: The NFT address.

Last updated