0

i have a smart contract that receives ERC1155 tokens but it needs to be ERC1155 Receiver, how to properly implement the ERC1155TokenReceiver interface?

1 Answer 1

0

openzeppelin has already implemented it in the following library, import this from openzepplin:

import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

contract myContract is ERC1155Holder{}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.