setLockups

function setLockups( bytes _lockups );

Lockup 등둝 Parameters

TypeValueDescription

bytes

_lockups

Lockup 정보듀

β€» ABI Encode ν˜•νƒœ

Example

     // Lockup 정보 μž…λ ₯ (μ•„λž˜ 순으둜 κΈ°μž…)

    address account;        // Lockup 계정 μ£Όμ†Œ
    uint256 amount;         // Lockup 토큰 개수
    uint256 duration;       // Lokcup κΈ°κ°„

    let lockupInfo = [
        [accounts[1].address, ethers.utils.parseEther("0.1"), ONE_MONTH*1],
        [accounts[1].address, ethers.utils.parseEther("0.1"), ONE_MONTH*2],
        [accounts[1].address, ethers.utils.parseEther("0.1"), ONE_MONTH*3],
    ]

    // Encode ν˜•νƒœλ‘œ μΉ˜ν™˜
    const abiCoder = ethers.utils.defaultAbiCoder;
    const encodeLockupInfo= abiCoder.encode(["tuple(address, uint256, uint256)[]"], [mintInfo]); 

    // exec
    await lockupContract.setLockups(encodeLockupInfo);

Last updated