Program deprecation
The farming crate stays at
0.2.2. The deprecation is in reward-pool-internal #3, which is open. @mercurial-finance/farming-sdk@1.1.0 is the version in that pull request. npm still publishes @meteora-ag/farming-sdk@1.0.18 and @mercurial-finance/farming-sdk@1.0.18.Release summary
The SDK package name in this pull request is
@mercurial-finance/farming-sdk. The farming guides install @meteora-ag/farming-sdk.What We Shipped
- Deprecated new farms, new user accounts, new stakes, and reward funding
- Left
withdraw,claim, andclose_useras the staker exit - Left
pause,withdraw_extra_token, andclose_poolfor the pool authority after the reward period - Added
closeUserto the TypeScript SDK
What To Do
| Integrators | What Changed | What To Do |
|---|---|---|
| Partners |
|
|
Program: farming 0.2.2
Program ID (mainnet and devnet): FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1Program PR #3Changed
- Upgrade to Anchor 1.2.1. The program is built for SBPF v3. Single-reward pools still pass one token account for reward A and reward B. Those accounts are marked
dupso Anchor 1.2 accepts the duplicate mutable account. - Funded pools keep distributing rewards until
reward_duration_end.fundno longer extends that time. withdraw,claim,close_user,pause,withdraw_extra_token, andclose_poolkeep working.pausestill requiresreward_duration_end > 0and a current time afterreward_duration_end.close_userstill requiresbalance_staked == 0,reward_a_per_token_pending == 0, andreward_b_per_token_pending == 0. It decreasesuser_stake_countby 1 and returns the rent to the owner.close_poolstill requirespaused,reward_duration_end > 0, a current time afterreward_duration_end,user_stake_count == 0, and an empty staking vault. The authority signs. Remaining reward vault balances go to the refundee token accounts, and the vaults and pool account are closed.
Deprecated
initialize_pool,create_user,deposit,fund,authorize_funder,deauthorize_funder,toggle_permission,unpause, andmigrate_farming_ratealways fail withDeprecated(6012). Their accounts and instruction data are unchanged.migrate_farming_rateis unused.Pool::get_reward_a_rateandPool::get_reward_b_ratereturnreward_*_rate_u128, or_reward_*_ratewhen the u128 rate is zero.
TypeScript SDK: @mercurial-finance/farming-sdk 1.1.0
SDK PR #3Added
closeUser. Closes the user account and returns its rent to the owner. The program allows it once nothing is staked and no reward is pending.- Re-exports the farming IDL and constants from the package entrypoint.
Deprecated
deposit. The method still builds a transaction. The program rejectsdeposit, andcreate_userwhen the user account is missing, withDeprecated(6012). Exit withwithdraw,claim, andcloseUser.
Changed
- The exit is one transaction:
withdrawthe full balance when it is above zero, thenclaimwhen there is a reward or a stake was withdrawn, thencloseUser. When the staking mint is also a reward mint,withdrawandclaimcan both create that token account. Keep one of those create instructions. getUserBalancethrows when the wallet has no user account in the farm.

