> For the complete documentation index, see [llms.txt](https://devs.defikingdoms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.defikingdoms.com/nfts/equipment/cachecore.md).

# CacheCore

The CacheCore contract is used to open Equipment "Caches," similar to Hero Crystals or incubated Pet Eggs. It is used for equipment airdrops and will be used for crafting in the future.

## Contracts

### Addresses

| Name      | Mainnet                                      | Testnet                                      |
| --------- | -------------------------------------------- | -------------------------------------------- |
| DFK Chain | `0x15436d3f5dc3D6799b841c46D8a0bD14eC924651` | `0x60489f6712617055f00e9F7bCF2A0BCa8EafFe2f` |
| Klaytn    | `0xe4E368119A858Ca80750269D4490Bc1978260766` | `0x430546a6f3923B4607DB51E9A82758Cd19F5Fb06` |

### Interface

```solidity
interface ICacheCoreDiamond {

    // Events
    event CacheCreated(address indexed owner, uint256 indexed cacheId, address equipmentContract, uint8 equipmentType, uint16 displayId, uint8 rarity, uint256 createdBlock, uint64 craftedBy);
    event CacheOpened(address indexed owner, uint256 indexed cacheId, uint256 indexed equipmentId, address equipmentContract, uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy);
    event Paused(address account);
    event Unpaused(address account);

    // State-Changing Functions
    function multiOpen(uint256[] _cacheIds);
    function open(uint256 _cacheId) returns (uint256);

    // View Functions
    function getCache(uint256 _cacheId) view returns (tuple(address owner, uint256 createdBlock, address equipmentContract, uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy));
    function getUserCaches(address _address) view returns (uint256[]);
    function getUserCachesData(address _address) view returns (uint256[], tuple(address owner, uint256 createdBlock, address equipmentContract, uint8 equipmentType, uint16 displayId, uint8 rarity, uint64 craftedBy)[]);
    function nextCacheId() view returns (uint256);
    function paused() view returns (bool);
    function totalCaches() view returns (uint256);

}
```

### ABI

{% file src="/files/w5ltNWFYLq4hfXGKOU9W" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devs.defikingdoms.com/nfts/equipment/cachecore.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
