Questions tagged [mint]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
577 views

Minting with Wagmi

I am using Wagmi hooks in my dapp. Also, I have utilized RainbowKit for wallet connection. Now, I am trying to use Wagmi to execute the mint function of my smart contract. As shown, it takes three ...
0 votes
2 answers
201 views

Multiple TokenURI URL in one smart contract

I have a doubt wich is if its possible to have different mint functions pointing to different tokenURI. Lets say i have 2 mint functions and 2 variables called tokenURI1 and TokenURI2 just like this: ...
1 vote
1 answer
1k views

purpose of nonReentrant modifier on onlyOwner withdraw method?

was going through this nft smartcontract function withdrawMoney() external onlyOwner nonReentrant { (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success, &...
0 votes
0 answers
5 views

How to fix `str is undefined` nft dapp upload picture problem?

I'm trying to do an example in a tutorial, I tried to run this, but I get an error that "Upload errorTypeError: str is undefined". How can I solve this? I tried: -> deleting artifacts and ...
1 vote
0 answers
19 views

Calling Mint And Change Balance From Another Smart Contract

My Project is about a Token in which the Holder can disable their token at the Old Address and Receive a New Minted token. It uses 2 different contacts. I put the functions in the BBB contract and ...
1 vote
1 answer
18 views

How can I access the 3rd argument of _safeMint?

I am minting an ERC721 using _safeMint and I am setting the 3rd argument to a string. I want to be able to access this data argument using the transaction hash or whatever I have to access the ...
0 votes
1 answer
729 views

Token id 0 minted error

i was wondering if someone can help me here. I'm minting an nft by this smart contract, and the problem is that the tokenid count starts with id 0, and that is an error. It must start in id 1. Someone ...
1 vote
3 answers
333 views

Minting gas price too high

I am trying to test a minting function in a smart contract deployed on rinkeby and i was wondering why is the gas price so high for minting, is there any way to reduce the gas price ? pragma solidity ...
1 vote
1 answer
749 views

(ERC721) Is my mint() function guaranteed to mint consecutive tokenIDs for each user who calls it?

It is great to see a supportive community that could potentially help me out. I hope my question (as a beginner blockchain dev) is not too basic. I have the following mint() function (users can call ...
3 votes
1 answer
720 views

Correct way to create a ERC1155 collection

I am working on creating a contract that implements ERC1155 tokens. I want to be able to init a collection with different tiers. So let's say 3 tiers, tier1 will have 15 supply, tier2 50 supply and ...
0 votes
1 answer
492 views

Trying to call a mint function to a deployed erc20 contract using ethers.js

I'm building a react app which currently is able to connect to a wallet and display some data from a few deployed contracts. Upon connection to a wallet, I want to mint 1000 units of a token which I ...
0 votes
1 answer
12 views

Enforcing holding limits on ERC721 tokens

We would like to enforce a certain limit on total amount of tokens held. Note: Tokens issued from our contract. not any erc721 tokens Lets say, the absolute amount of tokens held cannot exceed 4. What ...
0 votes
2 answers
373 views

Token Contract Verified and Signed on Mainnet Does Not Show MINT Function

The Token Contract Address https://etherscan.io/address/0xa2e7a0d1cfeda4d3977277265e205f6092d02e3b was successfully tested on Ropsten (See Ropsten Contract Address ...
0 votes
1 answer
342 views

How to display a token collection on opensea before it is minted?

Is there a way to display non-minted "yet" tokens on Opensea with the required msg.value as a price set directly by the contract? So instead of me paying the gas of thousands of tokens, I ...
0 votes
1 answer
321 views

ERC1155 passing user defined tokenURI on the mint process

Hi im trying to set a new tokenURI per mint. Users are submitting the meta on the front end and im trying to get it back from moralis to use in my contract… Is this even possible? I tried doing this ...
0 votes
3 answers
2k views

Add a price for minting an NFT

I attempting to implement an NFT minter into my application, but want to set prices for minting an NFT. I'm using a smart contract template I found but haven't been able to figure out how to set ...
0 votes
1 answer
502 views

When minting there is a third box appearing called 'signature (bytes)' what do I enter here?

I just looked at a minting contract and in addition to the usual mint price and quantity, there is a third box "signature (bytes)". I have not seen this before. What am I supposed to put ...
0 votes
3 answers
979 views

Reveal NFT image/metadata after mint

I would like to adapt my current contract to include a post mint image/metadata reveal feature. i.e. after an NFT is minted I would only then like the image/metadata to be revealed for that particular ...
0 votes
3 answers
7k views

How to mint Dai to Goerli testnet wallet?

Trying to get lots of Dai (need like 300,000+) on Goerli to transfer to zksync alpha testnet. When I try to just directly mint to my wallet's address on etherscan using the contract web interface, ...
0 votes
1 answer
435 views

Minting/Sending 0 Value ERC-20 Tokens in Response to Transaction in Another Contract

I currently have a working ERC-20 contract for a small group that I am in. I would like to make a new contract that mints or sends a 0 value token without liquidity similar to a rewards token that has ...
0 votes
1 answer
29 views

How to identify a specific ERC1155 token instance?

I'm trying to write a game item contract where the player can upgrade the items. For this, I need to be able to clearly distinct the different instances of the same tokenID. Let me explain, if : ID=0 -...
0 votes
1 answer
14 views

Burn multiple ERC721 sharing the same trait to mint a new ERC721

I have an ERC721 Collection of 5000 NFTs. Some are sharing similar traits in their metadata. I'm looking for guidance to code a burn to mint function that allows holders to burn up to 5 NFT sharing ...
0 votes
2 answers
1k views

Difference between lazy minting in OpenSea and Rarible

Rarible allows us to publish gas-free NFTs through lazy minting while OpenSea requires an initial gas fee (for Ethereum), after which all subsequent NFTs are published for free. After paying the ...
2 votes
1 answer
239 views

Randomizing values in mintable NFTs

I've read and written simple smart contracts in the past yet I'm relatively new to getting random data in a transaction, which seems to be harder than I've thought, due to the nature of determinism of ...
0 votes
0 answers
25 views

How to get all the tokens ids right after minting?

I'm currently grabbing the token ID after minting like below. tokenId = BigInt(receipt.logs[0].topics[3]).toString(); But if I do bulk minting (say minting 5 NFTs) in one transaction, how do I grab ...
0 votes
1 answer
14 views

Hello. Is token mint allowed in this snippet? Or can it be mint again?

function mint(address user, uint256 value) external onlyOwner { require(user == OWNER, "NOT_OWNER"); balances[user] = balances[user].add(value); totalSupply = totalSupply.add(value); ...
0 votes
0 answers
126 views

Mint new position fails uniswap v3

I am using the code example of uniswap to mint a new position and add deposit: https://github.com/Uniswap/docs/blob/main/examples/smart-contracts/LiquidityExamples.sol Below is my code: /// @notice ...
0 votes
1 answer
27 views

Balance doesn't change after I mint NFT

I am trying to connect EC2 with my testnet CA which I deployed on Mumbai. The Contract is a functions as an NFT, inheriting ERC721.sol from @openzeppelin. I created my Instance in aws EC2, and I wrote ...
1 vote
1 answer
142 views

ERC721: Do we have to increase token id before or after mint?

I have this kind of scenario to mint an NFT. _tokenIdTracker.increment(); _safeMint(_to, _tokenId); What I am curious about is which is the right order - Increase token before or after _safeMint?
0 votes
2 answers
858 views

Do ERC-20 ETH tokens gain value if minted tokens get more use?

So I am trying to understand ethereum better. If someone could help me by correcting me where I am wrong here. As I understand ERC-20 is the ETH token. When you buy ETH on Binance or Uphold or wherver,...
0 votes
1 answer
25 views

Can an individual NFT that's not been minted yet have a whitelist?

As it's not been minted yet, it doesn't exist, right? However, what if I had an idea to create a future collection of 333 NFT. And I wanted to allow certain users to mint certain NFTs. Meaning, future ...
0 votes
1 answer
133 views

Using the _mint() function from an ERC20 contract marked 'internal virtual'

I have an existing ERC20 token / contract that I would like to be able to provide rewards that could be minted to the supply. The existing contract already has a _mint() function, but it's labeled as '...
0 votes
1 answer
67 views

Burn an existing NFT and Mint a new NFT in one go

I am developing a Dapp for NFT minting. In order to mint a new 2nd NFT, the user has to burn the 1st one that he owns. I know that our Dapp can prompt the user to burn the 1st NFT. And only after it's ...
0 votes
0 answers
16 views

I have an existing ERC721A smart contract deployed but I feel there's some error in the contract. Please help!

My team and I deployed an ERC721A smart contract months ago and we need to use that contract again when we try to mint 1 NFT it shows normal gas fees but when we try to mint more than one it shows 1.2 ...
0 votes
1 answer
132 views

Mint function of ERC20 reverts, when called from another contract

So, I am trying to call a mint function which is present in my ERC20 token contract, which is a standard open Zeppelin Contract, From another Contract. I am using Interface to call the mint function, ...
0 votes
0 answers
17 views

How much Gas Token used in total Gas?

Users can Mint Gas tokens at a lower price and Free them when the Gas price is high in Ethereum. In Etherscan, the available information is Gas Used. There is no more information about how much Gas is ...
2 votes
1 answer
116 views

How do I make a contract mint NFTs randomly with a metadata that's already on IPFS?

I want to deploy an NFT that at mint time, selects at random one of an enum of several metadata choices. Obviously I can't do this on a static mint site because you could exploit the contract by ...
1 vote
2 answers
226 views

Is there a way to mint several ENS at the same time?

I'm looking to mint 2 ENS at the same time to avoid paying the fee twice. Is that something possible ? Have a wonderful day :D
0 votes
2 answers
24 views

Issue allowing only the owner of the originating wallet to be able to mint NFTs

I am trying to make a simple nft smart contract that only allows the wallet owner to mint nfts pragma solidity ^0.8.15; import "erc721a/contracts/ERC721A.sol"; contract testNFTRun is ...
2 votes
1 answer
134 views

Set metadata for Ethereun new token minted after deployment ERC 1155

i set a new contract with eRC 1155 on ethereum with 3 categories of 3 tokens (Id 1,2,3) and deployed it in the blockchain. To have the possibility to mint new token i create a override function for ...
1 vote
3 answers
301 views

How to batch mint nfts during a public mint with a contract?

so Coinbase have an open edition mint going on. It is limited to 1 per wallet. Which means anyone could fund several wallets and mint 1 from each wallet, however this would be gas inefficientm ...
2 votes
3 answers
238 views

I have an existing ERC721A smart contract deployed but how can I change public mint price and open that contract?

My team and I deployed an ERC721A smart contract months ago and we need to open that contract and change the public mint price on that which is mutable because we have done that before too but the ...
1 vote
1 answer
55 views

Middleman contract to mint another ERC1155

Is it possible to create a middleman like contract to burn from one ERC1155 contract(Contract A) and mint another ERC1155 contract(Contract B) to the sender if he meets the criteria written within the ...
0 votes
0 answers
634 views

JsonRpcEngine: Response has no error or result for request

I have an NFT marketplace project deployed on Vercel. I am having issue when minting the token. I upload them to Pinata without issue, the only thing when I call const tx = contract?.mintToken( ...
0 votes
0 answers
32 views

contract.methods can not define contract

The problem that I am having is that my contract method is not responding when I'm trying the mint function on my localhost and I'm constantly getting an error on the website saying: Uncaught ...
0 votes
1 answer
398 views

Restricting minting of an ERC20 token by another smart contract

I have an ERC20 token that I would like another smart contract (lets call it Manager) to be able to mint to the users of the dapp. I am assuming, I should restrict the mint function to only be execute ...
0 votes
1 answer
158 views

How to add 2 different royalties to same NFT using ERC721?

I am trying to implement this coding to allow 2 different royalties (e.g. An NFT to have a 2.5% royalty to one address and 3% to another address) to be added to the same token ID. I have researched ...
1 vote
2 answers
164 views

How get the mint price from contract and max supply not total supply

I wanted to get the Mint price from nft i tried getting it from abi but it's not effective since different contracts has different names for it so how can i find the set mint price from contract in ...
1 vote
1 answer
4k views

How do I add minting functions to my webpage?

I'm looking at adding a mint function on my website so that users can directly mint from my website straight to the contract such as this: https://campfirebear.club/mint is this just written in JS ? ...
1 vote
2 answers
151 views

ERC721 Minting Randomness

Trying to figure out how to do the following. I wouldn't need the code, just an understanding of viable methods as I can't locate an answer. An NFT minting process for 2,000 NFTs. IDs from 0-9 would ...