Skip to content

Commit

Permalink
Added stellar module with issuer definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelarja committed Jul 6, 2023
1 parent c34634e commit 7f45510
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions runtime/common/src/stellar.rs
Original file line number Diff line number Diff line change
@@ -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,
];
16 changes: 1 addition & 15 deletions runtime/common/src/zenlink.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 7f45510

Please sign in to comment.