Skip to content

Commit 280c2b3

Browse files
committed
Final edits for 2.0, added royalty code
1 parent 93fb85b commit 280c2b3

File tree

3 files changed

+153
-13
lines changed

3 files changed

+153
-13
lines changed

README.md

Lines changed: 133 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
# Source Code from "How To Create An ENTIRE NFT Collection (10,000+) & MINT In Under 1 Hour Without Coding Knowledge"
1+
# Create An ENTIRE NFT Collection (10,000+) & MINT
22

3-
Video 1: [How To Create An ENTIRE NFT Collection (10,000+) & MINT In Under 1 Hour Without Coding Knowledge](https://youtu.be/AaCgydeMu64)
3+
## Table of Contents
44

5-
Video 2: [How To List & Reveal An ENTIRE NFT Collection (10,000+) Without Coding Knowledge on OpenSea](https://youtu.be/Iy1n_LxUwZs)
5+
- [RESOURCES](#resources)
6+
- [COMMANDS](#commands)
7+
- [UPDATES & FIXES](#updates--fixes)
8+
9+
## RESOURCES
10+
11+
Original Video:
12+
13+
👴 [How To Create An ENTIRE NFT Collection (10,000+) & MINT In Under 1 Hour Without Coding Knowledge](https://youtu.be/AaCgydeMu64)
14+
15+
(WATCH THIS ONE!) Updated video for v2.0.0 release:
16+
17+
🌟 [How To Create An ENTIRE NFT Collection (10,000+) & MINT with ZERO Coding Knowledge v2.0](https://youtu.be/quGdJweadFM)
18+
19+
How to automate listing for sale on OpenSea:
20+
21+
💰 [How To List & Reveal An ENTIRE NFT Collection (10,000+) Without Coding Knowledge on OpenSea](https://youtu.be/Iy1n_LxUwZs)
622

723
Original video code: [v0.1.0-alpha](https://github.com/codeSTACKr/video-source-code-create-nft-collection/releases/tag/v0.1.0-alpha)
824

@@ -12,16 +28,128 @@ Minting uses [NFTPort](https://nftport.xyz)
1228

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

15-
The macro script from the second video: [macro1.mmmacro](macro1.mmmacro)
31+
The macro script from the "listing for sale" video: [macro1.mmmacro](macro1.mmmacro)
1632

1733
UPDATE: Added rarity calculator. See this [video](https://youtu.be/Uz1y4j9gvP8) for the walkthrough.
1834

35+
## COMMANDS
36+
37+
Generate:
38+
```
39+
$ npm run generate
40+
```
41+
- Generates unique images based on the layers in the `layers` folder.
42+
- WARNING: This command deletes the `build` folder if it exists!
43+
44+
Rarity (Hashlips):
45+
```
46+
$ npm run rarity
47+
```
48+
- Calculates the rarity of NFT properties based on layer files.
49+
50+
Rarity (codeSTACKr):
51+
```
52+
$ npm run rarity_md
53+
```
54+
55+
- Calculates the rarity of NFT properties based on metadata.
56+
57+
Rarity Rank (codeSTACKr):
58+
```
59+
$ npm run rarity_rank
60+
```
61+
62+
- Provides ranking details through a user interface after calculating using the codeSTACKr Rarity command.
63+
64+
Update Info:
65+
```
66+
$ npm run update_info
67+
```
68+
69+
- Allows you to update `namePrefix`, `description`, and/or `baseUri` for metadata after it was already generated.
70+
71+
Create Generic Metadata:
72+
```
73+
$ npm run create_generic
74+
```
75+
76+
- Creates generic metadata using the settings from the `src/config.js` file.
77+
78+
Upload Files/Images:
79+
```
80+
$ npm run upload_files
81+
```
82+
83+
- Uploads all files in the `build/images` folder.
84+
85+
Upload Metadata:
86+
```
87+
$ npm run upload_metadata
88+
```
89+
90+
- Uploads all `.json` files in both the `build/json` folder and, if it exists, the `build/genericJson` folder as well.
91+
92+
Deploy Contract:
93+
```
94+
$ npm run deploy_contract
95+
```
96+
97+
- Deploys a contract to the blockchain using the settings from the `src/config.js` file.
98+
99+
Get Contract:
100+
```
101+
$ npm run get_contract
102+
```
103+
104+
- Gets the deployed contract details using the transactions hash from the Deploy Contract command.
105+
106+
Mint:
107+
```
108+
$ npm run mint
109+
```
110+
111+
- Running this command with no flags will mint all NFTs
112+
- `--start=1`
113+
- The start flag indicates the edition number to start minting from.
114+
- `--end=100`
115+
- The end flag indicates the edition number to stop at.
116+
- To start at a number and continue minting all, do not include the end flag.
117+
- Make both flags the same number to only mint a single NFT.
118+
- NOTE: The start and end numbers are inclusive.
119+
120+
Reveal:
121+
```
122+
$ npm run reveal
123+
```
124+
125+
- Checks the contract owners wallet to see which NFTs have sold and reveals all sold NFTs.
126+
- Including the `--start=1` and/or `--end=100` flags will reveal only the specified edition or range of editions.
127+
- Make both flags the same number to only reveal a single NFT.
128+
129+
Check Transactions:
130+
```
131+
$ npm run check_txns --dir=minted
132+
```
133+
134+
- Verifies the success of mint or reveal transactions.
135+
- The `--dir` flag is required. Accepted values are `minted` or `revealed`.
136+
137+
Refresh OpenSea:
138+
```
139+
$ npm run refresh_os --start=1 --end=100
140+
```
141+
142+
- Refreshes the listing for the specified editions on OpenSea.
143+
- Both the `--start` and `--end` flags are required.
144+
19145
## UPDATES & FIXES
20146

21147
### npm not recognized
22148

23149
You have not installed [node.js](https://nodejs.org) properly (* and or if you're using a M1 on macs you'll need to downgrade your current version of node.js to v14 for it to work*). Be sure to follow the installation instructions from their download page for your specific operating system. And restart your computer after installation.
24150

151+
For Mac M1 users, see this issue for more details: [Hashlips Art Engine - Issue 812](https://github.com/HashLips/hashlips_art_engine/issues/812)
152+
25153
### Images not lining up
26154

27155
Be sure that every layer is the same size. If you want the resulting image to be 512x512, then each layer needs to be 512x512. This will ensure that everything lines up properly.
@@ -62,4 +190,4 @@ If you've reached your quota limit, contact NFTPort to upgrade your plan to get
62190
- Copy your image layers into the `layers` folder.
63191
- Use the `src/config.js` file to set up your layers and NFT information.
64192

65-
## Reference the [video](https://youtu.be/AaCgydeMu64) for more details. All commands to upload and mint are the same.
193+
## Reference the [video](https://youtu.be/quGdJweadFM) for more details.

src/config.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const baseUri = "ipfs://NewUriToReplace"; // This will be replaced automatically
1313
// If you have selected Solana then the collection starts from 0 automatically
1414
const layerConfigurations = [
1515
{
16-
growEditionSizeTo: 50,
16+
growEditionSizeTo: 5,
1717
layersOrder: [
1818
{ name: "Background" },
1919
{ name: "Eyeball" },
@@ -42,27 +42,33 @@ const extraMetadata = {
4242

4343
// NFTPort Info
4444
// ** REQUIRED **
45-
const AUTH = 'YOUR API KEY HERE';
45+
const AUTH = "YOUR API KEY HERE";
4646
const LIMIT = 2; // Your API key rate limit
4747
const CONTRACT_NAME = 'CRYPTOPUNKS';
4848
const CONTRACT_SYMBOL = 'CP';
4949
const CONTRACT_TYPE = 'erc721';
5050
const MINT_TO_ADDRESS = 'YOUR WALLET ADDRESS HERE';
5151
const CHAIN = 'rinkeby';
5252
const METADATA_UPDATABLE = true; // set to false if you don't want to allow metadata updates after minting
53+
const ROYALTY_SHARE = 1000; // Percentage of the token price that goes to the royalty address. 100 bps = 1%
54+
const ROYALTY_ADDRESS = "0xd8B808A887326F45B2D0cd999709Aa6264CeF919"; // Address that will receive the royalty
5355
// ** OPTIONAL **
54-
let CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS'; // If you want to manually include it
56+
let CONTRACT_ADDRESS = "YOUR CONTRACT ADDRESS"; // If you want to manually include it
5557
// Generic Metadata is optional if you want to reveal your NFTs
5658
const GENERIC = false; // Set to true if you want to upload generic metas and reveal the real NFTs in the future
57-
const GENERIC_TITLE = "Unknown" // Replace with what you want the generic titles to say.
58-
const GENERIC_DESCRIPTION = "Unknown" // Replace with what you want the generic descriptions to say.
59-
const GENERIC_IMAGE = ["https://ipfs.io/ipfs/QmUf9tDbkqnfHkQaMdFWSGAeXwVXWA61pFED7ypx4hcsfh"] // Replace with your generic image(s). If multiple, separate with a comma.
59+
const GENERIC_TITLE = "Unknown"; // Replace with what you want the generic titles to say.
60+
const GENERIC_DESCRIPTION = "Unknown"; // Replace with what you want the generic descriptions to say.
61+
const GENERIC_IMAGE = [
62+
"https://ipfs.io/ipfs/QmUf9tDbkqnfHkQaMdFWSGAeXwVXWA61pFED7ypx4hcsfh",
63+
]; // Replace with your generic image(s). If multiple, separate with a comma.
6064
const REVEAL_PROMPT = true; // Set to false if you want to disable the prompt to confirm each reveal.
6165
const INTERVAL = 900000; // Milliseconds. This is the interval for it to check for sales and reveal the NFT. 900000 = 15 minutes.
6266

6367
// Automatically set contract address if deployed using the deployContract.js script
6468
try {
65-
const rawContractData = fs.readFileSync(`${basePath}/build/contract/_contract.json`);
69+
const rawContractData = fs.readFileSync(
70+
`${basePath}/build/contract/_contract.json`
71+
);
6672
const contractData = JSON.parse(rawContractData);
6773
if (contractData.response === "OK" && contractData.error === null) {
6874
CONTRACT_ADDRESS = contractData.contract_address;
@@ -169,4 +175,6 @@ module.exports = {
169175
CONTRACT_TYPE,
170176
REVEAL_PROMPT,
171177
METADATA_UPDATABLE,
178+
ROYALTY_SHARE,
179+
ROYALTY_ADDRESS,
172180
};

utils/nftport/deployContract.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const {
1313
CONTRACT_TYPE,
1414
MINT_TO_ADDRESS,
1515
METADATA_UPDATABLE,
16+
ROYALTY_SHARE,
17+
ROYALTY_ADDRESS,
1618
} = require(`${basePath}/src/config.js`);
1719

1820
const deployContract = async () => {
@@ -38,7 +40,9 @@ const deployContract = async () => {
3840
symbol: CONTRACT_SYMBOL,
3941
owner_address: MINT_TO_ADDRESS,
4042
type: CONTRACT_TYPE,
41-
metadata_updatable: METADATA_UPDATABLE
43+
metadata_updatable: METADATA_UPDATABLE,
44+
royalties_share: ROYALTY_SHARE,
45+
royalties_address: ROYALTY_ADDRESS,
4246
};
4347
const options = {
4448
method: "POST",

0 commit comments

Comments
 (0)