Giter VIP home page Giter VIP logo

Comments (11)

Ivan-Dosev avatar Ivan-Dosev commented on September 27, 2024 10

Try changing line 133 in App.js to .mint(blockchain.account, mintAmount) Make sure to save before you give it a go. The smart contract which is explained int the Hashlips video takes 2 parameters (Blockchain account and mint amount). If you have copy/paste his code directly you can see that he is taking the minting amount only. He mentions this in the readme file. In order to work you have to either edit your smart contract to take only 1 parameter or add the blockchain account as I told you. I assume it will be easier to add the address inside.

from hashlips_nft_minting_dapp.

tclam55 avatar tclam55 commented on September 27, 2024

/Users/thyechin.lam/Desktop/Screen Shot 2022-02-11 at 11.22.00 PM.png

I having same issue as well

from hashlips_nft_minting_dapp.

Doughp avatar Doughp commented on September 27, 2024

You will need to offer more for someone to help you, Look at your smart contract and look at your mint function it will look something like this _safeMint(address to, tokenURI) or _mint(address to, tokenURI) or amount or something else, then you will need to find out what you are not getting from the minting dapp.

from hashlips_nft_minting_dapp.

Doughp avatar Doughp commented on September 27, 2024

/Users/thyechin.lam/Desktop/Screen Shot 2022-02-11 at 11.22.00 PM.png

I having same issue as well

same solution most likely ^

from hashlips_nft_minting_dapp.

Allespro avatar Allespro commented on September 27, 2024

Replace your ABI with right one. Worked for me

from hashlips_nft_minting_dapp.

onglette avatar onglette commented on September 27, 2024

My line 133 looks like that now and it works! thanks @Ivan-Dosev
.mint(blockchain.account, mintAmount)

from hashlips_nft_minting_dapp.

Ivan-Dosev avatar Ivan-Dosev commented on September 27, 2024

My line 133 looks like that now and it works! thanks @Ivan-Dosev
.mint(blockchain.account, mintAmount)

You are very welcome, my friend :)

from hashlips_nft_minting_dapp.

zakesol avatar zakesol commented on September 27, 2024

still have same issue

from hashlips_nft_minting_dapp.

plutogang avatar plutogang commented on September 27, 2024

Hi Everyone, I am having the same issue. I have already deployed my contract and am attempting to launch a Minting Dapp using Bubble.io. Can i edit my smart Contract after it has been deployed? the app builder is looking for a second parameter is there something i can enter as a second parameter. i seem to be going around in circles. here is our smart contract..

// SPDX-License-Identifier: GPL-3.0

// Created by HashLips
// The Nerdy Coder Clones

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract PLUTOGANG is ERC721Enumerable, Ownable {
using Strings for uint256;

string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 50;
bool public paused = false;
mapping(address => bool) public whitelisted;

constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
setBaseURI(_initBaseURI);
mint(msg.sender, 50);
}

// internal
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}

// public
function mint(address _to, uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);

if (msg.sender != owner()) {
    if(whitelisted[msg.sender] != true) {
      require(msg.value >= cost * _mintAmount);
    }
}

for (uint256 i = 1; i <= _mintAmount; i++) {
  _safeMint(_to, supply + i);
}

}

function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
uint256 ownerTokenCount = balanceOf(_owner);
uint256[] memory tokenIds = new uint256;
for (uint256 i; i < ownerTokenCount; i++) {
tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
}
return tokenIds;
}

function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);

string memory currentBaseURI = _baseURI();
return bytes(currentBaseURI).length > 0
    ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension))
    : "";

}

//only owner
function setCost(uint256 _newCost) public onlyOwner {
cost = _newCost;
}

function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
maxMintAmount = _newmaxMintAmount;
}

function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}

function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
baseExtension = _newBaseExtension;
}

function pause(bool _state) public onlyOwner {
paused = _state;
}

function whitelistUser(address _user) public onlyOwner {
whitelisted[_user] = true;
}

function removeWhitelistUser(address _user) public onlyOwner {
whitelisted[_user] = false;
}

function withdraw() public payable onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}
}

thanks in advance for any help.

from hashlips_nft_minting_dapp.

warpalphap avatar warpalphap commented on September 27, 2024

Thanks man, it works

from hashlips_nft_minting_dapp.

BedoSensei avatar BedoSensei commented on September 27, 2024

Try changing line 133 in App.js to .mint(blockchain.account, mintAmount) Make sure to save before you give it a go. The smart contract which is explained int the Hashlips video takes 2 parameters (Blockchain account and mint amount). If you have copy/paste his code directly you can see that he is taking the minting amount only. He mentions this in the readme file. In order to work you have to either edit your smart contract to take only 1 parameter or add the blockchain account as I told you. I assume it will be easier to add the address inside.

You are the god who saved my project. Thank you buddy.

from hashlips_nft_minting_dapp.

Related Issues (20)

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.