deployPool

Updated : 2024.05.10

function deployPool(
    address _router,
    address _stakedToken,
    address _rewardToken,
    uint256 _rewardPerSecond,
    uint256 _startTimestamp,
    uint256 _bonusEndTimestamp
) external onlyOwner returns(MantiswapStakingPool pool)

싱글스테이킹 컨트랙트 생성

Parameters

Type
Value
Description

address

_router

stakingRouter Contract 주소

address

_stakeToken

스테이킹 토큰 주소

address

_rewardToken

스테이킹 시 보상 줄 토큰 주소

uint256

_rewardPerSecond

초당 보상토큰 금액

uint256

_startTimestamp

유동성 풀 생성 날짜

uint256

_bonusEndTimestamp

보상 완료 날짜(최대로 잡기)

Example

// single staking pool 생성

// START_TIMESTAMP : 1695715200, // 시작시간 (9월 26일 17:00 - 1695715200)
// BONUES_PERIOD_SECONDS : 86400*30, // 풀 유효시간 (초)
const rewardPerSecond = 
    CONFIG.TOTAL_REWARD_FOR_DURATION.div(CONFIG.BONUES_PERIOD_SECONDS);
const poolRewardEndTime = CONFIG.START_TIMESTAMP + CONFIG.BONUES_PERIOD_SECONDS;


await factoryContract.deployPool(
    routerContract.address,
    tokenContract.address, 
    tokenContract.address,
    rewardPerSecond,
    CONFIG.START_TIMESTAMP,
    poolRewardEndTime,
)

2024.05.10

Last updated