Try mint an NFT on Sepolia and bridge to Frame Tesnet.
Step by step :
Start with visit the Sepolia contract: https://sepolia.etherscan.io/address/0x78a7d656fc81064f16b52fd8940e319e3fe56a4b#code
To start, connect with your Metamask (Sepolia Network) and mint from the contract by clicking the "write" button :
Confirm transaction on Metamask
From there, click on "View Transaction" to find the id of the NFT you just minted. We'll need this ID for the next step.
Next, we'll go through the actual bridging process. Go back to the Sepolia contract page and find the crossChain function.
The first field is the gas paid to cover the bridging costs, the second field is the LayerZero chain id for Frame, and the third field is your NFT id.
Click on Write and confirm your transaction on metamask
After submitting this txn, you'll find that your NFT no longer exists on Sepolia.
Instead, go to the corresponding Frame NFT page here: https://explorer.testnet.frame.xyz/address/0xa558CF3E0Ca1B9aAA696A48677d359277FeE4c34?tab=contract&contractTab=read
In the ownerOf function, input your token id. Click submit, and you should see your address.
You can repeat the process in reverse by minting on Frame and bridging to Sepolia (you can bridge your original NFT back to Sepolia).
Here's what the crossChain inputs should look like (use 1000000000000000 for the last field - it means 0.001 ETH).
The source code for the cross chain NFT contracts can be found here: https://github.com/frame-network/lz-example/blob/main/contracts/CrossChainNFT.sol. The important functions to pay attention to are crossChain and _nonblockingLzReceive. These handle the minting and burning of tokens when they're bridged.
The NonblockingLzApp contract handles most of the LayerZero communication. If you want to build your own ONFT contract, you can inherit from this contract. Your ONFT contract just needs to call the corresponding functions to trigger the cross-chain messaging. This is a demo app showcasing LayerZero integration on Frame.
Thats all.
Thats all.