thirdweb

⌘K

DocsSupport
MyOFT

MyOFT

MyOFT enables cross-chain fungible token transfers without the need for intermediaries.


Sending Tokenized Assets Across Chains

LayerZero provides several ways to transfer tokenized assets across multiple blockchain networks, catering to different use cases and requirements.

  1. Building your own Omnichain token

  2. Sending across native gas token

  3. Moving native assets (USDC, wETH, etc.)

This contract is for (1) in the above list. For you to be able to deploy your own customized Omnichain token. It allows fungible tokens to be transferred across multiple blockchains without asset wrapping or middlechains, ensuring consistency and interoperability.

Implementation

To build a token using the OFT Standard, you need to implement the OFT smart contracts on each chain where the token you own will or currently exists. When transferring the token is burnt on source chain and recreated (minted) on destination chain. (Read more here)

What is an OFT

The Omnichain Fungible Token (OFT) Standard allows fungible tokens to be transferred across multiple blockchains without asset wrapping or middlechains. This standard works by burning tokens on the source chain whenever an omnichain transfer is initiated, sending a message via the protocol and delivering a function call to the destination contract to mint the same number of tokens burned, creating a unified supply across all networks LayerZero supports.

Constructor Params

When deploying MyOFT, the constructor requires the following parameters:

_name: A string representing the name of the token. This is a human-readable string that identifies the token, similar to how ERC20 tokens have names.

_symbol: A string indicating the symbol of the token. This is a shorter, symbolic representation of the token's name, akin to a ticker symbol in traditional financial assets.

_lzEndpoint: An address that points to the LayerZero endpoint. This address is crucial for enabling the omnichain functionality, as it represents the connection point to the LayerZero network, through which cross-chain messages and transfers are facilitated. A list of LayerZero endpoint addresses can be found here

_delegate: An address that is initially set as the owner of the contract through the Ownable pattern from OpenZeppelin. Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract

_initialSupply: The initial supply minted to the delegate on the chain the OFT is deployed on. The total supply of the OFT would equal the _initialSupply per chain multiplied by the total number of chains the OFT is deployed on.

Resources


SEND

(SEND)

view

Published by

0x7D...BA5

View all contracts

Details

  • Publish Date

    Apr 18, 2024

  • Licenses

    MIT, LZBL-1.2, Unlicense


  • Extensions

  • Extension detected

    ERC20


  • Share


    Learn about Publish

    Feedback

    Privacy Policy

    Terms of Service

    Gas Estimator

    Chainlist

    Copyright © 2024 thirdweb