setLockups

function setLockups(
    bytes _lockups
)

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

Parameters

TypeValueDescription

bytes

_lockups

lockup ์ •๋ณด๋“ค

โ€ป ABI Encode ํ˜•ํƒœ

struct LockupRequest{
    address account;
    uint256 amount;
}
TypeValueDescription

address

account

๊ณ„์ • ์ฃผ์†Œ

uint256

amount

lockup ํ† ํฐ ์ˆ˜๋Ÿ‰

โ€ป ๋ฝ์—… ํ† ํฐ์€ ์ตœ์†Œ 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