Skip to content

Conversation

@thewhaleking
Copy link
Collaborator

Resolves #222

@thewhaleking thewhaleking requested a review from a team October 23, 2025 16:41
@github-actions github-actions bot added run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests. labels Oct 23, 2025
@basfroman
Copy link
Contributor

Looks good!

wdyt about keeping the code consistent and creating classmethod in SubstrateMixin:

class SubstrateMixin:
...
    @classmethod
    def _get_metadata_call_funcion(cls, runtime: Runtime):

Then update the Async/SubstrateInterface.get_metadata_call_function call from self._get_metadata_call_function as you do now for get_metadata_call_functions?

@thewhaleking
Copy link
Collaborator Author

Looks good!

wdyt about keeping the code consistent and creating classmethod in SubstrateMixin:

class SubstrateMixin:
...
    @classmethod
    def _get_metadata_call_funcion(cls, runtime: Runtime):

Then update the Async/SubstrateInterface.get_metadata_call_function call from self._get_metadata_call_function as you do now for get_metadata_call_functions?

  1. It shouldn't be a classmethod, as it doesn't utilise the class. See the other static methods in SubstrateMixin for reference.
  2. While I would like to update the get_metadata_call_function, I want to keep API consistency with py-substrate-interface for methods that exist in it. This would break the return type, and thus also necessitate a major version update.

@thewhaleking thewhaleking merged commit 3445e5f into staging Oct 23, 2025
37 checks passed
@thewhaleking thewhaleking deleted the feat/thewhaleking/add-metadata-call-function-retrieval branch October 23, 2025 19:33
@thewhaleking thewhaleking mentioned this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants