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.
I tried
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