Search…
⌃K

Pets

ERC721: The PetCore contract is based on the ERC721 standard. For more detailed information please view the documentation by OpenZeppelin. https://docs.openzeppelin.com/contracts/4.x/erc721

Contracts

Addresses

DFK Chain

Name
Mainnet
Testnet
PetCore
0x1990F87d6BC9D9385917E3EDa0A7674411C3Cd7F
0x5C827fa180B26d61DA3c89DD39D1b945DfBA7Dda
PetExchange
0x50142D9e3FA508C424B3ef37BD195b4086CC3DCA
0xcF884770B942118d1d2df5A1CdC121e789056901
Pasture
0xE959cbddB8616BDFFa5464279664CCbb9EA10317
0x1263B2a59F17b829D2a53d18a2f459EB77f6801c

Klaytn

Name
Mainnet
Testnet
PetCore
0x6362b205b539afb5FC369277365441c1dC6fAa28
0x71901994A6269aC8F787F70FAC7c5783C1e0B0B2
PetExchange
0xe5D563F7e4144955FCFa8b90da45825426a05bD4
0x87924b65065B80f856873efFB38626fa6ce80f67
Pasture
0x4aBb1cDe7a0C55850495E80E1806993b1B92F742
0x244BCc7a02b07Ae56B549A6181e353d8D69Fc4Cc

Interfaces

interface IPetCore {
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event PetHatched(address indexed owner, uint256 indexed petId, tuple(uint256 id, uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny, uint64 hungryAt, uint64 equippableAt, uint256 equippedTo) pet);
event PetUpdated(address indexed owner, uint256 indexed petId, tuple(uint256 id, uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny, uint64 hungryAt, uint64 equippableAt, uint256 equippedTo) pet);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
function approve(address to, uint256 tokenId);
function balanceOf(address owner) view returns (uint256);
function getApproved(uint256 tokenId) view returns (address);
function getPet(uint256 _id) view returns (tuple(uint256 id, uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny, uint64 hungryAt, uint64 equippableAt, uint256 equippedTo));
function getUserPets(address _address) view returns (tuple(uint256 id, uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny, uint64 hungryAt, uint64 equippableAt, uint256 equippedTo)[]);
function hatchPet(tuple(uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny) _petOptions, address owner) returns (uint256);
function isApprovedForAll(address owner, address operator) view returns (bool);
function name() view returns (string);
function nextPetId() view returns (uint256);
function ownerOf(uint256 tokenId) view returns (address);
function paused() view returns (bool);
function safeTransferFrom(address from, address to, uint256 tokenId);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data);
function setApprovalForAll(address operator, bool approved);
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);
function updatePet(tuple(uint256 id, uint8 originId, string name, uint8 season, uint8 eggType, uint8 rarity, uint8 element, uint8 bonusCount, uint8 profBonus, uint8 profBonusScalar, uint8 craftBonus, uint8 craftBonusScalar, uint8 combatBonus, uint8 combatBonusScalar, uint16 appearance, uint8 background, uint8 shiny, uint64 hungryAt, uint64 equippableAt, uint256 equippedTo) _pet);
}
interface IPetExchange {
event CompletedPetExchange(address indexed owner, uint256 indexed eggId1, uint256 indexed eggId2, uint8 eggTypeRecieved, uint256 exchangeId);
event StartedPetExchange(address indexed owner, uint256 indexed eggId1, uint256 indexed eggId2, uint256 exchangeId);
function completeExchange(uint256 _exchangeId);
function eggs(uint256) view returns (address);
function getPetExchange(uint256 _exchangeId) view returns (tuple(uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status));
function getUserPetExchanges(address _address) view returns (tuple(uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status)[]);
function idToPetExchange(uint256) view returns (uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status);
function paused() view returns (bool);
function profileExchangedPets(address, uint256) view returns (uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status);
function startExchange(uint256 _petId1, uint256 _petId2);
function totalExchanges() view returns (uint256);
}
interface IPasture {
event PetReleased(uint256 petId, string indexed releaseReason, uint256 releaseTime);
function getProfileReleasedPet(address _profile, uint256 _index) view returns (tuple(uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner));
function getProfileReleasedPets(address _profile) view returns (tuple(uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner)[]);
function getReleasedPet(uint256 _petId) view returns (tuple(uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner));
function getReleasedPets() view returns (tuple(uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner)[]);
function petCore() view returns (address);
function petToReleasedPet(uint256) view returns (uint256);
function profileReleasedPets(address, uint256) view returns (uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner);
function releasePet(address _holder, uint256 _petId, string _releaseReason, address _previousOwner);
function releasedPets(uint256) view returns (uint256 id, uint256 petId, uint64 releaseTime, string releaseReason, address previousOwner);
}

ABIs

PetCore.json
30KB
Code
PetExchange.json
13KB
Code
Pasture.json
11KB
Code

Historical Contracts

These contracts have been deprecated and should not be used. They are listed here for data analysis and tracking purposes only.

Addresses

Harmony

Name
Mainnet
Testnet
PetCore
0xAC9AFb5900C8A27B766bCad3A37423DC0F4C22d3
0x63F0AFcb278fD6A1f8A9Fa679880f22B580B18D2
PetExchange
0xeaF833A0Ae97897f6F69a728C9c17916296cecCA
0x8e307808546922f09Ad1b6bc0677cF8Db7E3b558
Pasture
0xE408814828f2b51649473c1a05B861495516B920
0x782bA5bfA06e8b5537e95AeaD2784cc7B920facb

Interfaces

interface IPetExchangeHarmony {
event PetExchangeCompleted(address indexed owner, uint256 indexed eggId1, uint256 indexed eggId2, uint8 eggTypeRecieved);
event PetExchangeStarted(address indexed owner, uint256 indexed eggId1, uint256 indexed eggId2);
function completeExchange(uint256 _exchangeId);
function eggs(uint256) view returns (address);
function getPetExchange(uint256 _exchangeId) view returns (tuple(uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status));
function getUserPetExchanges(address _address) view returns (tuple(uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status)[]);
function idToPetExchange(uint256) view returns (uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status);
function paused() view returns (bool);
function profileExchangedPets(address, uint256) view returns (uint256 id, address owner, uint256 petId1, uint256 petId2, uint256 seedblock, uint256 finishTime, uint8 status);
function startExchange(uint256 _petId1, uint256 _petId2);
function totalExchanges() view returns (uint256);
}

ABIs

PetExchangeHarmony.json
13KB
Code

Data Tables

Use these tables to parse the blockchain and API Pet data.

Pet Info

Egg Type

{
0: "Blue Pet Egg",
1: "Grey Pet Egg",
2: "Green Pet Egg",
3: "Yellow Pet Egg",
4: "Golden Pet Egg"
}

Rarity

{
0: "Common",
1: "Uncommon",
2: "Rare",
3: "Legendary",
4: "Mythic"
}

Element

{
0: "Fire",
1: "Water",
2: "Earth",
3: "Wind",
4: "Lightning",
5: "Ice",
6: "Light",
7: "Dark"
}

Appearance / Family / Variant

blueEggData.json
35KB
Code
greyEggData.json
35KB
Code

Background

{
0: "Stillwood Meadow",
1: "Forest Trail",
2: "Swamp of Eoxis",
3: "Vithraven Outskirts",
4: "Path of Fire",
5: "Reyalin Mountain Pass",
6: "Adelyn Side Street",
7: "Bloater Falls",
8: "Haywood Farmstead",
9: "Inner Grove",
10: "Vuhlmira Ruins"
}

Pet Bonuses

Bonus Rarity

{
1: "Common",
80: "Rare",
160: "Mythic"
}

Profession Bonus

Key mapping is by Egg Type.
{
0: "Fishing",
1: "Foraging"
}

Crafting Bonus

Key mapping is by Element.
{
0: "Blacksmithing",
1: "Goldsmithing",
2: "Armorsmithing",
3: "Woodworking",
4: "Leatherworking",
5: "Tailoring"
}

Pet Lore

Pet Descriptions

petDescriptions.json
21KB
Code

Pet Rarity Descriptors

petRarityDescriptors.json
3KB
Code