Hi all, this is a very silly question but I think I need your advice as I would hate to lose money on a real network. I want to mint 10000 NFTs at once using the _mint function, because the results of _mintBatch for some reason do not see OpenSea at all. So, in 1 time 10000 NFTs, what are the correct specifications I should specify in Remix? I know that it depends on many factors on the cost of gas, etc., but still, maybe someone has done or knows. And maybe someone knows how much is the total in ETH at least approximately.
I just tried the test network, it keeps swearing that I either exceed the gas limit or it is too low and as a result I can not do what I need.
first, try to deploy the contract on testnet
usually you can not mint 10000 NFTs in a transaction, mostly because of gas prices
you may have to split in multiple transactions, and maybe _mintBatch is the way to do it easier
try first on a testnet
I tried small batches of 10 with _mintBatch - OpenSea does not see these contracts at all. But the regular _mint, on the other hand, it immediately sees and finds
what is the difference between _mintBatch and regular _mint?
what is the problem that you have now? deploy doesn’t work or _mint doesn’t work, or something else?
This is the usual mint called repeatedly until the end of the loop enumeration, well, that’s based on the code I saw in ERC1155
usually the users of the contract will call mint, so you don’t have to call it 10k times
The point is simple, I want to mint 10000 NFT, not by “lazy minting” and not by using the button on the site, but immediately to integrate a smart contract after in OpenSea
what is the problem that you have now?
My problem is that Remix gives me 1 of 2 errors: not enough gas, or too much gas. I’m trying to figure out approximately how much and what to specify and how to do it right.
In short, I want to somehow incredibly realize and understand how to mint 10,000 pieces at a time, and how much it would cost. And if that’s not possible, then how to proceed. Since I’m new to solidity.
not enough gas may be when the transaction needs more gas, too much gas may be when you hit the gas limit per transaction
it may not be possible to mint 10k nfts in one transaction, did you try to mint 10 at once with a function and it didn’t work?
I successfully reached a result when I ran _mint 10 times through the loop, but I never reached a result when I called _mintBathc. Although I tried 2 different ways to initialize 2 data arrays for number of items, and for id.
uint256 public index;
uint256 public count;
And after that I used index.push(i) where “i” is a loop step in the constructor.
And the second thing I tried in the constructor is to declare
uint256 memory index = new uint256;
And assign a value to each element of the array:
index[i] = i;
count[i] = 1;
In both cases it didn’t work, or rather the contract was expanded but OpenSea didn’t accept any results.
uint256 memory index = new uint256_scope_10_scope close;
Here are two options that didn’t work
Maybe you can tell me how to call them correctly?
I don’t know what is wrong with that _mintBatch
are the token minted after that, the events are present in the block explorer as expected?
Of course, I’m still a beginner, and I don’t understand everything completely. But as I understand it, yes, but OpenSea does not find a contract neither 721 nor 1155. Maybe I need to add a function to return the support interface - I read about it, but I don’t understand how to implement it yet
I mean, I looked at etherscan there everything shows up fine. I can’t give you the link now because I didn’t save the answers from the test network, including the contract addresses.
if you use openzeppelin library then it will have all the needed interfaces