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

Updated pallet name in thea-connector #727

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion clients/thea/src/connector/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ pub struct ParachainClient {
api: OnlineClient<PolkadotConfig>,
}

const PALLET_NAME: &str = "TheaHandler";
// This should not be changed unless pallet name in parachain-runtime/lib is changed.
const PALLET_NAME: &str = "TheaMessageHandler";

#[async_trait]
impl ForeignConnector for ParachainClient {
Expand Down
4 changes: 3 additions & 1 deletion primitives/thea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ sp-core = { workspace = true, default-features = false }
xcm = { workspace = true, default-features = false }
bls-primitives = {workspace= true, default-features = false}
polkadex-primitives = {workspace = true, default-features = false}
hex = { version = "0.4", default-features = false }

[features]
default = ["std"]
Expand All @@ -33,5 +34,6 @@ std = [
"sp-std/std",
"xcm/std",
"sp-runtime/std",
"polkadex-primitives/std"
"polkadex-primitives/std",
"hex/std"
]
3 changes: 3 additions & 0 deletions primitives/thea/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub mod parachain;
pub mod types;
#[cfg(test)]
mod test;

use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_std::vec::Vec;
Expand Down
15 changes: 15 additions & 0 deletions primitives/thea/src/test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use sp_core::Pair;
use sp_runtime::traits::IdentifyAccount;


#[test]
fn get_thea_public_key() {
let seed = "owner word vocal dose decline sunset battle example forget excite gentle waste//";
let idx = 3;
let thea = crate::crypto::Pair::from_string(
&(seed.to_owned() + idx.to_string().as_str() + "//thea"),
None,
)
.unwrap();
println!("public_key : {:?}", hex::encode(thea.public().into_account()));
}
Loading