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

Add omni account origin #3117

Merged
merged 8 commits into from
Oct 7, 2024
Merged

Add omni account origin #3117

merged 8 commits into from
Oct 7, 2024

Conversation

Kailai-Wang
Copy link
Collaborator

Context

As topic, other with two extra extrinsics:

  • dispatch_as_omni_account
  • dispatch_as_signed
// 1. to decouple `TEECallOrigin` and extrinsic that should be sent from `OmniAccount` origin only
// 2. allow other pallets to specify ensure_origin using this origin
// 3. leave room for more delicate control over OmniAccount in the future (e.g. multisig-like control)

@Kailai-Wang Kailai-Wang self-assigned this Oct 7, 2024
) -> DispatchResult {
let _ = T::TEECallOrigin::ensure_origin(origin)?;
let omni_account =
LinkedIdentityHashes::<T>::get(account_hash).ok_or(Error::<T>::IdentityNotFound)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that who sent to link_identity is the OmniAccount? So, the OmniAccount should exist before linking any account, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no - nothing changed for link_identity

LinkedIdentityHashes contains now the mapping member_account_hash <> omni-account

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean who should be the omni-account even in the current impl

@Kailai-Wang Kailai-Wang enabled auto-merge (squash) October 7, 2024 11:29
@Kailai-Wang Kailai-Wang merged commit b7842f7 into dev Oct 7, 2024
25 checks passed
@Kailai-Wang Kailai-Wang deleted the add-omni-account-origin branch October 7, 2024 12:44
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.

3 participants