Skip to content

add origin in extension#2550

Draft
open-junius wants to merge 11 commits intodevnet-readyfrom
add-origin-ink
Draft

add origin in extension#2550
open-junius wants to merge 11 commits intodevnet-readyfrom
add-origin-ink

Conversation

@open-junius
Copy link
Copy Markdown
Contributor

Description

Add the origin in the Ink, use can choose the contract add as signed account or real origin as account

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@open-junius open-junius self-assigned this Mar 31, 2026
LandynDev added a commit to LandynDev/subtensor that referenced this pull request Apr 2, 2026
…tensions

Replace the single ProxyCall dispatcher (FunctionId 16) with 12 typed
Proxy* chain extensions (FunctionIds 34-45) that verify proxy authorization
via pallet_proxy::Proxies storage and dispatch as the delegated account.

Each handler reads an on_behalf_of AccountId, verifies the contract is an
authorized zero-delay proxy (with is_superset support for ProxyType::Any),
and dispatches the pallet call with RawOrigin::Signed(on_behalf_of).

ProxyTransferStakeV1 requires ProxyType::Transfer; all others require
ProxyType::Staking. IDs 16-19 reserved for recycle/burn, 20-33 for
Junius's Caller* variants (PR opentensor#2550).
LandynDev added a commit to LandynDev/subtensor that referenced this pull request Apr 2, 2026
…st coverage

- Renumber Proxy* FunctionIds to 16-27 (no gaps after existing IDs)
- Move verify_proxy to module-level free function (matches convert_origin
  pattern from PR opentensor#2550)
- Restructure proxy tests into nested proxy_dispatch_tests module with
  shared setup helpers and per-operation success tests
- Coverage: 5 proxy verification tests (staking, any/superset, no proxy,
  wrong type, delayed) + 8 per-operation tests covering all input shapes
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