deployPool

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 생성
const rewardPerSecond = ethers.utils.parseEther("1.0").div(86400)
const startTimestamp = parseInt(new Date().getTime() / 1000)
const bonusEndTimestamp = startTimestamp + 86400*30

await MantiswapStakingFactoryContract.deployPool(
    stakingRouterContract.address,
    mockToken0Contract.address, 
    mockRewardTokenContract.address,
    rewardPerSecond,
    startTimestamp,
    bonusEndTimestamp
    )

2022.12.22

Last updated