As per EIP-1155:
The total value transferred from address 0x0 minus the total value transferred to 0x0 observed via the TransferSingle and TransferBatch events MAY be used by clients and exchanges to determine the “circulating supply” for a given token ID.
This means that the current supply when calling
_mint() must be passed in by a frontend and is not read from the blockchain, so if there is already a pending mint transaction on the blockchain while another token is being minted dynamically, the frontend will not take any pending transactions into account when calculating the total supply, hence both mints will be provided the same token id and whichever gets minted last will fail as already minted. Am I correct?
Thank you in advance.