Comments (11)
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.
/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.
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.
/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.
Replace your ABI with right one. Worked for me
from hashlips_nft_minting_dapp.
My line 133 looks like that now and it works! thanks @Ivan-Dosev
.mint(blockchain.account, mintAmount)
from hashlips_nft_minting_dapp.
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.
still have same issue
from hashlips_nft_minting_dapp.
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.
Thanks man, it works
from hashlips_nft_minting_dapp.
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)
- gas limit too high?
- Issue with parameter vs to: address
- interaction with thirdweb HOT 2
- Looking for a way to display totalSupply from the contract before connecting wallet HOT 1
- Error: Unhandled Rejection (Error): No "from" address specified in neither the given options, nor the default options.
- Confused about storage part
- error unsupported network HOT 3
- Logo error
- No option for whitelisting and pre-sale
- Code modification HOT 2
- Gas fee estimation error in polygon network
- Can't Get Minting Dapp to work with polygon Testnet HOT 1
- 71 vulnerabilities (13 low, 19 moderate, 36 high, 3 critical....
- Page Blank on Hostinger HOT 1
- Why from mobie the connect button don't open the metamask app?
- Issue deploying on Netlify
- npm warn deprecated
- Error Assertion failled HOT 1
- Uncaught runtime errors if i cancel the minting transaction.
- Error: Invalid number of parameters for "addData". Got 1 expected 4!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashlips_nft_minting_dapp.