Skip to content

Instantly share code, notes, and snippets.

@DonGambas
Created August 29, 2023 19:55
Show Gist options
  • Save DonGambas/230389f11dc5f10137a510527175e01e to your computer and use it in GitHub Desktop.
Save DonGambas/230389f11dc5f10137a510527175e01e to your computer and use it in GitHub Desktop.
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