1

I am going to enable meta-transactions for my contract (simple ERC1155 contract, truffle project) on Polygon network to be used by OpenSea, checked the following tutorials and contracts and understood that native meta-transactions could be the best choice:

https://docs.opensea.io/docs/polygon-basic-integration https://github.com/ProjectOpenSea/meta-transactions/blob/main/contracts/ERC1155MetaTransactionMaticSample.sol

And have the following questions:

  • Is there any tested/audited npm module which provides implementation of NativeMetaTransaction and ContextMixin contracts ? I could find this module, but not sure if this is the best choice: https://www.npmjs.com/package/@maticnetwork/pos-portal,
  • As far as I can see EIP712Base contract (the parent contract of NativeMetaTransaction ) extends Initializable, which assumes my contract to be upgradable, whereas I am not planning to make my contract upgradable. Also the solidity conpiler version used in the module is 0.6.x, whereas it is 0.8.x in my contract,
  • Is there any detailed tutorial, documentation or best practices about enabling native meta-transactions on Polygon contract, also how does the OpenSea call meta-transaction functions ?

Would be happy to get any suggestion/advice. Thanks in advance!

2
  • Did you found out how to do it?
    – Karan S
    May 21, 2022 at 5:44
  • Yes, please see my answer below.
    – Edvard
    May 24, 2022 at 9:43

1 Answer 1

2

UPDATE: I have followed the instructions here: https://docs.opensea.io/docs/polygon-basic-integration#meta-transactions

and here:

https://github.com/ProjectOpenSea/meta-transactions/blob/main/contracts/ERC1155MetaTransactionMaticSample.sol

I have extended my contract from ContextMixin and NativeMetaTransaction contracts defined in the github repo.

1
  • and do you use GSN to interact with it? Aug 16, 2023 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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