telosnetwork / telos-bridge

The Telos LayerZero bridge enables seamless asset transfers between Telos and other blockchains
https://bridge.telos.net
5 stars 3 forks source link

Add USDV to telos bridge #82

Open rozzaswap opened 5 months ago

rozzaswap commented 5 months ago

As part of on-boarding USDV to Telos, they need to be added to the OFT bridge.

Docs: https://docs.usdv.money/docs For more info see "Telos Foundation + USDV" chat (Rorrie, Don and JT can invite)

https://docs.usdv.money/docs/technical-reference/mainnet

rozzaswap commented 4 months ago
let adapterParams = ethers.utils.solidityPack(
    ['uint16','uint256'],
    [1, 200000]
  );

  let [nativeFee, lzTokenFee] = await usdv.quoteSendFee([receiverAddr32, amt, amt, dstEid], adapterParams, false, "0x");
  nativeFee = nativeFee.mul(2);
  console.log("Fee", nativeFee, lzTokenFee);

  const tx = await usdv.send([receiverAddr32, amt, amt, dstEid], adapterParams, 
    [nativeFee, lzTokenFee], receiverAddr, "0x", {value: nativeFee});
  console.log(tx);