deployPool

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

μ‹±κΈ€μŠ€ν…Œμ΄ν‚Ή μ»¨νŠΈλž™νŠΈ 생성

Parameters

TypeValueDescription

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