[v10] Subtensor Pallet-Based GenericCall creation logic.#3136
Merged
[v10] Subtensor Pallet-Based GenericCall creation logic.#3136
Conversation
| """ | ||
|
|
||
| subtensor: Union["Subtensor", "AsyncSubtensor"] | ||
| dynamic_function: bool = False |
Contributor
There was a problem hiding this comment.
I think this is great, but how does this actually get used? Like I see it in the tests, but how does a user go about using this, or rather why is it not just enabled by default?
Collaborator
Author
There was a problem hiding this comment.
You know, I was thinking of introducing more strictness. But I like your approach too. Although I'll keep the logic of using CallBuilder.dynamic_function . There will always be users who want to control the behavior themselves.
ibraheem-abe
approved these changes
Nov 10, 2025
This was referenced Nov 25, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR introduces a new pallet-based architecture for creating
GenericCallobjects without immediate submission. This is an intermediate step toward full Proxy pallet support, which requires the ability to compose nested calls where oneGenericCallis passed as a parameter to another.Changes
CallBuilderbase class: Provides a unified interface for creatingGenericCallinstances from any Subtensor pallet.Balances,Crowdloan,Sudo,SubtensorModule,Swap, andCommitments.SubtensorandAsyncSubtensorinstances.transferandstart_callextrinsics to use the new pallet architecture.Benefits
GenericCallobjects can be created once and reused for fee estimation, submission, or nesting in other calls.Union[GenericCall, Awaitable[GenericCall]]based on the subtensor type.CallBuilder.Example Usage
Create a sync call without submitting
Create a async call without submitting
Use for fee estimation
Submit the call
Nest calls (preparation for Proxy support)
Dynamic call creation within defined pallet class
Dynamic call creation without defined pallet class
Testing