Skip to content

Add more hooks #7

Open
Open
@Yuripetusko

Description

@Yuripetusko

We have bunch of hooks that we use on Singular.app internally that we could move here. We don't want to add a simple hooks here that are just single contract call, because there is no point abstracting these into library, but anything that requires 2 or more contract calls should be abstracted into a single hook and added to this library

  • An abstraction for getting full inventory array (active children, their primary assets, equip state, slot-part data (if applicable)
  • A bulk equip functions: bulk equip, replace equipement, and few more
  • Pending children and their data (asset, slot-part data)
  • Asset addition write hook (that is calling 2 functions, addAssetEntry and then addAssetToToken), with appropriate callbacks on each step
  • Pending Asset accept hook that also checks if asset is not equipped, and prevents accept if it is equipped, to prevent orphaned equipped asset issue
  • Get catalog parts by partIds and fetch their metadatas
  • Get equippable slots of NFT (Checks if given NFT can be equipped in any of the provided Catalog's slots, If it does, then return all equippable part details for these slots)
  • Get extended nft data (gets extended nft data, primary asset data and metadata, collection data, and combines it into a single return object)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions