diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index c94902bb6..33c92567f 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -6,6 +6,7 @@ use sp_runtime::{ }; pub mod chain_ext; +pub mod stellar; pub mod zenlink; /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. diff --git a/runtime/common/src/stellar.rs b/runtime/common/src/stellar.rs new file mode 100644 index 000000000..b32ab4ca9 --- /dev/null +++ b/runtime/common/src/stellar.rs @@ -0,0 +1,14 @@ +pub const USDC_ISSUER: [u8; 32] = [ + 59, 153, 17, 56, 14, 254, 152, 139, 160, 168, 144, 14, 177, 207, 228, 79, 54, 111, 125, 190, + 148, 107, 237, 7, 114, 64, 247, 246, 36, 223, 21, 197, +]; + +pub const BRL_ISSUER: [u8; 32] = [ + 234, 172, 104, 212, 208, 227, 123, 76, 36, 194, 83, 105, 22, 232, 48, 115, 95, 3, 45, 13, 107, + 42, 28, 143, 202, 59, 197, 162, 94, 8, 62, 58, +]; + +pub const TZS_ISSUER: [u8; 32] = [ + 52, 201, 75, 42, 75, 169, 232, 181, 123, 34, 84, 125, 203, 179, 15, 68, 60, 76, 176, 45, 163, + 130, 154, 137, 170, 27, 212, 120, 14, 68, 102, 186, +]; \ No newline at end of file diff --git a/runtime/common/src/zenlink.rs b/runtime/common/src/zenlink.rs index 2c11d0955..d9ff251db 100644 --- a/runtime/common/src/zenlink.rs +++ b/runtime/common/src/zenlink.rs @@ -1,23 +1,9 @@ use spacewalk_primitives::{Asset, CurrencyId}; +use crate::stellar::{USDC_ISSUER, TZS_ISSUER, BRL_ISSUER}; use zenlink_protocol::{LOCAL, NATIVE}; pub type ZenlinkAssetId = zenlink_protocol::AssetId; -pub const USDC_ISSUER: [u8; 32] = [ - 59, 153, 17, 56, 14, 254, 152, 139, 160, 168, 144, 14, 177, 207, 228, 79, 54, 111, 125, 190, - 148, 107, 237, 7, 114, 64, 247, 246, 36, 223, 21, 197, -]; - -pub const BRL_ISSUER: [u8; 32] = [ - 234, 172, 104, 212, 208, 227, 123, 76, 36, 194, 83, 105, 22, 232, 48, 115, 95, 3, 45, 13, 107, - 42, 28, 143, 202, 59, 197, 162, 94, 8, 62, 58, -]; - -pub const TZS_ISSUER: [u8; 32] = [ - 52, 201, 75, 42, 75, 169, 232, 181, 123, 34, 84, 125, 203, 179, 15, 68, 60, 76, 176, 45, 163, - 130, 154, 137, 170, 27, 212, 120, 14, 68, 102, 186, -]; - fn discriminant(currency: &CurrencyId) -> u8 { match currency { CurrencyId::Native => 0,