Skip to content

Instantly share code, notes, and snippets.

@DonGambas
Created August 29, 2023 19:55
example ERC2771Recipient contract
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