add_new_farm

An entrypoint that adds a new farm with the specified parameters. Also setups share token default metadata.

Call parameters

type fa12_type          is address

type fa2_type           is [@layout:comb] record [
  token                   : address;
  id                      : token_id_type;
]

type token_type         is
  FA12                    of fa12_type
| FA2                     of fa2_type

type fees_type          is [@layout:comb] record [
  harvest_fee             : nat;
  withdrawal_fee          : nat;
  burn_reward             : nat;
]

type stake_params_type  is [@layout:comb] record [
  staked_token            : token_type;
  is_v1_lp                : bool;
]

type add_new_farm_type  is [@layout:comb] record [
  fees                    : fees_type;
  stake_params            : stake_params_type;
  token_info              : map(string, bytes);
  paused                  : bool;
  reward_per_second       : nat;
  timelock                : nat;
  start_time              : timestamp;
]

fees_type

Field
Type
Hint
Description

harvest_fee

nat

Float value multiplied by 1e+16

Fee that applies in time of rewards claiming

withdrawal_fee

nat

Float value multiplied by 1e+16

Fee that applies in time of withdrawing (unstaking) tokens only in farms with timelock

burn_reward

nat

Float value multiplied by 1e+16

The % of the rewards that will be minted to the transaction sender when he calls burn_farm_rewards entrypoint

stake_params_type

Field
Type
Description

staked_token

token_type

FA1.2/FA2 staked token

is_v1_lp

bool

Flag that indicates: QuipuSwap V1 LP token staked or not

add_new_farm_type

Field
Type
Description

fees

Fees that applies to the farming

stake_params

Staking parameters

token_info

map(string, bytes)

Mapping of token's keys to token's info

paused

bool

Flag that indicates: farm is paused or not

reward_per_second

nat

Reward per second

timelock

nat

Timelock in seconds (0 for farms without timelock)

start_time

timestamp

Farm's start time

Usage

Errors

  • Not-admin - sender of the transaction is not current administrator.

Last updated