# Hedgeys NFT

## Smart Contract Overview

The Hedgeys smart contract is a version of the ERC721 smart contract, often referred to as an NFT contract, that extends the enumerable extension from openzeppelin. Most of the core functions and documentation on ERC721 contracts can be better explained by the amazing openzepplin team [here](https://docs.openzeppelin.com/contracts/2.x/api/token/erc721). We will not dive into the various standard ERC721 functions in this section, but rather focus on what makes the Hedgeys NFT smart contracts unique.

### Token-Time-Lock Functions

Hedgeys smart contract allows users to mint an NFT that represents more than their metadata and image URL; it represents a token-time-lock. The token-time-lock is comprised of three elements, which we store in a global struct called a `Future`. The NFT `tokenId` is mapped uniquely to each `Future`, as a variable `futures` that is publicly accessible. So when a user is looking up their metadata by their `tokenId` they can also pull the future details with a function simply `futures[tokenId]` . A Future struct contains three key value pairs:

1. `amount`: The amount of tokens that are locked
2. `token`: The ERC20 contract address of the token that is locked
3. `unlockDate`: The unix time stamp when these tokens will unlock and are redeemable

When you mint an NFT you also create a `Future` . It’s that simple!

`createNFT` : This is the function that will mint an NFT and additional lock your desired tokens into the contract - creating the Future struct

`redeemNFT` : This is the function that will burn your NFT in exchange for redeeming your locked tokens and in return deliver out of the contract tokens to the you (as the owner).

**The Github Repository contract is** [**here**](https://github.com/hedgey-finance/NFT_OTC_Core/blob/main/contracts/FuturesNFT.sol)


---

# Agent Instructions: 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:

```
GET https://hedgey.gitbook.io/hedgey-community-docs/for-developers/technical-documentation/v1-contracts/hedgeys-nft.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
