Skip to content

Expose runtime api for runtime-specific Proxy pallet types configuration #7297

@valentunn

Description

@valentunn

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

It would be beneficial for wallets or dapps to be able to obtain the following information from the chain:

  • Whather a certain RuntimeCall passes InstanceFilter for a certain ProxyType
  • Whather one ProxyType is superset of another ProxyType

to be able to easily support "smart" proxy managment features on any Substrate chain with proxy pallet

Request

I would like to propose a new runtime api, e.g. ProxyApi with the following methods (or similar):

  1. check_permissions(call: RuntimeCall, proxyType: ProxyType) : boolean
  2. is_superset(type: ProxyType, against: ProxyType): boolean

Solution

Alternative solution would be to use already existing DryRunApi to simluate the actuall call execution, but the requested feature will provide more ergonomics compared to DryRunApi which is a general-purpose API

Are you willing to help with this request?

No.

Metadata

Metadata

Assignees

Labels

C2-good-first-issueA task for a first time contributor to become familiar with the Polkadot-SDK.I5-enhancementAn additional feature request.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions