Created
August 29, 2023 19:55
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