Created
August 29, 2023 19:55
-
-
Save DonGambas/230389f11dc5f10137a510527175e01e to your computer and use it in GitHub Desktop.
example ERC2771Recipient contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.13; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
import "@opengsn/contracts/src/ERC2771Recipient.sol"; | |
contract ERC1155Ex is ERC1155, ERC2771Recipient { | |
string public name; //the contract name | |
constructor( | |
string memory _name | |
string memory _uri, | |
address _forwarder | |
) ERC1155(_uri) { | |
_setTrustedForwarder(_forwarder); | |
setURI(_uri); | |
name = _name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment