Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ileskov/family
- Owner: ILESKOV
- Created: 2022-08-01T12:23:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-19T23:08:54.000Z (over 2 years ago)
- Last Synced: 2023-03-06T03:50:54.543Z (almost 2 years ago)
- Topics: collection, crypto, cryptocurrency, erc721, nft, smart-contracts, solidity
- Language: TypeScript
- Homepage:
- Size: 802 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!