- Set the peer (i.e., the OFT’s counterparty address on SUI) in your OFT contract.
- Configure the LayerZero endpoint with correct DVN and executor settings (send side, receive side).
- Optionally set enforced options (gas, value) for cross-chain message execution.
The following codes are in OFT for migrating it to another OFT or/and getting back the treasury cap. In deUSD case, you would use the CallCap to initalize the new CustomOFT but pertain the treasury cap in your own token package for native mint.
The MigrationCap
is the cap that will be created after initialization of an OFT, which we will provide to you when transfering the ownership.
/// Container for OFT components during migration operations.
public struct MigrationTicket<phantom T> {
/// Address of the migration capability
migration_cap: address,
/// Call capability granting authorization for LayerZero operations
- Set the peer (i.e., the OFT’s counterparty address on SUI) in your OFT contract.
- Configure the LayerZero endpoint with correct DVN and executor settings (send side, receive side).
- Optionally set enforced options (gas, value) for cross-chain message execution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ts-node | |
/** | |
* Script to send deUSD from Sui to Ethereum using LayerZero OFT | |
* | |
* Usage: | |
* 1. Set your private key in the PRIVATE_KEY_BASE64 environment variable | |
* 2. Adjust the AMOUNT_TO_SEND and RECEIVER_ADDRESS as needed | |
* 3. Run: npx ts-node scripts/send-deusd-to-eth.ts | |
*/ |
- Set the peer (i.e., the OFT’s counterparty address on SUI) in your OFT contract.
- Configure the LayerZero endpoint with correct DVN and executor settings (send side, receive side).
- Optionally set enforced options (gas, value) for cross-chain message execution.