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

Rework the Registry to be a public class #183

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Jun 8, 2023

Summary

I reworked the registry to save on performance, and memory while also exposing a bunch of public functions to the user.

Exposed functions from the registry

// Getter for the complete registry
public get getRegistry

// Getter for the name of the relay chain for this network
public get getRelayChain

// Getter for the registry associated with this networks relay chain
public get getRelaysRegistry

// Lookup all chains that have the following token symbol. It will return an array
// with all the chains that have the following token symbols. Note this will only
// be searched in the respective relay chains registry.
public lookupTokenSymbol(symbol: string)

// Lookup all chains that have the following assetId. It will return an array
// with all the chains that have the following AssetId. Note this will only
// be searched in the respective relay chains registry.
public lookupAssetId(id: string)

// Check whether a parachain id exists within the relay chains registry.
public lookupParachainId(id: string)

// Return the info for a parachain within a relay chains registry.
public lookupParachainInfo(id: string)

Copy link
Contributor

@marshacb marshacb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@TarikGul TarikGul merged commit ee06100 into main Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants