Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more hooks #7

Open
Yuripetusko opened this issue Jan 24, 2024 · 0 comments
Open

Add more hooks #7

Yuripetusko opened this issue Jan 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Yuripetusko
Copy link
Member

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)
@Yuripetusko Yuripetusko added the enhancement New feature or request label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant