Skip to content

Commit

Permalink
Final edits for 2.0, added royalty code
Browse files Browse the repository at this point in the history
  • Loading branch information
codeSTACKr committed Mar 10, 2022
1 parent 93fb85b commit 280c2b3
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 13 deletions.
138 changes: 133 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Source Code from "How To Create An ENTIRE NFT Collection (10,000+) & MINT In Under 1 Hour Without Coding Knowledge"
# Create An ENTIRE NFT Collection (10,000+) & MINT

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

Video 2: [How To List & Reveal An ENTIRE NFT Collection (10,000+) Without Coding Knowledge on OpenSea](https://youtu.be/Iy1n_LxUwZs)
- [RESOURCES](#resources)
- [COMMANDS](#commands)
- [UPDATES & FIXES](#updates--fixes)

## RESOURCES

Original Video:

👴 [How To Create An ENTIRE NFT Collection (10,000+) & MINT In Under 1 Hour Without Coding Knowledge](https://youtu.be/AaCgydeMu64)

(WATCH THIS ONE!) Updated video for v2.0.0 release:

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

How to automate listing for sale on OpenSea:

💰 [How To List & Reveal An ENTIRE NFT Collection (10,000+) Without Coding Knowledge on OpenSea](https://youtu.be/Iy1n_LxUwZs)

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

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

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

The macro script from the second video: [macro1.mmmacro](macro1.mmmacro)
The macro script from the "listing for sale" video: [macro1.mmmacro](macro1.mmmacro)

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

## COMMANDS

Generate:
```
$ npm run generate
```
- Generates unique images based on the layers in the `layers` folder.
- WARNING: This command deletes the `build` folder if it exists!

Rarity (Hashlips):
```
$ npm run rarity
```
- Calculates the rarity of NFT properties based on layer files.

Rarity (codeSTACKr):
```
$ npm run rarity_md
```

- Calculates the rarity of NFT properties based on metadata.

Rarity Rank (codeSTACKr):
```
$ npm run rarity_rank
```

- Provides ranking details through a user interface after calculating using the codeSTACKr Rarity command.

Update Info:
```
$ npm run update_info
```

- Allows you to update `namePrefix`, `description`, and/or `baseUri` for metadata after it was already generated.

Create Generic Metadata:
```
$ npm run create_generic
```

- Creates generic metadata using the settings from the `src/config.js` file.

Upload Files/Images:
```
$ npm run upload_files
```

- Uploads all files in the `build/images` folder.

Upload Metadata:
```
$ npm run upload_metadata
```

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

Deploy Contract:
```
$ npm run deploy_contract
```

- Deploys a contract to the blockchain using the settings from the `src/config.js` file.

Get Contract:
```
$ npm run get_contract
```

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

Mint:
```
$ npm run mint
```

- Running this command with no flags will mint all NFTs
- `--start=1`
- The start flag indicates the edition number to start minting from.
- `--end=100`
- The end flag indicates the edition number to stop at.
- To start at a number and continue minting all, do not include the end flag.
- Make both flags the same number to only mint a single NFT.
- NOTE: The start and end numbers are inclusive.

Reveal:
```
$ npm run reveal
```

- Checks the contract owners wallet to see which NFTs have sold and reveals all sold NFTs.
- Including the `--start=1` and/or `--end=100` flags will reveal only the specified edition or range of editions.
- Make both flags the same number to only reveal a single NFT.

Check Transactions:
```
$ npm run check_txns --dir=minted
```

- Verifies the success of mint or reveal transactions.
- The `--dir` flag is required. Accepted values are `minted` or `revealed`.

Refresh OpenSea:
```
$ npm run refresh_os --start=1 --end=100
```

- Refreshes the listing for the specified editions on OpenSea.
- Both the `--start` and `--end` flags are required.

## UPDATES & FIXES

### npm not recognized

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.

For Mac M1 users, see this issue for more details: [Hashlips Art Engine - Issue 812](https://github.com/HashLips/hashlips_art_engine/issues/812)

### Images not lining up

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.
Expand Down Expand Up @@ -62,4 +190,4 @@ If you've reached your quota limit, contact NFTPort to upgrade your plan to get
- Copy your image layers into the `layers` folder.
- Use the `src/config.js` file to set up your layers and NFT information.

## Reference the [video](https://youtu.be/AaCgydeMu64) for more details. All commands to upload and mint are the same.
## Reference the [video](https://youtu.be/quGdJweadFM) for more details.
22 changes: 15 additions & 7 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const baseUri = "ipfs://NewUriToReplace"; // This will be replaced automatically
// If you have selected Solana then the collection starts from 0 automatically
const layerConfigurations = [
{
growEditionSizeTo: 50,
growEditionSizeTo: 5,
layersOrder: [
{ name: "Background" },
{ name: "Eyeball" },
Expand Down Expand Up @@ -42,27 +42,33 @@ const extraMetadata = {

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

// Automatically set contract address if deployed using the deployContract.js script
try {
const rawContractData = fs.readFileSync(`${basePath}/build/contract/_contract.json`);
const rawContractData = fs.readFileSync(
`${basePath}/build/contract/_contract.json`
);
const contractData = JSON.parse(rawContractData);
if (contractData.response === "OK" && contractData.error === null) {
CONTRACT_ADDRESS = contractData.contract_address;
Expand Down Expand Up @@ -169,4 +175,6 @@ module.exports = {
CONTRACT_TYPE,
REVEAL_PROMPT,
METADATA_UPDATABLE,
ROYALTY_SHARE,
ROYALTY_ADDRESS,
};
6 changes: 5 additions & 1 deletion utils/nftport/deployContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const {
CONTRACT_TYPE,
MINT_TO_ADDRESS,
METADATA_UPDATABLE,
ROYALTY_SHARE,
ROYALTY_ADDRESS,
} = require(`${basePath}/src/config.js`);

const deployContract = async () => {
Expand All @@ -38,7 +40,9 @@ const deployContract = async () => {
symbol: CONTRACT_SYMBOL,
owner_address: MINT_TO_ADDRESS,
type: CONTRACT_TYPE,
metadata_updatable: METADATA_UPDATABLE
metadata_updatable: METADATA_UPDATABLE,
royalties_share: ROYALTY_SHARE,
royalties_address: ROYALTY_ADDRESS,
};
const options = {
method: "POST",
Expand Down

0 comments on commit 280c2b3

Please sign in to comment.