Everything you need to implement a working ONFT bridge. The ONFT bridge accepts either ONFT721 or ONFT1155.
Your ONFT configuration will live in the main config file and be included in the lzAppConfig
in the onft
field. Each collection is added to the onftStore
via addCollection
and we use addBridge
with the provided bridging api.
A valid collection should implement the OnftBridgeConfig
type. This will include the network, contract address, and ONFT standard (ERC721 or ERC1155). As an example we have included the Lil Pudgy's collection with the following configuration
export const erc721_mainnet: OnftBridgeConfig = {
contracts: [
{
standard: OnftStandard.ERC721,
chainId: ChainId.POLYGON,
address: '0x611747CC4576aAb44f602a65dF3557150C214493',
},
{
standard: OnftStandard.ERC721,
chainId: ChainId.ETHEREUM,
address: '0x524cAB2ec69124574082676e6F654a18df49A048',
},
{
standard: OnftStandard.ERC721,
chainId: ChainId.BSC,
address: '0x611747CC4576aAb44f602a65dF3557150C214493',
},
{
standard: OnftStandard.ERC721,
chainId: ChainId.ARBITRUM,
address: '0x611747CC4576aAb44f602a65dF3557150C214493',
},
],
proxy: [
{
standard: OnftStandard.ERC721,
chainId: ChainId.ETHEREUM,
address: '0x611747CC4576aAb44f602a65dF3557150C214493',
},
],
};
If you have your own ONFT collection and know your contract address information, you can swap out this configuration with your own token information and have your bridge up and running right away. If you don't have your own ONFT configuration yet, see the LayerZero documentation for more information.