asdRouter

asdRouter enables asD tokens to be minted from other chains with USDC deposits. Its only public method, lzCompose, is called by the LayerZero executor when minting is initiated by a user on another network.

Minting

To mint asD tokens from another network, a user should first obtain a whitelisted USDC OFT on the origin network (by wrapping or swapping). Then call the LayerZero send method on the OFT passing the following struct (encoded as bytes) in the composeMsg parameter:

Methods

lzCompose

The lzCompose(...) method is called by the LayerZero executor when minting is initiated on another network. The calldata for this method is determined by the composeMsg parameter sent on the origin chain when USDC is sent, as described above.

This method:

  1. Wraps bridged USDC as asdUSDC

  2. Swaps asdUSDC for NOTE on Ambient

  3. Mints the specified asD token on Canto

  4. Sends the asD token to the destination chain and address

Last updated