Hedgey Community Docs
  • ✌️This is Hedgey.
  • Products
    • πŸͺ™Vesting Plans
      • Getting Started
        • βœ…Note for Issuers
        • πŸ‘©β€πŸ’ΌFor Issuers
        • πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦For Token Vesting recipients
        • βœ”οΈDelegating your tokens
    • πŸ’°Token Grants
      • Getting Started
      • πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦For Grant Recipients
      • πŸ‘¨β€πŸ’ΌFor Grant Issuers
    • πŸ›οΈInvestor Lockups
      • Getting Started
        • βœ…Note for Issuers
        • πŸ€΅β€β™€οΈFor Issuers
        • πŸ‘―For Investors who have received locked token allocations via Hedgey
      • Special Features
        • Segmenting Plans
        • βœ”οΈDelegating your tokens
      • Creating Investor Lockups using Fireblocks (+troubleshooting)
    • πŸ”Treasury Lockups
      • Getting Started
      • Creating Treasury Lockups
    • πŸͺ‚Token Claims
      • πŸ‡Getting started
        • Using token claims on Farcaster
        • 🎁For Claims Issuers
        • πŸ•΅οΈβ€β™‚οΈCreating a test claim to verify wallet addresses
        • πŸŽ‰For Claims Recipients (unlocked & locked claims)
    • πŸ•—Time Locks
      • πŸ‡Getting started
        • ⏰Creating Time Locks
  • 🧰Support docs
    • πŸ”΅Grants (Arbitrum STIP)
      • Getting Started
      • For STIP Grant Recipients
      • For Arbitrum Grant Issuers
    • πŸ”΅Grants (Arbitrum LTIPP)
      • Getting Started
      • For LTIPP Grant Recipients
      • For Arbitrum Grant Issuers
    • 🟣Grants (Polygon Village)
      • Getting Started
      • For Grant Recipients
      • For Polygon Village Grant Issuers
    • πŸ”΅Locking your team tokens and LP tokens on Hedgey using Hedgey Treasury Locks (for ShimmerSea)
      • Getting Started
      • Creating a Treasury Lockup
    • 🟠(Celo Specific) Connecting with Celo Terminal
    • βœ…(Celo Specific) using Hedgey through Valora
    • 🀩Governance
      • ⚑Hedgey <> Snapshot strategy
    • πŸ‘½On-Chain Governance
    • πŸ”ΊUsing Hedgey app with Fireblocks
    • βš’οΈTroubleshooting
    • πŸ’»Adding Hedgey Apps as "custom" Safe apps
    • πŸͺ±For Wormhole investors who have received lockups on Hedgey
    • ❀️‍πŸ”₯Creating Investor Lockups using FireBlocks (+troubleshooting)
    • 🐑Viewing your Puffer lockup
  • FOR DEVELOPERS
    • ⌚Technical Documentation
      • πŸ’ΎToken Vesting
        • Smart Contract Details
        • Integration & Direct Contract Interactions
      • πŸ“ΌToken Lockups
        • Smart Contract Details
        • Integration & Direct Contract Interactions
      • ☎️Delegation Architecture
        • Delegator Architecture
        • Voting Vaults & On-Chain Delegation
        • ERC721Delegate
      • πŸ₯³Token Claims
        • Smart Contract Information
      • πŸ“€V1 Contracts
        • Hedgeys NFT
          • Technical Details
        • DAO <> DAO Swap
        • Error Codes
    • 🏁Audits
    • πŸ“ŽBug Bounty
    • Deployments
      • Token Vesting Plans
      • Voting Token Vesting Plans
      • Vesting + Lockup Plans
      • Token Lockup Plans
      • Voting Token Lockup Plans
      • Bound Token Lockup Plans
      • Bound Voting Token Lockup Plans
      • Batch Planner Contract
      • Token Claims (ClaimCampaigns)
      • V1 Streaming Contracts
      • V1 Stream Vesting Contracts
      • Hedgeys
  • Contact HEDGEY
    • Social Media
    • Press and Media kit
  • LEGAL
    • Protocol Disclaimer
    • Terms of Use
    • Hedgey Pro Terms of Use
Powered by GitBook
On this page
  • Smart Contract Overview
  • Token-Time-Lock Functions
  1. FOR DEVELOPERS
  2. Technical Documentation
  3. V1 Contracts

Hedgeys NFT

PreviousV1 ContractsNextTechnical Details

Last updated 1 year ago

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 . 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
here