Skip to main content
Version: Endpoint V1 Docs

Deployment Guide

info

This guide assumes you have NFT deployed on a source chain and wish to expand on other chains. You should use the 721 and 1155 templates according to your specifications.

How to deploy ProxyONFT and ONFT Contracts

  1. Deploy your ProxyONFT contract using your NFT address with the following constructor arguments.

    ( uint _minGasToTransfer, address _lzEndpoint, address _proxyToken )
    • _minGasToTransfer: The minimum gas needed to transfer and store your NFT, typically 100k for ERC721. This value would vary depending on your contract complexity, it's recommended to test. If this value is set too low, the destination tx will fail and a manual retry is needed.
    • _lzEndpoint: The LayerZero Endpoint on the chain.
    • _proxyToken: The NFT address on the source chain.
  2. Deploy the ONFT on chains you want to expand to with the following arguments:

    constructor( string memory _name, string memory _symbol, uint _minGasToTransfer, address _lzEndpoint )
    • _minGasToTransfer: Same as above.
    • _lzEndpoint: Same as above.
  3. Set your contracts to trust one another using setTrustedRemoteAddress. Pair them to one another's chain and address.

  4. Next, we're going to set our minimum Gas Limit for each chain. (Recommended 260k for all EVM chains except Arbitrum, 2M for Arbitrum). Call setMinDstGas with the chainId of the other chain, the packet type ("0" meaning send, "1" meaning send and call), and the gas limit amount.

(Make sure that your AdapterParams gas limit > setMinDstGas)

info

If providedGasLimit < minGasLimit, it'd fail: "LZApp: gas limit is too low", where providedGasLimit is _getGasLimit( provided in _adapterParams) and minGasLimit is minDstGasLimit