Collateralize
Depositing WMON as Collateral
const WMON = new ethers.Contract(ADDRESSES.WMON, ERC20_ABI, provider);
const balance = await WMON.balanceOf(userAddress);
const depositAmount = ethers.utils.parseEther("10"); // 10 WMON tokens
if (balance.lt(depositAmount)) {
throw new Error("Insufficient WMON token balance");
}Type
Name
Description
Type
Name
Description
Last updated
Was this helpful?