Skip to content

Commit

Permalink
mandala deployment (#1713)
Browse files Browse the repository at this point in the history
* mandala deployment

* Update runtime/mandala/src/lib.rs

Co-authored-by: Xiliang Chen <[email protected]>

* address code review comments

* Update runtime/karura/src/lib.rs

Co-authored-by: Xiliang Chen <[email protected]>

Co-authored-by: Frank Yin <Test Account>
Co-authored-by: Xiliang Chen <[email protected]>
  • Loading branch information
Frank Yin and xlc authored Dec 20, 2021
1 parent 97bbcdb commit 8beb6f8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions primitives/src/currency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ create_currency_id! {
KUSD("Karura Dollar", 12) = 129,
KSM("Kusama", 12) = 130,
LKSM("Liquid KSM", 12) = 131,
TAI("Taiga", 12) = 132,
// 148 - 167: External tokens (e.g. bridged)
// 149: Reserved for renBTC
// 150: Reserved for CASH
Expand Down
1 change: 1 addition & 0 deletions runtime/acala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ parameter_type_with_key! {
TokenSymbol::ACA |
TokenSymbol::KBTC |
TokenSymbol::KINT |
TokenSymbol::TAI |
TokenSymbol::CASH => Balance::max_value() // unsupported
},
CurrencyId::DexShare(dex_share_0, _) => {
Expand Down
4 changes: 2 additions & 2 deletions runtime/integration-tests/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ mod mandala_only_tests {

// tips = 0
// operational extrinsic
let call = Call::Sudo(pallet_sudo::Call::sudo { call: Box::new(module_emergency_shutdown::Call::emergency_shutdown { }.into()) });
let call = Call::Sudo(pallet_sudo::Call::sudo { call: Box::new(module_emergency_shutdown::Call::open_collateral_refund { }.into()) });
let bytes = UncheckedExtrinsic::new(call.clone().into(), None).expect("This should not fail").encode();

assert_eq!(
Expand All @@ -403,7 +403,7 @@ mod mandala_only_tests {
bytes.len()
),
Ok(ValidTransaction {
priority: 43_824_742_400_000_000,
priority: 64_296_718_080_000_000,
requires: vec![],
provides: vec![],
longevity: 18_446_744_073_709_551_615,
Expand Down
1 change: 1 addition & 0 deletions runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ parameter_type_with_key! {
TokenSymbol::DOT |
TokenSymbol::LDOT |
TokenSymbol::RENBTC |
TokenSymbol::TAI |
TokenSymbol::KAR |
TokenSymbol::CASH => Balance::max_value() // unsupported
},
Expand Down
8 changes: 4 additions & 4 deletions runtime/mandala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,15 +780,15 @@ parameter_type_with_key! {
TokenSymbol::BNC => 800 * millicent(*currency_id), // 80BNC = 1KSM
TokenSymbol::VSKSM => 10 * millicent(*currency_id), // 1VSKSM = 1KSM
TokenSymbol::PHA => 4000 * millicent(*currency_id), // 400PHA = 1KSM

TokenSymbol::KAR |
TokenSymbol::KUSD |
TokenSymbol::KSM |
TokenSymbol::LKSM |
TokenSymbol::RENBTC |
TokenSymbol::ACA |
TokenSymbol::KINT |
TokenSymbol::KBTC |
TokenSymbol::TAI => 10 * millicent(*currency_id),
TokenSymbol::ACA |
TokenSymbol::KAR |
TokenSymbol::CASH => Balance::max_value() // unsupported
},
CurrencyId::DexShare(dex_share_0, _) => {
Expand Down Expand Up @@ -1022,7 +1022,7 @@ where
}

parameter_types! {
pub CollateralCurrencyIds: Vec<CurrencyId> = vec![DOT, LDOT, RENBTC];
pub CollateralCurrencyIds: Vec<CurrencyId> = vec![DOT, LDOT, RENBTC, CurrencyId::StableAssetPoolToken(0)];
pub DefaultLiquidationRatio: Ratio = Ratio::saturating_from_rational(110, 100);
pub DefaultDebitExchangeRate: ExchangeRate = ExchangeRate::saturating_from_rational(1, 10);
pub DefaultLiquidationPenalty: Rate = Rate::saturating_from_rational(5, 100);
Expand Down

0 comments on commit 8beb6f8

Please sign in to comment.