add_new_farm
An entrypoint that adds a new farm with the specified parameters. Also setups share token default metadata. Required amount of reward token will be transferred from an admin to the contract (allowance is required).
Call parameters
fees_type
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
stake_params_type
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
token_info
map(string, bytes)
Mapping of token's keys to token's info
reward_token
token_type
FA1.2/FA2 reward token
paused
bool
Flag that indicates: farm is paused or not
timelock
nat
Timelock in seconds (0 for farms without timelock)
start_time
timestamp
Farm's start time
end_time
timestamp
Farm's end time
reward_per_second
nat
Reward per second
Usage
Errors
Not-admin
-sender
of the transaction is not current administrator.TFarm/wrong-end-time
- end time of a farming is less that or equal to start time.TFarm/wrong-timelock
- timelock is greater than farming's lifetime.
Last updated