Get farm balance
Line 1: | Line 1: | ||
− | '''$ | + | '''$lp farm balance''' is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specified yield farm. |
− | This function | + | This function is beneficial for getting to know the number of LP tokens you have staked in a particular farm on a decentralized exchange. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Parameters == | == Parameters == | ||
− | '''Farm:''' | + | '''Farm:''' The yield farm for which you want to check your staked LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment. |
− | == Return Value == | + | == Return Value == |
− | + | This function returns a string denoting the number of LP tokens staked in the specified yield farm. | |
− | This function returns a string | + | |
== Example == | == Example == | ||
− | |||
<pre> | <pre> | ||
− | + | log("LP tokens staked in PancakeSwap farm: {$lp farm balance("PancakeSwap")}") | |
− | + | ||
</pre> | </pre> | ||
− | + | The output will display the number of LP tokens you have staked in the specified yield farm. | |
+ | |||
+ | Example Output: | ||
+ | <blockquote> | ||
+ | <p>LP tokens staked in PancakeSwap farm: 10</p> | ||
+ | </blockquote> | ||
+ | |||
+ | The actual balance will vary depending on the number of LP tokens you have staked in the farm. |
Revision as of 19:09, 4 July 2023
$lp farm balance is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specified yield farm.
This function is beneficial for getting to know the number of LP tokens you have staked in a particular farm on a decentralized exchange.
Parameters
Farm: The yield farm for which you want to check your staked LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment.
Return Value
This function returns a string denoting the number of LP tokens staked in the specified yield farm.
Example
log("LP tokens staked in PancakeSwap farm: {$lp farm balance("PancakeSwap")}")
The output will display the number of LP tokens you have staked in the specified yield farm.
Example Output:
LP tokens staked in PancakeSwap farm: 10
The actual balance will vary depending on the number of LP tokens you have staked in the farm.