Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ileskov/family

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
https://github.com/ileskov/family

collection crypto cryptocurrency erc721 nft smart-contracts solidity

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# πŸ‘ͺ '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 Info](#-general-information)
* [Technologies Used](#-technologies-used)
* [Features](#-features)
* [Requirements For Initial Setup](#-requirements-for-initial-setup)
* [Setup](#-setup)
* [Contact](#-contact)

## 🚩 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](https://nodejs.org/en/), should work with any node version below 16.16.0
- Install [Hardhat](https://hardhat.org/)

## πŸ“Ÿ 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](https://infura.io/dashboard/ethereum),[here](https://www.alchemy.com) 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](https://etherscan.io/myapikey).
```
GOERLI_API =
MAINNET_API =
PRIVATE_KEY =
ETHERSCAN_KEY =
MINT_PRICE =
MAX_SUPPLY =
MATURITY_AGE =
```

### 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](https://www.linkedin.com/in/ivan-leskov-4b5664189/) - feel free to contact me!