Skip to content
/ Family Public

Contract allows users to mint standard ERC721 tokens of type MAN or WOMAN, after that, the user can create a KID token, when the KID token reaches maturity, they become adults MAN or WOMAN token

Notifications You must be signed in to change notification settings

ILESKOV/Family

Repository files navigation

👪 'Family' NFT collection 👫

There is one contract Family.sol with ERC721 standard implementation. Collection has 4 types of tokens: MAN, WOMAN, KID_BOY and KID_GIRL

📁 Table of Contents

🚩 General Information

  • Contract allows users to mint standard ERC721 tokens of type MAN or WOMAN with mintHuman() function
  • If the user has both MAN and WOMAN tokens he can create a KID token with breeding() function
  • In the contract each real day is equal to one year and the owner can set the maturity age
  • When the KID token reaches maturity age and its checked via checkAgeChanging() function this token become adult MAN or WOMAN token

💻 Technologies Used

  • hh coverage
  • slither
  • docgen
  • solhint

🌟 Features

  • Users could create 'Family'
  • Owner set all variables: mint price, maturity age etc.
  • 100% coverage of tests

👀 Requirements For Initial Setup

  • Install NodeJS, should work with any node version below 16.16.0
  • Install Hardhat

📟 Setup

1. 💾 Clone/Download the Repository

2. 📦 Install Dependencies:

$ cd repository_file
$ npm install

3. 🔍 .env environment variables required to set up

Create .env file inside project folder

  • You can get your ethereum or testnet API key here,here or any other service that allow you to connect to the nodes
  • You can get your private key from your wallet(⚠️Don't share your private key with untrusted parties)
  • You can get your etherscan API -key here.
GOERLI_API = <goerli API key>
MAINNET_API = <Ethereum mainnet API key>
PRIVATE_KEY = <Private key of your wallet u want to deploy contracts from>
ETHERSCAN_KEY = <Etherscan API key in order to verify your contracts>
MINT_PRICE = <Constructor parameter mint price in ETH in wei(example: 0.05 ETH = 50000000000000000 wei)>
MAX_SUPPLY = <Constructor parameter max limit of tokens to be minted>
MATURITY_AGE = <Constructor parameter age when token will change from KID type to ADULT type>

4. ⚠️ Run Tests

$ npm run test
$ npm run coverage

5. 🚀 Deploy and verify on Goerli, Polygon or Mainnet

$ npm run goerli
$ npm run polygon
$ npm run mainnet

Note:

deploy.ts implements the verification script and you don't need to complete any additional steps in order to verify the contract.

💬 Contact

Created by @LESKOV - feel free to contact me!

About

Contract allows users to mint standard ERC721 tokens of type MAN or WOMAN, after that, the user can create a KID token, when the KID token reaches maturity, they become adults MAN or WOMAN token

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published