LogoLogo
  • DFK Developer Docs
  • Contracts
    • Exchanges
      • The Trader
      • The Bazaar
    • Sales & Rentals
      • Hero Auction
      • Hero Rental
      • Equipment Auction
      • Pet Auction
      • Land Auction
    • Summoning
      • Hero Summoning
        • Dark Summoning
      • Pet Hatching
    • Meditation Circle
    • Quests
      • Quest Core
      • Historical Contracts
        • Quest Core
        • Profession Quests
        • Training Quests
    • Void Hunts
    • Patrols
    • PVP Combat
    • Influence System
    • Gardens
      • Master Gardener
    • Jeweler 2.0
      • Power-Ups
      • Jeweler 1.0
    • Profiles
    • DFK Duel
      • Previous Seasons
      • Raffle Master
    • Events
      • Gen0 Reroll
      • Gene Reroll
      • Perilous Journey
    • Bridging
      • Hero Bridge (Synapse)
      • Hero Bridge (LayerZero)
      • Equipment Bridge (Synapse)
      • Equipment Bridge (LayerZero)
      • Item Bridge V2
        • Item Bridge V1 (Deprecated)
      • Gaia's Tear Bridge
    • Miscellaneous
      • Airdrops
      • Charity
      • Flag Storage
      • Gen0 Airdrop (Harmony)
      • Gen0 Sale (Harmony)
      • Graveyard
      • Locked Token Claim
      • Locked Token Raffle
      • Token Disburse
  • NFTs
    • Heroes
      • HeroV4 (Metis)
    • Equipment
      • Weapons
      • Armor
      • Accessories
      • Shared Equipment Mappings
      • CacheCore
      • Equipment Shop
      • Visage Shop
    • Pets
      • Pet Exchange
    • Lands
  • Tokens
    • Ecosystem Token
    • Power Tokens
    • Governance Tokens
    • Currencies
      • DFK Gold
      • Gaia's Tears
    • Inventory Items
    • Gold Crops
    • Combat Items
    • Miscellaneous Tokens
      • Collectible Items
      • Raffle Tickets
  • Crafting
    • Alchemist
    • Nutritionist
    • Stone Carver
    • Vendor (Item Gold Trader)
  • Collections
    • Runes
    • Pet Eggs
    • Pet Treats
    • Potions & Consumables
      • Item Consumer
      • Potion Migrator
    • Enhancement Stones
    • Attunement Crystals
      • Atonement Crystals
    • Pages of the Eternal Story
  • API
    • Community GraphQL API
      • Getting Started
      • Auctions
      • Bazaar
      • Heroes
      • Pets
      • Profiles
    • Hero Metadata & Image API
    • Pet Metadata & Image API
    • Token Supply API
  • Community Builders
    • Kingdom Building Program
    • Developer Resources
    • Community Projects
  • DFK CHain
    • Getting Started
    • Nodes & Validators
    • Bridged Tokens
    • Ecosystem Partners
      • Covalent API
      • SupraOracles Price Feeds
      • SupraOracles VRF
    • Miscellaneous Contracts
Powered by GitBook
On this page
  • Chain ID
  • Fees
  • Contract Addresses
  • Interfaces
  • ABIs
  1. Contracts
  2. Bridging

Hero Bridge (LayerZero)

PreviousHero Bridge (Synapse)NextEquipment Bridge (Synapse)

Last updated 7 months ago

The LayerZero Hero Bridge processes the cross-chain bridging of Hero NFTs. It is available between DFK Chain and Metis, and between Kaia and Metis only. Bridging a Hero will also send any Pets or Equipment that are attached to the Hero.

The Hero Bridge is built in partnership with using their V2 Messaging protocol. For more information, visit their documentation at: .

Use () to track the progress of bridged items.

Chain ID

Use the following mainnet destination Chain IDs for the Hero Bridge:

  • DFK Chain: 53935

  • Kaia: 8217

  • Metis: 1088

Bridging Heroes from Metis requires that they are sent back to the same Chain ID that they first arrived from. This realm can be found in the realmId field on the HeroV4 contract, with the following mappings:

DFK Chain: 1 (Testnet: 20)

Kaia: 2 (Testnet: 21)

Fees

Bridging has a fee associated with each transaction. This fee must be included in the value field of the transaction. Fees can be estimated by calling estimateHero or estimateHeroes.

Contract Addresses

Name
Mainnet
Testnet

DFK Chain

0x49F7541b4308A2332afcA5dc5830a3a5f93F18bC

0xe2d5CD6384D54E73722A2caE2b00f1348B1F2B59

Kaia

0x12af2AD0b90E08d0d70449E5d0b14afd14F9a24c

0x590e1060Eb2DB33D6A46Fb6927C08FD930A023D5

Metis

0xDA53A7251f08ac9D59E977D0032a1521832A6Ac9

0xb5722C7ED74bD8D829754383C0E65f9F7e9bacD6

Interfaces

interface IHeroBridgeLZ {

    event HeroArrived(uint256 indexed heroId, uint256 arrivalChainId);
    event HeroLZBridgeReceived(uint32 srcEid, address sender, address receiver, uint256 heroId);
    event HeroLZBridgeSent(uint32 srcEid, address sender, address receiver, uint256 heroId);
    event HeroSent(uint256 indexed heroId, uint256 arrivalChainId);

    function bridgeHero(uint32 _dstChainId, address _receiver, uint256 _heroId) payable;
    function bridgeHeroes(uint32 _dstChainId, address _receiver, uint256[] _heroIds) payable;
    function estimateHero(uint32 _dstChainId, address _receiver, uint256 _heroId) view returns (tuple(uint256 nativeFee, uint256 lzTokenFee) fee);
    function estimateHeroes(uint32 _dstChainId, address _receiver, uint256[] _heroIds) view returns (tuple(uint256 nativeFee, uint256 lzTokenFee) fee);

}

ABIs

Layer Zero
https://layerzero.gitbook.io/docs/
Layer Zero Scan
https://layerzeroscan.com/
25KB
HeroBridgeLZDiamond.json