Changes from HoneyFarm
The CheemscoinFarm contract is a fork of the HoneyFarm contract made by 1Hive for https://1hive.io/#/farm. The core functionality is the same but there are some changes.
Note that the HoneyFarm contract is owned by a Governance contract whereas the CheemscoinFarm contract is owned by the developer.
- Change formatting and comments
- Allow anyone to call
depositAdditionalRewards
- Remove referral rewards
- This would give some extra Cheemscoin to whoever made the frontend the deposit was created from whenever the deposit is harvested from.
- Remove
referrer
from theDepositInfo
struct - Remove
rewardManager
,setRewardManager
,_rewardReferrer
,Referred
andRewardManagerSet
- Don't require
rewardManager
to exist inadd
function - Don't set a referrer in
createDeposit
- Don't call
_rewardReferrer
incloseDeposit
orwithdrawRewards
- The contract no longer inherits from an interface (
IHoneyFarm
) sooverride
is removed from all functions - Do not allow no-lock deposits (
_unlockTime
of0
) - Add
recoverToken
function that only the owner can call.- The purpose of this is so if a token is accidentally sent to the contract, it can be recovered.
- When called, it transfers the entire balance of the specified token to the owner
- The specified token can not be Cheemscoin or any of the LP tokens that you can stake
- Add
multiWithdraw
external
function- calls
withdrawRewards
on all_depositIds
- Add
pragma abicoder v2;
(to return structs) - Add
PoolDetails
,ExpiredDeposit
andDepositDetails
structs - Modify
getPoolByIndex
to returnPoolDetails
and make itpublic
- Add
getAllPools
function- Returns an array of
PoolDetails
about each pool
- Add
getAccountDeposits
function- Returns an array of
DepositDetails
about each deposit the_account
owns
- Add
getExpiredDepositIds
function- Returns an array of
ExpiredDeposit
- Make
pendingHsf
public
Last modified 1yr ago