-
Notifications
You must be signed in to change notification settings - Fork 19
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
One-time command to upload the current idgraph to parachain #3131
Merged
Kailai-Wang
merged 23 commits into
dev
from
p-1085-one-time-command-to-upload-the-current-idgraph-to-parachain
Oct 18, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e554a3a
relocate aes key
Kailai-Wang 0f19b99
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 129151e
add skeleton
Kailai-Wang 379d48b
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang ec90ce9
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 35dfd18
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 85fb0c2
Merge remote-tracking branch 'origin/dev' into p-1085-one-time-comman…
Kailai-Wang b08e3a6
small update
Kailai-Wang ee727a2
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 5ac2aa2
init
Kailai-Wang 6724c09
add cli
Kailai-Wang f4b20f0
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang e6a50e4
fix param parsing
Kailai-Wang 5f0b304
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 743c9ef
update lockfile
Kailai-Wang 1a40f8d
fix bug
Kailai-Wang 8a58ae8
use subcommand
Kailai-Wang 7080748
remove rpc
Kailai-Wang 5e9e76b
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang 39eab06
fix clippy
Kailai-Wang f7cffaa
fix clippy
Kailai-Wang 97780d0
Merge branch 'dev' into p-1085-one-time-command-to-upload-the-current…
Kailai-Wang cc6d450
fix test
Kailai-Wang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
45 changes: 45 additions & 0 deletions
45
tee-worker/common/core-primitives/node-api/metadata/src/pallet_omni_account.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2020-2024 Trust Computing GmbH. | ||
// This file is part of Litentry. | ||
// | ||
// Litentry is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Litentry is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Litentry. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// TODO: maybe use macros to simplify this | ||
use crate::{error::Result, NodeMetadata}; | ||
|
||
const OMNIACCOUNT: &str = "OmniAccount"; | ||
|
||
pub trait OmniAccountCallIndexes { | ||
fn dispatch_as_omni_account_call_indexes(&self) -> Result<[u8; 2]>; | ||
fn dispatch_as_signed_call_indexes(&self) -> Result<[u8; 2]>; | ||
fn create_account_store_call_indexes(&self) -> Result<[u8; 2]>; | ||
fn update_account_store_by_one_call_indexes(&self) -> Result<[u8; 2]>; | ||
} | ||
|
||
impl OmniAccountCallIndexes for NodeMetadata { | ||
fn dispatch_as_omni_account_call_indexes(&self) -> Result<[u8; 2]> { | ||
self.call_indexes(OMNIACCOUNT, "dispatch_as_omni_account") | ||
} | ||
|
||
fn dispatch_as_signed_call_indexes(&self) -> Result<[u8; 2]> { | ||
self.call_indexes(OMNIACCOUNT, "dispatch_as_signed") | ||
} | ||
|
||
fn create_account_store_call_indexes(&self) -> Result<[u8; 2]> { | ||
self.call_indexes(OMNIACCOUNT, "create_account_store") | ||
} | ||
|
||
fn update_account_store_by_one_call_indexes(&self) -> Result<[u8; 2]> { | ||
self.call_indexes(OMNIACCOUNT, "update_account_store_by_one") | ||
} | ||
} |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also noticed it missing but in my case I had to:
https://github.com/litentry/litentry-parachain/pull/3132/files#diff-960f61f16faf996e829d1decb06b54fb404525cc02cdc585b9e8db86d596014dR344
Otherwise all extrinsincs signed by newly generated account were rejected (low funds)