Erc1155 - how does multisig mint?

In OZ's erc1155, it seems there's only _mint function that calls _doSafeTransferAcceptanceCheck in the end which all the time checks that if receiver is contract, it should have the function onERC1155Received implemented on it.

  1. Why is this restricted in ERC1155 and not in ERC721 ? in erc721, you can decide to use _mint or safeMint, but there's no option to decide in erc1155.
  2. if so, how can multisig call mint on erc1155 and succeed ? multisig(gnosis let's say doesn't have onERC1155Received on it ..

Thank you.

1 Like

Hello @novaknole

_doSafeTransferAcceptanceCheck is also called by _safeTransferFrom and is part of all transfers, not just mints.

This is part of the ERC1155 standard (see the safe transfer rule section of https://eips.ethereum.org/EIPS/eip-1155). ERC721 and ERC1155 are two different standards, which different security mechanism. ERC1155 forces all transfers to be checked.

You need to have onERC1155Received implemented, or a fallback mechanism that mimics it.

For gnosis safe:

1 Like