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

Identify modules by ID and version #27

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adamgall
Copy link

@adamgall adamgall commented Oct 22, 2024

Currently, the client.getModuleById(id: string) function actually expects the module's implementation address, which makes it kind of redundant as far as I can tell, given that there's also a client.getModuleByImplementation(address: Address) function.

So, this PR updates the getModuleById(id: string) function to accept the module's specific ID, as specified by the id parameter in the modules-registry repository's published module metadatas (for example: https://github.com/Hats-Protocol/modules-registry/blob/4212b61f818515e544f23c2abfdfe6e48d4704ce/modules/haberdasher-labs_hats-election-eligibility_v0.2.0.json#L2)

Now, since module names are not unique (it's valid and expected to have multiple versions for the same module id), I've also updated the getModuleById(id: string) function's arity to also require a version string: getModuleById(id: string, version: string).

Have updated all of the tests to account for these changes.

@spengrah spengrah requested a review from gershido October 23, 2024 14:17
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.

1 participant