[Ethereum] Is ERC1155 gas fees relatively low when sending batch transaction of tokens from the same collection

erc-1155erc-721gasnft

I've heard it can cut down gas fees when working with different tokens, like tokens from different collections or different standards (20, 1155) by making batch transactions. But the question is, can this batch transaction stay effective in terms of gas fees, when sending tokens from the same collection?

In our current code, we are looping thru the amount user wants to mint and making _safeMint each time. This results in huge gas fees.

Will 1155 help in this case?

Best Answer

Since you are working with ERC721, you could add a batch function to your contract so you don't have to call the contract several times. That way it will be cheaper.

In case you've already deployed the contract and if it's 721 then there's not much you can do.

ERC1155 already has a batch function: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol