Giter Site home page Giter Site logo

minter-dapp's Introduction

Minting DAPP

Table of Contents

RESOURCES

Main Video

🌟 EASY Minting dApp | Whitelisting | Entire Process!! Create an Entire NFT Collection (10,000+)

Update Video adding Ethereum support!

πŸš€ How To Deploy a Smart Contract to Ethereum!! (Updated Minting dApp)

Base art generator code is from hashlips_art_engine

Contract uses NFTPort

Join the Discord server for more help from the community: codeSTACKr Discord

INSTALLATION

Backend

  • Clone this repo or download the latest release zip file.
  • Unzip, if needed, and open the folder in VS Code.
  • From the terminal run:
 cd backend
 npm install
  • Copy your image layers into the /backend/layers folder.
  • Use the /backend/src/config.js file to set up your layers and NFT information.

Backend Commands

Generate:

$ npm run generate
  • Generates unique images based on the layers in the /backend/layers folder.
  • WARNING: This command deletes the /backend/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 /backend/src/config.js file.

Upload Files/Images:

$ npm run upload_files
  • Uploads all files in the /backend/build/images folder.

Upload Metadata:

$ npm run upload_metadata
  • Uploads all .json files in both the /backend/build/json folder and, if it exists, the /backend/build/genericJson folder as well.

Deploy Contract:

$ npm run deploy_contract
  • Deploys a contract to the blockchain using the settings from the /backend/src/config.js file.

Get Contract:

$ npm run get_contract
  • Gets the deployed contract details including the contracts ABI using the transactions hash from the Deploy Contract command.

Update Contract:

$ npm run update_public_mint_start_date
$ npm run update_presale_mint_start_date
$ npm run update_presale_whitelisted_addresses
$ npm run update_presale_whitelisted_addresses_remove
$ npm run update_royalty_share
$ npm run update_royalty_address
$ npm run update_base_uri
$ npm run update_prereveal_token_uri
  • Updates specific fields of the contract using the settings from the /backend/src/config.js file.
  • Available fields to update:
    • prereveal_token_uri - This will update the pre-reveal token uri for all NFTs. (Hidden image)
    • base_uri - This will update the base uri for all NFTs and reveal all.
    • public_mint_start_date - Eg: 2022-02-08T11:30:48+00:00
    • presale_mint_start_date - Eg: 2022-02-08T11:30:48+00:00
    • presale_whitelisted_addresses - Adds address(es) to the whitelist
    • presale_whitelisted_addresses_remove - Removes address(es) from the whitelist
    • royalties_share - Updates the royalty share
    • royalties_address - Updates the royalty wallet address

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.

Frontend

  • Update the frontend/js/abi.js file with the ABI from backend/build/contract/_contract_abi.json.
  • Update your information in the frontend/js/constants.js file.
  • Deploy your dApp to Netlify. (Reference the video for full instructions.)

Reference the main video and update video for more details.

minter-dapp's People

Contributors

codestackr avatar kristjanpeterson1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minter-dapp's Issues

npm run upload_files gets stuck/paused part way thru...

Hello, i have successfully followed the steps to generate images and prep the consig.js file, and have generated 2500 images, but when running "npm run upload_files" it gets stuck/paused at #335...thoughts? greatly appreciated! the video has been very clear and helpful...

image

Unable to deploy at the frontend.

Hi there; I am unable to deploy to the website. Changes like the sidebar, colors aren't being reflected in the site. I am also unable to connect MetaMask, a connection gif just keeps scolling. I think I have been accurate in following your instructions but I did notice 2 things: right at the beginning in source control I didnt have the feature to clone so used the zip. folder for minter.dapp in my hashlips folder and executed from there;
image and I havent had the option to synch in source control though I can commit; my option is always publish branch:
image

image

[Bug]: getting error 400 while trying to run "npm run deploy_contract"

Version

  • Yes

General Question

  • No

What happened?

keep getting error 400

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

> [email protected] deploy_contract
> node utils/nftport/deployContract
Is all REQUIRED contract information correct in config.js? (y/n): y
CATCH ERROR: ERROR STATUS: 400

Protect your information

  • I Agree

[Bug]: CATCH ERROR: NOK: Contract is frozen

Version

  • Yes

General Question

  • No

What happened?

Really appreciate your effort with this video and repo. I Followed through all the steps from your YT video till "31:05 - Commands to Update the Contract after Deployment". After running the any update command I received this error
CATCH ERROR: NOK: Contract is frozen
I have tried to deploy new contract with rinkeby few times but got this error every time
I was on Rinkeby testnet. My fork is https://github.com/HV786/minter-dapp

I checked the YT comment section there were some people also facing this issue. please look into it and suggest the necessary steps to fix this. Thanks

What have you tried?

I joint your discord but am not allowed to send messages. that is why I commented on your YT video and in search of help for the past 2 hours, now I found reporting issue option here.

Relevant log output

No response

Protect your information

  • I Agree

504 Gateways timeout in medata ipfs urls

When I'm trying to update real metadata after presale.
Metadata and real images doesn't updated .
And when i Visit ipfs metadata url it shows 504 gateway timeout.
IMG_20220404_195952

[Bug]:

Version

  • Yes

General Question

  • No

What happened?

Here is what I have done:

Fork and copy address
open my visual code studio
cd backend
npm i
then when I try to "npm run generate", I got this issue:

PS C:\Users\win、10\minter-dapp\minter-dapp\backend> npm run generate

[email protected] generate
node index.js

C:\Users\win、10\minter-dapp\minter-dapp\backend\node_modules\canvas\lib\image.js:91
SetSource.call(img, src)
^

Error: EILSEQ, Illegal byte sequence 'C:\Users\win、10\minter-dapp\minter-dapp\backend/layers/Background/Orange.png'
at setSource (C:\Users\win、10\minter-dapp\minter-dapp\backend\node_modules\canvas\lib\image.js:91:13)
at Image.set (C:\Users\win、10\minter-dapp\minter-dapp\backend\node_modules\canvas\lib\image.js:62:9)
at C:\Users\win、10\minter-dapp\minter-dapp\backend\node_modules\canvas\index.js:34:15
at new Promise ()
at loadImage (C:\Users\win、10\minter-dapp\minter-dapp\backend\node_modules\canvas\index.js:23:10)
at C:\Users\win、10\minter-dapp\minter-dapp\backend\src\main.js:181:25
at new Promise ()
at loadLayerImg (C:\Users\win、10\minter-dapp\minter-dapp\backend\src\main.js:180:10)
at C:\Users\win、10\minter-dapp\minter-dapp\backend\src\main.js:361:31
at Array.forEach () {
errno: 42,
code: 'EILSEQ',
path: 'C:\Users\win、10\minter-dapp\minter-dapp\backend/layers/Background/Orange.png',
syscall: 'fopen'
}

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

Cannot use project

Little bit of context -- when I attempt to use the clone repository method to use this project the button in VSCode has no reaction so I can't actually paste the link to use it.

So I've downloaded and unzipped the folder and when I try to install and run I am return these messages:

Screen Shot 2022-03-23 at 1 07 27 AM

contract limit exceeded on rinkeby

Hi, this is what I get when I deploy the contract:

PS C:\Users\User\Documents\Erick\NFT\minter-dapp\backend> npm run deploy_contract

[email protected] deploy_contract
node utils/nftport/deployContract

Is all REQUIRED contract information correct in config.js? (y/n): y
CATCH ERROR: NOK: Contract limit exceeded on rinkeby

Any help would be wonderfull
Thanks

[Bug]:

Version

  • Yes

General Question

  • No

What happened?

Every time I try to update my public/presale mint start dates in my contract I get an errror 422 and when I research this issue it says the only way I can resolve this is by contacting the host/providor. So I'm looking forward to hearing back

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

CATCH ERROR: ERROR STATUS: 422

Protect your information

  • I Agree

[Bug]: Unsupported Image Type

Version

  • Yes

General Question

  • No

What happened?

Hi @codeSTACKr ,

And thank you for the amazing work so far!

I am facing a situation where the "run generate" command begins the procedure of creating the images but somewhere in the process, totally random, it stops with the following error:

Error: Unsupported image type
at setSource (C:\Users\User\Downloads\NFT\10k\node_modules\canvas\lib\image.js:91:13)
at Image.set (C:\Users\User\Downloads\NFT\10k\node_modules\canvas\lib\image.js:62:9)
at C:\Users\User\Downloads\NFT\10k\node_modules\canvas\index.js:34:15
at new Promise ()
at loadImage (C:\Users\User\Downloads\NFT\10k\node_modules\canvas\index.js:23:10)
at C:\Users\User\Downloads\NFT\10k\src\main.js:184:25
at new Promise ()
at loadLayerImg (C:\Users\User\Downloads\NFT\10k\src\main.js:183:10)
at C:\Users\User\Downloads\NFT\10k\src\main.js:364:31
at Array.forEach ()

What have you tried?

I have tried multiple times the procedure from the beginning and in different software versions and I always find this error. I have even created new layers just to test and still get that error. File and folder names are carefully named, no special characters at all. Only the hashtag for the rarity is used.

Relevant log output

No response

Protect your information

  • I Agree

Can't run NPM i

Version

  • Yes

General Question

  • No

What happened?

PS C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main> cd backend
PS C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend> node -v
v18.0.0
PS C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend> npm i
npm WARN deprecated [email protected]: Version no longer supported. Upgrade to @latest
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker\node_modules\puppeteer'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker\node_modules\puppeteer'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker\node_modules\puppeteer'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\puppeteer-extra-plugin-adblocker\node_modules\puppeteer'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release\canvas.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v108-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v108-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v108-win32-unknown-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:395:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release\canvas.node" "--module_name=canvas" "--module_path=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas
npm ERR! gyp ERR! node -v v18.0.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22000
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\node_modules\canvas
npm ERR! node-pre-gyp ERR! node -v v18.0.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Anthony Mitchell\AppData\Local\npm-cache_logs\2022-04-27T07_40_19_298Z-debug-0.log
PS C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend> npm run generate

[email protected] generate
node index.js

node:internal/modules/cjs/loader:942
throw err;
^

Error: Cannot find module 'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend/node_modules/sha1'
Require stack:

  • C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\src\main.js
  • C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
    at Module._load (node:internal/modules/cjs/loader:780:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\src\main.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Module._load (node:internal/modules/cjs/loader:827:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\src\main.js',
    'C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend\index.js'
    ]
    }

Node.js v18.0.0
PS C:\Users\Anthony Mitchell\Desktop\nftgen\minter-dapp-main\minter-dapp-main\backend>

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

unable to generate images

I have zero coding experience.

Getting an error when I try to generate,
PS D:\NFT\minter-dapp\backend> npm run generate

[email protected] generate
node index.js

(node:13604) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use node --trace-deprecation ... to show where the warning was created)
node:fs:1392
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, scandir 'D:\NFT\minter-dapp\backend/layers/Background/'
at Object.readdirSync (node:fs:1392:3)
at getElements (D:\NFT\minter-dapp\backend\src\main.js:73:6)
at D:\NFT\minter-dapp\backend\src\main.js:89:15
at Array.map ()
at startCreating (D:\NFT\minter-dapp\backend\src\main.js:349:20)
at D:\NFT\minter-dapp\backend\index.js:6:3
at Object. (D:\NFT\minter-dapp\backend\index.js:7:3)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: 'D:\NFT\minter-dapp\backend/layers/Background/'

Would appreciate any advice.

[Bug]: CATCH ERROR: ERROR STATUS: 404

Version

  • Yes

General Question

  • No

What happened?

When trying to update the presale mint date after confirming 'y' it comes up with CATCH ERROR: ERROR STATUS: 404 and not contract updated and ideas on how to fix?

What have you tried?

I Googled and asked the community in the discord server but could not find a solution..

Relevant log output

No response

Protect your information

  • I Agree

[Bug]: ERROR STATUS 502

Version

  • Yes

General Question

  • No

What happened?

A bug happened! It won't let me upload metadat
Screenshot (24)
a

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

npm run create_generic

HejdΓ₯! I get this error when running npm run create_generic I have node version 17.7.1 and npm version 8.5.2
`Error: Cannot find module 'dotenv'
Require stack:

  • C:\Users\joona\minter-dapp\backend\src\config.js
  • C:\Users\joona\minter-dapp\backend\utils\nftport\genericMetas.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\Users\joona\minter-dapp\backend\src\config.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\joona\minter-dapp\backend\src\config.js',
    'C:\Users\joona\minter-dapp\backend\utils\nftport\genericMetas.js'
    ]
    }`

"Minting failed. 😒 Please try again." message - How do I fix this?

Thank you very much to everyone who has responded to my previous issue posts.

My minting process keeps failing and I'm not sure why.

Chrome browser DevTools says:
"Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"

MetaMask says the transaction is still "pending".

Should I cancel my transaction in metamask?

I double-checked my minting contract address and it's correct, so I'm not sure what the problem is.
Do I need to change something to make the transactions go through?

CATCH ERROR: ERROR STATUS: 403 on npm run deploy_contract

Version

  • Yes

General Question

  • No

What happened?

I generate images, Json, ipfsMetas, ipfsMetasGeneric, genericJson and also updated config.js accordingly as per tutorial and all is good, but when I try to run deployContract.js script I get the following catch error. CATCH ERROR: ERROR STATUS: 403

I get the error right after confirming "y" prompt.

I see that the code runs ok inside the first try because I can see the log console.log(PREREVEAL_TOKEN_URI);

Code Below:

const basePath = process.cwd();
const fs = require("fs");
const yesno = require('yesno');

const {
  fetchNoRetry,
} = require(`${basePath}/utils/functions/fetchWithRetry.js`);
let {
  CHAIN,
  GENERIC,
  CONTRACT_NAME,
  CONTRACT_SYMBOL,
  METADATA_UPDATABLE,
  ROYALTY_SHARE,
  ROYALTY_ADDRESS,
  MAX_SUPPLY,
  MINT_PRICE,
  TOKENS_PER_MINT,
  OWNER_ADDRESS,
  TREASURY_ADDRESS,
  PUBLIC_MINT_START_DATE,
  BASE_URI,
  PREREVEAL_TOKEN_URI,
  PRESALE_MINT_START_DATE,
  PRESALE_WHITELISTED_ADDRESSES
} = require(`${basePath}/src/config.js`);

const deployContract = async () => {
  const ok = await yesno({
    question: `Is all REQUIRED contract information correct in config.js? (y/n):`,
    default: null,
  });

  if(!ok) {
    console.log("Exiting...");
    process.exit(0);
  }

  if(GENERIC) {
    try {
      let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetasGeneric/_ipfsMetasResponse.json`);
      let metaData = JSON.parse(jsonFile);
      if(metaData.response === "OK") {
        if(!PREREVEAL_TOKEN_URI) {
          PREREVEAL_TOKEN_URI = metaData.metadata_uri;
          console.log(PREREVEAL_TOKEN_URI);
        }
      } else {
        console.log('There is an issue with the metadata upload. Please check the /build/_ipfsMetasGeneric/_ipfsMetasResponse.json file for more information. Running "npm run upload_metadata" may fix this issue.');
      }
    } catch (err) {
      console.log(`/build/_ipfsMetasGeneric/_ipfsMetasResponse.json file not found. Run "npm run upload_metadata" first.`);
      console.log(`Catch: ${err}`);
      process.exit(0);
    }
  } else {
    try {
      let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetas/_ipfsMetasResponse.json`);
      let metaData = JSON.parse(jsonFile);
      console.log ("hello");
      if(metaData.response === "OK") {
        if(!BASE_URI) {
          BASE_URI = metaData.metadata_directory_ipfs_uri;
        }
      } else {
        console.log('There is an issue with the metadata upload. Please check the /build/_ipfsMetas/_ipfsMetasResponse.json file for more information. Running "npm run upload_metadata" may fix this issue.');
      }
    } catch (err) {
      console.log(`/build/_ipfsMetasGeneric/_ipfsMetasResponse.json file not found. Run "npm run upload_metadata" first.`);
      process.exit(0);
    }
  }

  if (!fs.existsSync(path.join(`${basePath}/build`, "/contract"))) {
    fs.mkdirSync(path.join(`${basePath}/build`, "contract"));
  }

  try {
    const url = `https://api.nftport.xyz/v0/contracts/collections`;
    const contract = {
      chain: CHAIN.toLowerCase(),
      name: CONTRACT_NAME,
      symbol: CONTRACT_SYMBOL,
      owner_address: OWNER_ADDRESS,
      metadata_updatable: METADATA_UPDATABLE,
      royalties_share: ROYALTY_SHARE,
      royalties_address: ROYALTY_ADDRESS,
      max_supply: MAX_SUPPLY,
      mint_price: MINT_PRICE,
      tokens_per_mint: TOKENS_PER_MINT,
      treasury_address: TREASURY_ADDRESS,
      public_mint_start_date: PUBLIC_MINT_START_DATE,
      presale_mint_start_date: PRESALE_MINT_START_DATE,
      base_uri: BASE_URI,
      prereveal_token_uri: PREREVEAL_TOKEN_URI,
      presale_whitelisted_addresses: PRESALE_WHITELISTED_ADDRESSES
    };
    const options = {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify(contract),
    };
    const response = await fetchNoRetry(url, options);
    fs.writeFileSync(`${basePath}/build/contract/_deployContractResponse.json`, JSON.stringify(response, null, 2));
    if(response.response === "OK") {
      console.log(`Contract deployment started.`);
    } else {
      console.log(`Contract deployment failed`);
    }
    console.log(`Check /build/contract/_deployContractResponse.json for more information. Run "npm run get_contract" to get the contract details.`);
  } catch (error) {
    console.log(`CATCH: Contract deployment failed`, `ERROR: ${error}`);
  }
};

deployContract();```






### What have you tried?

I've checked that my.env is correct with my NFT port API key correctly written
I've checked my config.js file is correct and I've updated accordingly
I Googled and asked on Stackoverflow

### Relevant log output

```shell
PS C:\Users\alvar\Desktop\NFTs\minter-dappv2-main\backend> npm run deploy_contract

> [email protected] deploy_contract
> node utils/nftport/deployContract

Is all REQUIRED contract information correct in config.js? (y/n): y
ipfs://bafkreiarlczb5b2fy73ok5ygcu2reavxktirx3uvtkgkfw2whif3z34vkm
CATCH ERROR: ERROR STATUS: 403

Protect your information

  • I Agree

[Bug]: Can't update public mint start data Error 404

Version

  • Yes

General Question

  • No

What happened?

A bug happened!

What have you tried?

I Googled around, tried npm I to reinstall it and shut down everything and restarted it.
image

Relevant log output

No response

Protect your information

  • I Agree

npm run upload_metadata times out and failes with 502 error

I noticed when uploading Images and MetaData json files the API request is not using the Authorization header when sending request to NFTPort API endpoint.

I wonder how come i was able to upload images using npm run upload_files command without any issue, but run upload_metadata cause TIME_OUT error and after Retrying it throws 502 error.

I noticed both /utils/nftport/uploadFiles.js and /utils/nftport/uploadMetas.js are not using NFTPort API key, its an empty object for both files. so my qustion is do we need the NFTport API key to upload files, if so, why images were uploaded without API key and why metadata json files are not uploading.

By the way i am trying to upload a collection 5000 json files, and _metadata.json file already exist with information for all 5000 metadata along with 5000 metadata.json files under /build/json/0.json - 4999.json files.
Screen Shot 2022-03-24 at 11 11 51 PM

Minting tokens with MetaMask on a mobile device - More questions

I know, I know. (Gee, he's posting a lot of questions in here) This one seems kinda important, since a lot of people are going to try making purchases from their mobile device.
Maybe you're having better luck on iPhones, but my Android phone isn't happy.

I tried to connect MetaMask on my Android Chrome browser and the "Install MetaMask!" button opens up a new webpage tab for MetaMask on the Chrome Web Store.

Is there any way to tell the button to take you to either Google Play store, or if already installed, launch the MetaMask mobile app to connect to your shop?

Clarification, How to see/import collection in OpenSea

It's as what the title says, I am a complete newbie so I hope it can be understood that I am not even 100% understand the answers to this or what I am doing myself.

To keep it short, I simply want to know how to import or integrate the NFT polygon collection made here into the OpenSea platform, am I missing something?

Thanks for helping and understanding!

[Bug]:

Version

  • Yes

General Question

  • No

What happened?

Tried to reveal the NFT on testnet after minting and when I refresh the metadata nothing happens. Moderator at Opensea says:

the prereveal TokenURI is the same as what is outputting as the tokenURI

image

So I guess have a chat to the dev who worked on the contract, and do whatever it is on the contract to actually do the reveal - then after that double check that the tokenURI is pointing to the correct meta data for each token - and it'll just sort of work in the background on opensea when you do the 'update metadata' thing.

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

npm run upload_files stops uploading

I have attempted this 4 times already. Everytime I run the npm run upload_files the terminal runs it and it will stop randomly. I am not able to add another command. Has anyone else experienced this and found a resolution?

Sync Changes does not work even thoug I forked tho project in the beginning

I don't know what to do...
After committing the changes I tried to sync them and it takes forever.
I forked the project, I'm logged in in GitHub, I trust the GitHub extension, I just don't know what the issue could be.
After committing the changes I had to run

git config --global user.email "mail address"
git config --global user.name "username"

but after running this I was able to start the sync process so it should have worked...correct?

REVEAL ON OPENSEA NOT WORKING?

I have udated base uri and public sale is on. The individual images are not showing up.

Please advise... I have waited more than 24 hours, as it took that long for generics to show up

TIA

Running into error 422 when deploying contract[Bug]:

Version

  • Yes

General Question

  • No

What happened?

A bug happened!
When deploying the contract, I run into error 422.

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

> [email protected] deploy_contract
> node utils/nftport/deployContract

Is all REQUIRED contract information correct in config.js? (y/n): y
CATCH ERROR: ERROR STATUS: 422

Protect your information

  • I Agree

[Bug]: CATCH ERROR: ERROR STATUS: 403

Version

  • Yes

General Question

  • No

What happened?

CATCH ERROR: ERROR STATUS: 403 while trying to upload files to NFTPORT

What have you tried?

Generating new API keys - doesn't work

Relevant log output

> [email protected] upload_files /Users/me/Desktop/codeSTACK tuto/minter-dapp/backend
> node utils/nftport/uploadFiles

Starting upload of images...
CATCH ERROR: ERROR STATUS: 403
Retrying

Protect your information

  • I Agree

[Bug]: CATCH ERROR 404

Version

  • Yes

General Question

  • No

What happened?

I have the same issue described in a previously closed issue which didn't have a resolution.

Whenever I try any command (i.e. changing presale mint start date, updating whitelist, etc..) to interact with the contract after successfully deploying it, I get an ERROR 404 message. See log output below.

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

Updating presale_mint_start_date to 2022-05-12T16:20:00+01:00, correct? (y/n): y
CATCH ERROR: ERROR STATUS: 404
PS C:\Users\chris\Desktop\NFT ART Contracts\NewMinterDapp\minter-dapp\backend> 


### Protect your information

- [X] I Agree

ERROR

Version

  • Yes

General Question

  • No

What happened?

Shows error 403 while trying to upload the images to IPFS

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

[Bug]: Directed to wrong collection on opensa after minting the NFT

Version

  • Yes

General Question

  • No

What happened?

I was testing the minting process and after the purchas I was directed to the opensea test nets. So far so god. But it was not my collection I was directed to, it was the "testSTACKr Collection" (https://testnets.opensea.io/collection/teststackr-collection). I was able to search for my collection and found it on the opensea test nets so the minting works fine but I want to be directed to my collection after the purchas and not to another one.
I would be very thankful for some help.

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

[Bug]: When I run npm run generate, it is failing to generate png files in the middle, saying selected element undefined.

Version

  • Yes

General Question

  • No

What happened?

/mnt/d/codeStackrNFT/backend/src/main.js:182
const image = await loadImage(${_layer.selectedElement.path});
^

TypeError: Cannot read properties of undefined (reading 'path')
at /mnt/d/codeStackrNFT/backend/src/main.js:182:61
at new Promise ()
at loadLayerImg (/mnt/d/codeStackrNFT/backend/src/main.js:180:10)
at /mnt/d/codeStackrNFT/backend/src/main.js:362:31
at Array.forEach ()
at startCreating (/mnt/d/codeStackrNFT/backend/src/main.js:361:17)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

Cannot close minting UI box on the webpage

I have deployed a webserver as explained in the guide. When I connected to my metamask, whenever I refresh the page, the website automatically opens up a minting box:
image

Is there any way to only open this when a button "MINT" is pressed?

Also, there seems to be no way to close it. It just stays there permamently.

Transfer Funds

How to transfer sales funds from smart contract to your wallet??

Unable to reveal NFT after mint

HI, i'm experiencing this issue where i'm not able to reveal my NFT.
I've updated the base uri after minting, but on opensea.testnet, it does not update. Tried refreshing on opensea and waited for 2days. Still nothing.

Tried using the npm run refresh_os --start=1 --end=100 but it says
Please provide a start and end edition number. Example: npm run refresh_os --start 1 --end 10

Screenshot 2022-04-19 at 14 31 42

Spinner with no text - Is this a MetaMask issue?

If a first time user (without metamask) opens this shop in a browser, or if I open it in an incognito browser,
we will get the spinner graphic, but without any of the "Welcome" and "Connect to MetaMask to Get Started" text.

Am I missing something in my code? Is something up with how the metamask is integrated?

I want to make it as easy as possible for a first time visitor to connect to metamask.

Here's the location of the shop I'm troubleshooting:
https://realdeepdish.netlify.app/
and the repository fork I'm working in :
https://github.com/edhellerdotcom/minter-dapp

Would appreciate some help if anyone has any thoughts. Thanks.

[Bug]: CATCH ERROR: ERROR STATUS: 403

Version

  • Yes

General Question

  • No

What happened?

CATCH ERROR: ERROR STATUS: 422
PS C:\Users\rhidg\Desktop\minter-dapp\backend> npm run deploy_contract

[email protected] deploy_contract
node utils/nftport/deployContract

Is all REQUIRED contract information correct in config.js? (y/n): y
There is an issue with the metadata upload. Please check the /build/_ipfsMetasGeneric/_ipfsMetasResponse.json file for more information. Running "npm run upload_metadata" may fix this issue.
CATCH ERROR: ERROR STATUS: 403
1st i had error 422 i found the problem and now error 403

What have you tried?

I Googled and asked the community in the discord server but could not find a solution.

Relevant log output

No response

Protect your information

  • I Agree

Cannot be whitelisted

Hi I managed to make it to the whitelisting of your one's own address to try the minting process (48:08 mn of the video) and the contract gets updated without a problem.
Now when I go back to my Netlify site to refresh the page I still dont get whitelisted. My account number is correctly between quotes so I really dont know what is up.
When I do this I am on the rinkeby part of y wallet, if I change that to ethereum main the waiting gif keeps turning without ever landing me anywhere...could that be the issue?

[Bug]:

Version

  • Yes

General Question

  • No

What happened?

When I put in my own folders for the layers and then use npm run generate it gives me the same message every time, it says scandir error something with the directory. When I use npm run generate with the original files it works but not with my own

What have you tried?

Watched the video 5 times

Relevant log output

No response

Protect your information

  • I Agree

[Bug]: Netlify Site Partially Loads...

Version

  • Yes

General Question

  • No

What happened?

i have seemingly been successful with deploying a contract, but when i get to the stage of testing out the dapp on the URL via netlify, i was first able to see the pre-written "CodeCats" text and images, but then shortly i received the below loading screen. This has continued to load for over a day, even upon reboot and deleting the site thru netlify, and going thru the steps again to paste in the nftport key, etc....

image

What have you tried?

I Googled and tried to ask the community in the discord server but was not able to post a question of find a solution.

Relevant log output

No response

Protect your information

  • I Agree

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.