Accessories

The AccessoryCore contract holds NFTs and data for items that are used in both the Offhand1 and Offhand2 Hero Equipment slots, as well as the Accessory slot. Both of these item types share the same base types.

Contracts

Addresses

Name
Mainnet
Testnet

DFK Chain

0x8E32DDD6B75314aA78fd99952299f21Ff4441839

0xc03a74F4707BD3084CbC8736CbF1dE8C57ac4F88

Kaia

0xa505EE303D5Ab53AFc392a06f08758fC83A07209

0x03b19e0095899D6311f29F054D6590383d9997Cb

Metis

0xb16838fc6eAE51FaeA13FBeB655BDe8Bf702d5c2

0xCD3BC364173D5961C55b2f26D0d93402976b3b7B

Interface

interface IAccessoryCoreDiamond {

    // Events
    event AccessoryCreated(address indexed owner, uint256 indexed accessoryId, tuple(uint256 id, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments) accessory);
    event AccessoryUpdated(address indexed owner, uint256 indexed accessoryId, tuple(uint256 id, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments) accessory);
    event Approval(address indexed owner, address indexed operator, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
    event DisplayBonusInfoUpdated(address indexed owner, uint256 accessoryId, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo);
    event Paused(address account);
    event StateEnchantmentsUpdated(address indexed owner, uint256 accessoryId, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments);
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Unpaused(address account);

    // Functions
    function approve(address operator, uint256 tokenId) payable;
    function balanceOf(address account) view returns (uint256);
    function getAccessories(uint256[] _ids) view returns (tuple(uint256 id, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments)[]);
    function getAccessory(uint256 _id) view returns (tuple(uint256 id, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments));
    function getApproved(uint256 tokenId) view returns (address);
    function getStateEnchantments(uint256 _id) view returns (tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3));
    function getUserAccessories(address _address) view returns (tuple(uint256 id, tuple(uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount) displayBonusInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments)[]);
    function getUserAccessoryIds(address _address) view returns (uint256[]);
    function isApprovedForAll(address account, address operator) view returns (bool);
    function name() view returns (string);
    function ownerOf(uint256 tokenId) view returns (address);
    function pause();
    function paused() view returns (bool);
    function safeTransferFrom(address from, address to, uint256 tokenId) payable;
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) payable;
    function symbol() view returns (string);
    function tokenByIndex(uint256 index) view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) view returns (uint256);
    function tokenURI(uint256 tokenId) view returns (string);
    function totalSupply() view returns (uint256);
    function transferFrom(address from, address to, uint256 tokenId) payable;
    function unpause();

}

ABI

Types

Accessory

The primary Accessory struct contains the item's unique ID on the contract, and two sub-structs that hold the item data.

struct Accessory {
    uint256 id;
    DisplayBonusInfo displayBonusInfo;
    StateEnchantments stateEnchantments;
}

DisplayBonusInfo

struct DisplayBonusInfo {
    EquipmentType equipmentType;
    uint16 displayId;
    uint8 rarity;
    uint64 craftedBy;
    uint8 dye1;
    uint8 dye2;
    uint8 bonus1;
    uint8 bonus2;
    uint8 bonus3;
    uint8 bonus4;
    uint8 bonus5;
    uint16 bonusScalar1;
    uint16 bonusScalar2;
    uint16 bonusScalar3;
    uint16 bonusScalar4;
    uint16 bonusScalar5;
    uint16 uniqueSettings;
    uint8 restorationCount;
}
Name
Type
Description

EquipmentType

The numeric ID defining the equipment type (e.g. 1 = Accessory, etc.)

displayId

uint16

Defines the item's base appearance

rarity

uint8

craftedBy

uint64

dye1

uint8

dye2

uint8

bonus1

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus2

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus3

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus4

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus5

uint8

A mapping of an item bonus ID (0 = no bonus)

bonusScalar1

uint16

The scalar value of the corresponding bonus

bonusScalar2

uint16

The scalar value of the corresponding bonus

bonusScalar3

uint16

The scalar value of the corresponding bonus

bonusScalar4

uint16

The scalar value of the corresponding bonus

bonusScalar5

uint16

The scalar value of the corresponding bonus

uniqueSettings

uint16

Currently unused

restorationCount

uint8

The number of times the item's remainingRepairs have been restored

StateEnchantments

struct StateEnchantments {
    uint64 equippedTo;
    uint64 equippableAt;
    uint16 maxDurability;
    uint16 durability;
    uint8 maxRepairs;
    uint8 remainingRepairs;
    uint8 equipRequirement;
    uint8 enchantmentType1;
    uint8 enchantmentType2;
    uint8 enchantmentType3;
    uint16 enchantmentScalar1;
    uint16 enchantmentScalar2;
    uint16 enchantmentScalar3;
}
Name
Type
Description

equippedTo

uint64

The Hero ID of the Hero that the item is equipped to

equippableAt

uint64

The Unix timestamp when the item is next equippable

maxDurability

uint16

The maximum durability of the item

durability

uint16

The current durability of the item

maxRepairs

uint8

The maximum number of repairs for the item

remainingRepairs

uint8

The remaining number of repairs for the item

equipRequirement

uint8

The Level requirement to equip the item

enchantmentType1

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentType2

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentType3

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentScalar1

uint16

The scalar value of the corresponding enchantment

enchantmentScalar2

uint16

The scalar value of the corresponding enchantment

enchantmentScalar3

uint16

The scalar value of the corresponding enchantment

EquipmentType

enum EquipmentType {
    None,
    Accessory,
    Shield,
    Focus
}
Name
Value
Description
Type
Usable By

None

0

None

N/A

N/A

Accessory

1

Accessory

Accessory

  • All Classes

Shield

2

Shield

Offhand

  • Knight

  • Legionnaire

  • Paladin

  • Warrior

Focus

3

Focus

Offhand

  • Paladin

  • Priest

  • Sage

  • Scholar

  • Seer

  • Summoner

  • Wizard

Mappings

Equipment Details

The equipment details correspond to a two-layer mapping by equipmentType and displayId. Most base data can be found on-chain or through the API. Mappings for additional string data are as follows:

{
  "1": {
    "1": {
      "name": "Skali's Eye",
      "description": "An ancient medallion fashioned from the fragments of an emerald blessed by Skali herself. Your vision seems to sharpen while wearing it..."
    },
    "2": {
      "name": "Tal's Curio",
      "description": "A silver medallion worn by Tal's Disciples that wards off evil."
    },
    "3": {
      "name": "Elgrin's Aegis",
      "description": "Elgrin's High Priests were considered invulnerable in battle while wielding enchanted totems. Similarly, this Aegis hardens the skin of anyone who wears it."
    },
    "4": {
      "name": "Secondhand Pants",
      "description": "A fine pair of pre-digested pants. They're a bit loose around the waist."
    },
    "5": {
      "name": "Charger's Mask",
      "description": "Even with decreased visibility, this mask fills the wearer with an overpowering thirst for vengeance. Its style could most appropriately be categorized as \"crazy chic\"."
    },
    "6": {
      "name": "Conical Cap of Remembrance",
      "description": "A ceremonial hat worn at parties, celebrations and, less appropriately, in battle."
    },
    "7": {
      "name": "Gored Gourd",
      "description": "A gourd gored by a bored boar."
    },
    "8": {
      "name": "Ring of Dueling",
      "description": "A lustrous gold ring which surrounds its wearer with a palpable aura of luck."
    },
    "9": {
      "name": "Bronze Champion's Crown",
      "description": "A prized emerald-hued crown awarded to the Duel Champion with the third-longest Champion streak for the season. Heroes adorned with this accessory seem to have greater control over their environments."
    },
    "10": {
      "name": "Silver Champion's Crown",
      "description": "A prized royal blue crown awarded to the Duel Champion with the second-longest Champion streak for the season. Heroes adorned with this accessory seem to have greater control over their environments."
    },
    "11": {
      "name": "Gold Champion's Crown",
      "description": "A prized burgundy crown awarded to the Duel Champion with the longest Champion streak for the season. Heroes adorned with this accessory appear to have greater control over their environments."
    },
    "12": {
      "name": "Champion's Medal",
      "description": "A badge of honor for those brave enough to claim it and a warning for those foolish enough to challenge them."
    },
    "13": {
      "name": "Cooler Head",
      "description": "Its wearers always seem to prevail."
    },
    "14": {
      "name": "Boc-Knight Helm",
      "description": "This protective headgear fashioned from the beak of a mighty rocboc fills its wearer with the inexplicable urge to peck."
    },
    "15": {
      "name": "Ancient Wood Dragon Mask",
      "description": "This lovingly crafted mask celebrates the enduring spirit of Gaia's fierce and primal dragon warriors from ages long past."
    },
    "16": {
      "name": "Bunbun Bonnet",
      "description": "An exquisite bonnet made from the finest faux fur and featured in Yara's latest line of bunbun fashions."
    },
    "17": {
      "name": "Melville's Spectacular Spectacles",
      "description": "A truly spectacular feat of engineering, these unique spectacles provide modest protection from the sun and a myriad of sharp objects."
    },
    "18": {
      "name": "Mister Birthday",
      "description": "An austere cake that exudes confidence and longevity. A strange force seems to invite you to place it atop your head."
    },
    "19": {
      "name": "Swearing Hat",
      "description": "On cold, moonless nights, this hat whispers curses in a long-forgotten tongue."
    },
    "50000": {
      "name": "Bloater Mask",
      "description": "This iconic fish mask exudes an air of sophistication and mystique. No bloaters were harmed in the making of this item."
    },
    "50001": {
      "name": "Plague Mask",
      "description": "A clever mask designed to keep the plague out and the good vibes in."
    },
    "50002": {
      "name": "Super Blub Defender: Red Mask",
      "description": "A mask made by the Super Blub Defender (SBD) Fan Club. This one represents the Red Defender, who is known for his bravery, virtue, and mastery of Togwan-do."
    },
    "50003": {
      "name": "Super Blub Defender: Pink Mask",
      "description": "A mask made by the Super Blub Defender (SBD) Fan Club. This one represents the Pink Defender, who is known for her biting wit, nibbling charm, and chomping mastication."
    },
    "50004": {
      "name": "Super Blub Defender: Blue Mask",
      "description": "A mask made by the Super Blub Defender (SBD) Fan Club. This one represents the Blue Defender, who is known for his honesty, compassion, and excellent taste in music."
    },
    "50005": {
      "name": "Super Blub Defender: Yellow Mask",
      "description": "A mask made by the Super Blub Defender (SBD) Fan Club. This one represents the Yellow Defender, who is known for her lucky dodges, uncanny lunges, and otherwordly Bloater cakes."
    },
    "50006": {
      "name": "Super Blub Defender: Black Mask",
      "description": "A mask made by the Super Blub Defender (SBD) Fan Club. This one represents the Black Defender, who is known for his firm handshake, next-level stealth, and unprompted backflips."
    },
    "50008": {
      "name": "Yellow Panther Mask",
      "description": "The mysterious Yellow Panther Clan lives and fights in the shadows. Don their ceremonial mask and join the movement."
    },
    "50009": {
      "name": "Chef Hat",
      "description": "A chef should always be prepared for furious fighting or fierce fileting. This is the perfect hat for adventures both in and out of the kitchen."
    },
    "50010": {
      "name": "Dark Summoner Mask",
      "description": "When they're not sacrificing Heroes in a nonstop stream of dark rituals that push Gaia further and further towards an inescapable corruption, the Dark Summoner is looking fit and fancy-free in this sleek mask wrap."
    },
    "50011": {
      "name": "Rolando Mask",
      "description": "Show your Rolando pride by walking a mile in his head! Perfect for adding a ribbit of fun to any occasion."
    },
    "50012": {
      "name": "Doug Hype Shades",
      "description": "Get a fresh view of the world with these stylish, hype-tinted glasses."
    },
    "50013": {
      "name": "Big Red Bear Head",
      "description": "It's big, it's red, it's beautiful! Don this furry fashion statement before battle for a healthy dose of ursine intimidation."
    },
    "50014": {
      "name": "Frost Bloater Mask",
      "description": "Cold as ice and twice as nice, this frozen fish mask channels the least threatening creature in the frozen tundras of Crystalvale."
    },
    "50015": {
      "name": "Axolotl Mask",
      "description": "A musty Axolotl mask with bulging eyes that has gained popularity amongst certain fringe groups. It is very... pink."
    },
    "50016": {
      "name": "Crown of Wisdom",
      "description": "A laurel leaf crown of immense power that imbues wisdom and light."
    }
  },
  "2": {
    "1": {
      "name": "Yolked Bockler",
      "description": "A mysterious shield whose dubious origin raises questions about its durability and usefulness."
    },
    "2": {
      "name": "Cutting Board",
      "description": "Repurposed wooden planks trying to pass as a shield."
    },
    "3": {
      "name": "Bronze Shield",
      "description": "A bronze round-shield with gaps designed to allow a spear or sword to pass through comfortably."
    },
    "4": {
      "name": "Squire's Shield",
      "description": "A simple heater shield made of iron. Blocks everything but criticism."
    }
  }
}

Accessory Bonuses

Accessory Bonus descriptions correspond to the following mappings. The X in each mapping represents the corresponding bonusScalar value.

For Bonuses with both X and Y values, these are determined by using bitwise operators against the uint16 bonusScalar value as follows:

  • X = bonusScalar & 255

  • Y = bonusScalar >> 8

{
    1: "Increase Physical Accuracy by +X%",
    2: "Increase Magical Accuracy by +X%",
    3: "Increase Block chance by +X%",
    4: "Increase Spell Block chance by +X%",
    5: "Increase Speed by X%",
    6: "Increase Evasion by X%",
    7: "Increase Status Effect Resistance by +X%",
    8: "Increase Banish Resistance by +X%",
    9: "Increase Bleed Resistance by +X%",
    10: "Increase Blind Resistance by +X%",
    11: "Increase Burn Resistance by +X%",
    12: "Increase Chill Resistance by +X%",
    13: "Increase Confuse Resistance by +X%",
    14: "Increase Daze Resistance by +X%",
    15: "Increase Disarm Resistance by +X%",
    16: "Increase Fear Resistance by +X%",
    17: "Increase Intimidate Resistance by +X%",
    18: "Increase Poison Resistance by +X%",
    19: "Increase Pull Resistance by +X%",
    20: "Increase Push Resistance by +X%",
    21: "Increase Silence Resistance by +X%",
    22: "Increase Sleep Resistance by +X%",
    23: "Increase Slow Resistance by +X%",
    24: "Increase Stun Resistance by +X%",
    25: "Increase Taunt Resistance by +X%",
    26: "Increase Critical Hit Multiplier by +X",
    27: "Increase Physical Defense by +X%",
    28: "Increase Magical Defense by +X%",
    29: "Decrease Physical Accuracy by -X%",
    30: "Decrease Magical Accuracy by -X%",
    31: "Increase Physical Damage by +X%",
    32: "Increase Magical Damage by +X%",
    33: "Gain +X% Riposte",
    230: "Add +X to Duel Score when Dueling",
    231: "Gain a roll for +X-Y added to Duel Score when Dueling",
    232: "Gain +X% chance for matching background to appear when defending Duel champion",
    233: "Add +X to Duel Score when defending Duel champion",
    234: "Gain a roll for +X-Y added to Duel Score when defending Duel champion"
}

Offhand Bonuses

Offhand Bonus descriptions correspond to the following mappings. The X in each mapping represents the corresponding bonusScalar value.

{
    1: "Increase Block chance by +X%",
    2: "Increase Block damage reduction by +X%",
    3: "Increase Spell Block chance by +X%",
    4: "Increase Spell Block damage reduction by +X%",
    5: "Gain +X% Riposte"
}

Last updated