Re-entrancy issue for ERC1155
ERC1155 tokens have callback functions on some of the transfers, like `safeTransferFrom`, `safeBatchTransferFrom`. During these transfers, the `IERC1155ReceiverUpgradeable(to).onERC1155Received` function is called in the `to` address.\\nFor example, `safeTransferFrom` is used in the `LiquidityMining` contract:\\n```\\nfunction distributeAllNFT() external {\\n    require(block.timestamp > getEndLMTime(),\\n        "2 weeks after liquidity mining time has not expired");\\n    require(!isNFTDistributed, "NFT is already distributed");\\n\\n    for (uint256 i = 0; i < leaderboard.length; i++) {\\n        address[] memory \\_groupLeaders = groupsLeaders[leaderboard[i]];\\n\\n        for (uint256 j = 0; j < \\_groupLeaders.length; j++) {\\n            \\_sendNFT(j, \\_groupLeaders[j]);\\n        }\\n    }\\n\\n    for (uint256 i = 0; i < topUsers.length; i++) {\\n        address \\_currentAddress = topUsers[i];\\n        LMNFT.safeTransferFrom(address(this), \\_currentAddress, 1, 1, "");\\n        emit NFTSent(\\_currentAddress, 1);\\n    }\\n\\n    isNFTDistributed = true;\\n}\\n```\\n\\nDuring that transfer, the `distributeAllNFT` function can be called again and again. So multiple transfers will be done for each user.\\nIn addition to that, any receiver of the tokens can revert the transfer. If that happens, nobody will be able to receive their tokens.
Add a reentrancy guard.\\nAvoid transferring tokens for different receivers in a single transaction.
```\\nfunction distributeAllNFT() external {\\n    require(block.timestamp > getEndLMTime(),\\n        "2 weeks after liquidity mining time has not expired");\\n    require(!isNFTDistributed, "NFT is already distributed");\\n\\n    for (uint256 i = 0; i < leaderboard.length; i++) {\\n        address[] memory \\_groupLeaders = groupsLeaders[leaderboard[i]];\\n\\n        for (uint256 j = 0; j < \\_groupLeaders.length; j++) {\\n            \\_sendNFT(j, \\_groupLeaders[j]);\\n        }\\n    }\\n\\n    for (uint256 i = 0; i < topUsers.length; i++) {\\n        address \\_currentAddress = topUsers[i];\\n        LMNFT.safeTransferFrom(address(this), \\_currentAddress, 1, 1, "");\\n        emit NFTSent(\\_currentAddress, 1);\\n    }\\n\\n    isNFTDistributed = true;\\n}\\n```\\n