Skip to content

Commit c78524b

Browse files
committed
ready to record
1 parent 47ee42b commit c78524b

File tree

18 files changed

+502
-728
lines changed

18 files changed

+502
-728
lines changed

README.md

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,35 @@
1010

1111
Video:
1212

13-
🌟 [How To Create An ENTIRE NFT Collection (10,000+) & MINT with ZERO Coding Knowledge v2.0](https://youtu.be/quGdJweadFM)
13+
🌟 [DAPP VIDEO HERE]()
1414

15-
Base code is from [hashlips_art_engine](https://github.com/HashLips/hashlips_art_engine)
15+
Base art generator code is from [hashlips_art_engine](https://github.com/HashLips/hashlips_art_engine)
1616

17-
Minting uses [NFTPort](https://nftport.xyz)
17+
Contract uses [NFTPort](https://nftport.xyz)
1818

1919
Join the Discord server for more help from the community: [codeSTACKr Discord](https://discord.gg/A9CnsVzzkZ)
2020

2121
## INSTALLATION
2222

23+
### Backend
24+
2325
- Clone this repo or download the latest release zip file.
2426
- Unzip, if needed, and open the folder in VS Code.
2527
- From the terminal run:
2628
```
2729
npm install
2830
```
29-
- Copy your image layers into the `layers` folder.
30-
- Use the `src/config.js` file to set up your layers and NFT information.
31+
- Copy your image layers into the `/backend/layers` folder.
32+
- Use the `/backend/src/config.js` file to set up your layers and NFT information.
3133

3234
## COMMANDS
3335

3436
Generate:
3537
```
3638
$ npm run generate
3739
```
38-
- Generates unique images based on the layers in the `layers` folder.
39-
- WARNING: This command deletes the `build` folder if it exists!
40+
- Generates unique images based on the layers in the `/backend/layers` folder.
41+
- WARNING: This command deletes the `/backend/build` folder if it exists!
4042

4143
Rarity (Hashlips):
4244
```
@@ -70,28 +72,28 @@ Create Generic Metadata:
7072
$ npm run create_generic
7173
```
7274

73-
- Creates generic metadata using the settings from the `src/config.js` file.
75+
- Creates generic metadata using the settings from the `/backend/src/config.js` file.
7476

7577
Upload Files/Images:
7678
```
7779
$ npm run upload_files
7880
```
7981

80-
- Uploads all files in the `build/images` folder.
82+
- Uploads all files in the `/backend/build/images` folder.
8183

8284
Upload Metadata:
8385
```
8486
$ npm run upload_metadata
8587
```
8688

87-
- Uploads all `.json` files in both the `build/json` folder and, if it exists, the `build/genericJson` folder as well.
89+
- Uploads all `.json` files in both the `/backend/build/json` folder and, if it exists, the `/backend/build/genericJson` folder as well.
8890

8991
Deploy Contract:
9092
```
9193
$ npm run deploy_contract
9294
```
9395

94-
- Deploys a contract to the blockchain using the settings from the `src/config.js` file.
96+
- Deploys a contract to the blockchain using the settings from the `/backend/src/config.js` file.
9597

9698
Get Contract:
9799
```
@@ -100,36 +102,28 @@ $ npm run get_contract
100102

101103
- Gets the deployed contract details using the transactions hash from the Deploy Contract command.
102104

103-
Mint:
104-
```
105-
$ npm run mint
106-
```
107-
108-
- Running this command with no flags will mint all NFTs
109-
- `--start=1`
110-
- The start flag indicates the edition number to start minting from.
111-
- `--end=100`
112-
- The end flag indicates the edition number to stop at.
113-
- To start at a number and continue minting all, do not include the end flag.
114-
- Make both flags the same number to only mint a single NFT.
115-
- NOTE: The start and end numbers are inclusive.
116-
117-
Reveal:
118-
```
119-
$ npm run reveal
120-
```
121-
122-
- Checks the contract owners wallet to see which NFTs have sold and reveals all sold NFTs.
123-
- Including the `--start=1` and/or `--end=100` flags will reveal only the specified edition or range of editions.
124-
- Make both flags the same number to only reveal a single NFT.
125-
126-
Check Transactions:
127-
```
128-
$ npm run check_txns --dir=minted
129-
```
130-
131-
- Verifies the success of mint or reveal transactions.
132-
- The `--dir` flag is required. Accepted values are `minted` or `revealed`.
105+
Update Contract:
106+
```
107+
$ npm run update_public_mint_start_date
108+
$ npm run update_presale_mint_start_date
109+
$ npm run update_presale_whitelisted_addresses
110+
$ npm run update_presale_whitelisted_addresses_remove
111+
$ npm run update_royalty_share
112+
$ npm run update_royalty_address
113+
$ npm run update_base_uri
114+
$ npm run update_prereveal_token_uri
115+
```
116+
117+
- Updates specific fields of the contract using the settings from the `/backend/src/config.js` file.
118+
- Available fields to update:
119+
- `prereveal_token_uri` - This will update the pre-reveal token uri for all NFTs. (Hidden image)
120+
- `base_uri` - This will update the base uri for all NFTs and reveal all.
121+
- `public_mint_start_date` - Eg: 2022-02-08T11:30:48+00:00
122+
- `presale_mint_start_date` - Eg: 2022-02-08T11:30:48+00:00
123+
- `presale_whitelisted_addresses` - Adds address(es) to the whitelist
124+
- `presale_whitelisted_addresses_remove` - Removes address(es) from the whitelist
125+
- `royalties_share` - Updates the royalty share
126+
- `royalties_address` - Updates the royalty wallet address
133127

134128
Refresh OpenSea:
135129
```
@@ -139,4 +133,4 @@ $ npm run refresh_os --start=1 --end=100
139133
- Refreshes the listing for the specified editions on OpenSea.
140134
- Both the `--start` and `--end` flags are required.
141135

142-
## Reference the [video](https://youtu.be/quGdJweadFM) for more details.
136+
## Reference the [video]() for more details.

backend/.env.expample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NFTPORT_API_KEY=

backend/package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,32 @@
1818
"rarity_md": "node utils/functions/getRarity_fromMetadata",
1919
"rarity_rank": "node utils/functions/rarity_rank.js",
2020
"preview": "node utils/preview.js",
21-
"update_contract": "node utils/nftport/updateContract.js %npm_config_u%",
2221
"pixelate": "node utils/pixelate.js",
2322
"update_info": "node utils/update_info.js",
2423
"preview_gif": "node utils/preview_gif.js",
2524
"create_generic": "node utils/nftport/genericMetas",
2625
"upload_files": "node utils/nftport/uploadFiles",
2726
"upload_metadata": "node utils/nftport/uploadMetas",
2827
"deploy_contract": "node utils/nftport/deployContract",
29-
"get_contract": "node utils/nftport/retrieveContract"
28+
"get_contract": "node utils/nftport/retrieveContract",
29+
"update_public_mint_start_date": "node utils/nftport/updateContract.js -u public_mint_start_date",
30+
"update_presale_mint_start_date": "node utils/nftport/updateContract.js -u presale_mint_start_date",
31+
"update_presale_whitelisted_addresses": "node utils/nftport/updateContract.js -u presale_whitelisted_addresses",
32+
"update_presale_whitelisted_addresses_remove": "node utils/nftport/updateContract.js -u presale_whitelisted_addresses_remove",
33+
"update_royalty_share": "node utils/nftport/updateContract.js -u royalty_share",
34+
"update_royalty_address": "node utils/nftport/updateContract.js -u royalty_address",
35+
"update_base_uri": "node utils/nftport/updateContract.js -u base_uri",
36+
"update_prereveal_token_uri": "node utils/nftport/updateContract.js -u prereveal_token_uri",
37+
"⏬⏬⏬": "FOR MAC USERS: Replace %npm_config_xyz% with $npm_config_start ⏬⏬⏬",
38+
"refresh_os": "node utils/functions/refreshOpensea %npm_config_start% %npm_config_end%"
3039
},
3140
"author": "Jesse Hall (codeSTACKr)",
3241
"license": "MIT",
3342
"dependencies": {
3443
"async-sema": "^3.1.1",
3544
"canvas": "^2.8.0",
45+
"commander": "^9.0.0",
46+
"dotenv": "^16.0.0",
3647
"form-data": "^4.0.0",
3748
"gif-encoder-2": "^1.0.5",
3849
"node-fetch": "^2.6.6",

backend/src/config.js

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require('dotenv').config();
12
const basePath = process.cwd();
23
const fs = require("fs");
34
const { MODE } = require(`${basePath}/constants/blend_mode.js`);
@@ -6,80 +7,85 @@ const { NETWORK } = require(`${basePath}/constants/network.js`);
67
const network = NETWORK.eth;
78

89
// General metadata for Ethereum
9-
const namePrefix = "testSTACKr Collection";
10-
// const namePrefix = "YOUR COLLECTION NAME";
11-
const description = "Test collection description";
12-
// const description = "Remember to replace this description";
10+
const namePrefix = "cbirdz.xyz";
11+
const description = "This is a cool bird project";
1312
const baseUri = "ipfs://NewUriToReplace"; // This will be replaced automatically
1413

1514
// If you have selected Solana then the collection starts from 0 automatically
1615
const layerConfigurations = [
1716
{
18-
growEditionSizeTo: 5,
17+
growEditionSizeTo: 10,
1918
layersOrder: [
2019
{ name: "Background" },
21-
{ name: "Eyeball" },
22-
{ name: "Eye color" },
23-
{ name: "Iris" },
24-
{ name: "Shine" },
25-
{ name: "Bottom lid" },
26-
{ name: "Top lid" },
20+
{ name: "Cleo Body" },
21+
{ name: "Cleo Base" },
22+
{ name: "Cleo Eyes" },
23+
{ name: "Cleo Beak" },
24+
{ name: "Cleo Symbol" },
25+
],
26+
},{
27+
growEditionSizeTo: 20,
28+
layersOrder: [
29+
{ name: "Background" },
30+
{ name: "Cletus Body" },
31+
{ name: "Cletus Base" },
32+
{ name: "Cletus Eyes" },
33+
{ name: "Cletus Beak" },
34+
{ name: "Cletus Symbol" },
2735
],
2836
},
2937
];
3038

31-
const shuffleLayerConfigurations = false;
39+
const shuffleLayerConfigurations = true;
3240

3341
const debugLogs = false;
3442

3543
const format = {
36-
width: 512,
37-
height: 512,
44+
width: 3000,
45+
height: 3000,
3846
smoothing: false,
3947
};
4048

4149
const extraMetadata = {
42-
external_url: "https://codecats.xyz", // Replace with your website or remove this line if you do not have one.
50+
external_url: "https://cbirdz.xyz", // Replace with your website or remove this line if you do not have one.
4351
};
4452

4553
// NFTPort Info
4654

4755
// ** REQUIRED **
48-
const AUTH = "cd604374-c889-404a-b6e7-cdb0dcb1e892";
49-
// const AUTH = "YOUR API KEY HERE";
56+
const AUTH = process.env.NFTPORT_API_KEY; // Set this in the .env file to prevent exposing your API key when pushing to Github
5057
const LIMIT = 2; // Your API key rate limit
5158
const CHAIN = 'rinkeby'; // only rinkeby or polygon
52-
const CONTRACT_NAME = 'testSTACKr Collection';
53-
const CONTRACT_SYMBOL = 'TSC';
59+
60+
// REQUIRED CONTRACT DETAILS THAT CANNOT BE UPDATED LATER!
61+
const CONTRACT_NAME = 'cbirdz.xyz';
62+
const CONTRACT_SYMBOL = 'CBZ';
5463
const METADATA_UPDATABLE = true; // set to false if you don't want to allow metadata updates after minting
5564
const OWNER_ADDRESS = '0xd8B808A887326F45B2D0cd999709Aa6264CeF919';
56-
// const OWNER_ADDRESS = 'YOUR WALLET ADDRESS HERE';
5765
const TREASURY_ADDRESS = '0xd8B808A887326F45B2D0cd999709Aa6264CeF919';
58-
// const TREASURY_ADDRESS = 'TREASURY WALLET ADDRESS HERE';
5966
const MAX_SUPPLY = 5000; // The maximum number of NFTs that can be minted. CANNOT BE UPDATED!
60-
const MINT_PRICE = .001; // Minting price per NFT. Rinkeby = ETH, Polygon = MATIC. CANNOT BE UPDATED!
67+
const MINT_PRICE = 0.001; // Minting price per NFT. Rinkeby = ETH, Polygon = MATIC. CANNOT BE UPDATED!
6168
const TOKENS_PER_MINT = 10; // maximum number of NFTs a user can mint in a single transaction. CANNOT BE UPDATED!
62-
const PUBLIC_MINT_START_DATE = "2022-03-15T11:30:48+00:00"; // This is required. Eg: 2022-02-08T11:30:48+00:00
63-
const PRESALE_MINT_START_DATE = "2022-03-15T10:30:48+00:00"; // delete
64-
// const PRESALE_MINT_START_DATE = null; // Optional. Eg: 2022-02-08T11:30:48+00:00
69+
70+
// REQUIRED CONTRACT DETAILS THAT CAN BE UPDATED LATER.
71+
const PUBLIC_MINT_START_DATE = "2022-03-20T11:30:48+00:00"; // This is required. Eg: 2022-02-08T11:30:48+00:00
72+
73+
// OPTIONAL CONTRACT DETAILS THAT CAN BE UPDATED LATER.
74+
const PRESALE_MINT_START_DATE = null; // Optional. Eg: 2022-02-08T11:30:48+00:00
6575
const ROYALTY_SHARE = 1000; // Percentage of the token price that goes to the royalty address. 100 bps = 1%
6676
const ROYALTY_ADDRESS = "0xd8B808A887326F45B2D0cd999709Aa6264CeF919"; // Address that will receive the royalty
6777
const BASE_URI = null; // only update if you want to manually set the base uri
6878
const PREREVEAL_TOKEN_URI = null; // only update if you want to manually set the prereveal token uri
69-
const PRESALE_WHITELISTED_ADDRESSES = ['0xB7422Da1890Ce24309b4670792a1D5E5A6D32F38',"0xd8B808A887326F45B2D0cd999709Aa6264CeF919"]; // only update if you want to manually set the whitelisted addresses
79+
const PRESALE_WHITELISTED_ADDRESSES = []; // only update if you want to manually set the whitelisted addresses
7080

7181
// ** OPTIONAL **
7282
let CONTRACT_ADDRESS = "YOUR CONTRACT ADDRESS"; // If you want to manually include it
83+
7384
// Generic Metadata is optional if you want to reveal your NFTs
7485
const GENERIC = true; // Set to true if you want to upload generic metas and reveal the real NFTs in the future
75-
// const GENERIC = false; // Set to true if you want to upload generic metas and reveal the real NFTs in the future
7686
const GENERIC_TITLE = CONTRACT_NAME; // Replace with what you want the generic titles to say if you want it to be different from the contract name.
77-
const GENERIC_DESCRIPTION = "Unknown"; // Replace with what you want the generic descriptions to say.
78-
const GENERIC_IMAGE = "https://ipfs.io/ipfs/QmUf9tDbkqnfHkQaMdFWSGAeXwVXWA61pFED7ypx4hcsfh"; // Replace with your generic image that will display for all NFTs pre-reveal.
79-
80-
81-
// const REVEAL_PROMPT = true; // Set to false if you want to disable the prompt to confirm each reveal.
82-
// const INTERVAL = 900000; // Milliseconds. This is the interval for it to check for sales and reveal the NFT. 900000 = 15 minutes.
87+
const GENERIC_DESCRIPTION = "Which bird will you get?"; // Replace with what you want the generic descriptions to say.
88+
const GENERIC_IMAGE = "https://ipfs.io/ipfs/bafybeihdunsq6cggufg2rsypxagv4llnih3skciprxhl2gfeufelgwmhpm"; // Replace with your generic image that will display for all NFTs pre-reveal.
8389

8490
// Automatically set contract address if deployed using the deployContract.js script
8591
try {

backend/utils/functions/fetchWithRetry.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ function fetchNoRetry(url, options) {
2525
})
2626
.catch((error) => {
2727
console.error(`CATCH ERROR: ${error}`);
28-
console.log("Retrying");
29-
fetch_retry();
3028
});
3129
});
3230
}

0 commit comments

Comments
 (0)