CLI Farming

Commande-Line Interface Usage for RHEA Farming

Always check that a wallet has a sufficient storage deposit on a token's smart contract before initiating swaps, withdrawing liquidity, or withdrawing rewards. Failure to do so may result in the tokens being placed in the contract's "owner" account, requiring a vote by the RHEA Community DAO to remove them.

You can setup the following parameters:

export FARMING=ref-farming.testnet
export EX=ref-finance.testnet
export TOKEN=token.ref-finance.testnet

View general information

near view $FARMING get_metadata

View all farms with pagination

near view $FARMING list_farms '{"from_index": 0, "limit": 100}'

Notes:

  • Outdated_farms are excluded

  • There are three farm_status in contract, they are Created, Running, Ended

  • start_at is timestamp in seconds

  • session_interval is timestamp in seconds

View all seeds with pagination

View all rewards with pagination

View single seed information

View all farms per seed

View single farm information

View rewards per user

View unclaimed rewards per user

View seeds per user

Stake/Unstake seed

Claim rewards

Withdraw reward token

Create farm

At the moment, only the owner of this contract can create farms

To create a farm, you need to prepare the farming terms accordingly.

At this point, this is a farm with no reward deposited, farm status is Created.

To activate a farm, deposit some reward tokens into the farm with ft_transfer_call.

Last updated

Was this helpful?