setLockups

function setLockups(
    bytes _lockups
)

Lockup ํ•œ๋ฒˆ์— ๋“ฑ๋ก

Parameters

โ€ป ABI Encode ํ˜•ํƒœ

struct LockupRequest{
    address account;
    uint256 amount;
}

โ€ป ๋ฝ์—… ํ† ํฐ์€ ์ตœ์†Œ 12 Ether ์ด์ƒ

Example

let lockupInfo = [
    [accounts[1].address, ethers.utils.parseEther("100")],
    [accounts[2].address, ethers.utils.parseEther("200")],
    [accounts[3].address, ethers.utils.parseEther("300")],
]

// Encode ํ˜•ํƒœ๋กœ ์น˜ํ™˜
const abiCoder = ethers.utils.defaultAbiCoder
const encodeLockupInfo= abiCoder.encode(["tuple(address, uint256)[]"], [mintInfo])

// exec
await lockupContract.setLockups(encodeLockupInfo)

2023.03.22

Last updated