Skip to content

[FEATURE] Deduplicate the generic StorefrontRemoveItem template #31

@bartolomej

Description

@bartolomej

Issue to be solved

Transactions for removing a listing from the storefront are generic, so they should work for any resource type.

But since the templates under templates/NFTCatalog were generated using the NFT catalog tool, each project sub-directory contains its own {ProjectName}-StorefrontRemoveItem.mainnet.template.json template file.

So if someone were to search for a "remove item" template, all these templates that essentially do the same thing would show up. Their labels would suggest that each template is built for a specific NFT collection, but that's not the case as they are generic. This makes this confusing and could present an unnecessary clutter in a template discovery tool.

I realized this when I was integrating template discovery support in Flowser:
Screenshot 2023-11-12 at 11 32 23

Suggest A Solution

Deduplicate these templates, by creating a generic StorefrontRemoveItem contract and remove all the other project-specific ones.

This shouldn't be a breaking change, since these templates only differ in comments which are not present in the AST that's used for hash calculation in the scope of reverse lookup (the /templates/search?cadence_base64= endpoint).

What are you currently working on that this is blocking?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions