FarmingFactory
Link to FarmingFactory source code on Shibarium
Farming pool Factory contract. Executes the functionality of deploying new farming pools (for Shibaswap liquidity), as well as their settings and management.
Variables
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
- admin role identifier.
address public esKnine;
- esKNINE token address.
address public router;
- UniswapV2Router02 (ShibaSwap) contract address.
address public wbone;
- wrapped native coin address.
address public farmingImplementation;
- contract storing the farming implementation code (FarmingInstanceV2) address.
ZapFees public zapFees;
- ZapFees struct object.
struct ZapFees {
uint8 entry;
- zapping entry fee.
uint8 exit;
- zapping exit fee.
}
Events
event CreateFarming(
address proxyDeployed,
- deployed farming pool (FarmingProxyV2) address.
address currentImplementation,
- current implementation (FarmingInstanceV2) address.
address token0,
- token0
address from the liquidity pool.
address token1,
- token1
address from the liquidity pool.
);
- upon createFarming method call.
event NativeReceived(uint256 amount);
- upon receiving the native coin.
Admin Functions
LiquidityPool
Struct describing the liquidity pool used for farming pool creation.
RewardPool
Struct describing the reward pool:
Reward token address (for the main reward pool this is esKNINE),
Reward distribution start time and end time,
Reward per second.
createFarming
Creates new farming pool based on the provided liquidity and reward pools info.
Only for DEFAULT_ADMIN_ROLE or ADMIN_ROLE role
addBonusPool
Adds rew
bonus reward pool to the farming
farming pool.
Only for DEFAULT_ADMIN_ROLE or ADMIN_ROLE role
initialize
Initializer function, not called after initialization.
Only for the initializer role
Default Admin Functions
setFarmingImplementation
Set the farming logic implementation contract address.
setRouter
Set the address of UniswapV2Router02 (ShibaSwap).
setWrappedBone
Set the wrapped native coin address.
setEsKnine
Set the esKnine token address.
setFees
Replace zapping and unzapping fee.
stopBonusPool
Stop the rewards distribution of a specific bonus pool at a specific farming pool.
stopFarming
Stop all rewards distribution (main reward pool and each bonus reward pool) for a specific farming.
changeFarmingRPS
Change the RPS value
of the main reward pool at the specified farming
farming pool.
recovery
Withdraw transferred tokens from the contract.
If the output is a wrapped native coin, it will unwrap and return the native coin itself
View Functions
getAllCreatedPools
Get a list of all farming pools ever deployed using this factory.
Last updated