Giter VIP home page Giter VIP logo

example_nft_minter's People

Contributors

hashlips 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

example_nft_minter's Issues

Failed to buy NFT

I have created a smart contract and verified it, it appears in opensea.io and everything works great. In web3 I press connect and it works but when I buy an NFT I get an error.

Thanks
Captura de pantalla 2021-12-24 a las 12 50 44

Issue with deployed Remix contract

2 days ago I could take the this smart contract and deploy it on Remix and was able to mint from both the owners address and other wallets. Last night I started to get an error that would not let any wallets, other then the owners, use the mint function. It seems that everything fails unless line 46 (in SmartContract.sol) is disabled. Anyone else having this issue? It seems like msg.value is passing as empty (or 0), therefor the transaction fails on line 46.

I was able to deploy the contract to Rinkeby then verify the contract on etherscan and use the mint function that because Payable the payableAmount field and if filled out correctly the mint from the non-owner wallet works.

New to Solidity so a bit stuck, any thoughts ?

Metamask stays on busy when trying to purchase

Just launched my dapp, it allows to connect and functions perfectly until you go to buy an NFT. Once you initiate a purchase it says it is minting your NFT but the button just stays Busy. I used pinata to host the nfts, could that be the issue? If so should I switch them to my website server?

Thank you for any help, it is greatly appreciated!

images didn't come through to opensea

We'll I definitely screwed up somewhere.... After I created the contract and the first 20 nfts were minted they were in my opensea account. However, no pictures came through and the left side nft data wasn't there.

Before I started down this road I did create a collection on Opensea with the same name of my collection I just minted. Opensea however created a new collection with "v2" after my name with my freshly minted nfts. Could this be my problem?

Got Expected identifier, got 'LParen'

image

After compiling NFT_TOKEN.sol i got the above error.

Errors:
Source "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol" not found: File import callback not supported
Source "@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported
Expected identifier, got 'LParen'

impossible to mint more than 169 NFTs at once

Hey, i want to mint 10.000 NFTs in at once, but if i mint more than 169 NFTs, remix ethereum say me when i mint more than 169 in the function after the deploy of the contract :

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

And when i want to deploy my contract with more than 169 NFTs with 800000000 gas limit the error code is :

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Internal JSON-RPC error. { "code": -32000, "message": "gas required exceeds allowance (20019530)" }

I am on the Matic test network (Mumbai) and my smart contract is :

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

`// 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 NerdyCoderClones is ERC721Enumerable, Ownable {
using Strings for uint256;

string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.01 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 10000;
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, 500);
}

// 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));
}
`}``

yarn start not working

when I use yarn start I get this error:
warning package.json: No license field error Command "start" not found.

customize app.js

what is the send wallet here for the eth network?

  .send({
    gasLimit: "285000",
    to: "0x827acb09a2dc20e39c9aad7f7190d9bc53534192",
    from: blockchain.account,

I replaced your settings to make it work for me but im getting an error and it keeps sending to my buying wallet which is not in this app.js file.

0xf66f2872c726a8198d6a2a7d07acba0215571c2284f8b0a7cb45e1ca0b935b88

its suppose to send to another wallet not same wallet buying.

is there more info on custom setup for your great site?

I have my test site live here to see - www.jonlittlenfts.com

replace the main image

Hello. I Hope this message finds you well. I am struggling to replace the main image with another one of my own, can someone explain to me how is it done? Thank you so much in advance!

Can't verify it on etherscan

After i deploy the contract on remix, when i try to verify it on etherscan ropsten network, it always fails.

I added all the openzeppelin files into the contract and deployed without problems then i copied the code into etherscan and got this problem.

Any help would be appreciated.

Screenshot from 2021-09-13 17-37-17

WETH instead of matic

Hello,

is there a way to set the cost to be in polygon wrapped ethereum instead of matic?

thank you

Metamask connection on refresh

Is there a way to make the metamask connection be active on refresh? Every time, the user needs to press the connect button, even if the website is not closed.

Buy more than 1 nft per transaction

Hi guys,

Does anyone know what changes are required to change the buy button section to allow the user to buy more than one nft at a time? The current set-up only allows 1 nft to be purchased per transaction

Thanks in advance

Error something went wrong

I changed the networkId to 1 for ethereum main met instead of polygon but it gives me an error after connecting to metamask. Any ideas?

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.