diff --git a/crates/currency/src/lib.rs b/crates/currency/src/lib.rs index 2f68bba55f..0644a00ad4 100644 --- a/crates/currency/src/lib.rs +++ b/crates/currency/src/lib.rs @@ -81,7 +81,7 @@ pub mod pallet { #[pallet::constant] type GetRelayChainCurrencyId: Get>; - /// Wrapped currency e.g. INTERBTC/KBTC + /// Wrapped currency e.g. IBTC/KBTC #[pallet::constant] type GetWrappedCurrencyId: Get>; diff --git a/crates/currency/src/mock.rs b/crates/currency/src/mock.rs index 9be45bcb58..852d0828bb 100644 --- a/crates/currency/src/mock.rs +++ b/crates/currency/src/mock.rs @@ -72,7 +72,7 @@ impl frame_system::Config for Test { parameter_types! { pub const GetNativeCurrencyId: CurrencyId = Token(INTR); pub const GetRelayChainCurrencyId: CurrencyId = Token(DOT); - pub const GetWrappedCurrencyId: CurrencyId = Token(INTERBTC); + pub const GetWrappedCurrencyId: CurrencyId = Token(IBTC); pub const MaxLocks: u32 = 50; } diff --git a/crates/fee/src/mock.rs b/crates/fee/src/mock.rs index 853d697731..2c2630feea 100644 --- a/crates/fee/src/mock.rs +++ b/crates/fee/src/mock.rs @@ -83,7 +83,7 @@ impl frame_system::Config for Test { parameter_types! { pub const GetNativeCurrencyId: CurrencyId = Token(INTR); pub const GetRelayChainCurrencyId: CurrencyId = Token(DOT); - pub const GetWrappedCurrencyId: CurrencyId = Token(INTERBTC); + pub const GetWrappedCurrencyId: CurrencyId = Token(IBTC); pub const MaxLocks: u32 = 50; } diff --git a/crates/fee/src/tests.rs b/crates/fee/src/tests.rs index 5162f7ef76..dbb8d13305 100644 --- a/crates/fee/src/tests.rs +++ b/crates/fee/src/tests.rs @@ -8,8 +8,8 @@ fn should_get_issue_fee() { run_test(|| { >::put(UnsignedFixedPoint::checked_from_rational(10, 100).unwrap()); assert_ok!( - Fee::get_issue_fee(&Amount::::new(100, Token(INTERBTC))), - Amount::::new(10, Token(INTERBTC)) + Fee::get_issue_fee(&Amount::::new(100, Token(IBTC))), + Amount::::new(10, Token(IBTC)) ); }) } diff --git a/crates/issue/src/mock.rs b/crates/issue/src/mock.rs index 8baad859d1..4cb2123ed4 100644 --- a/crates/issue/src/mock.rs +++ b/crates/issue/src/mock.rs @@ -94,7 +94,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); parameter_types! { pub const GetCollateralCurrencyId: CurrencyId = DEFAULT_COLLATERAL_CURRENCY; diff --git a/crates/nomination/src/mock.rs b/crates/nomination/src/mock.rs index 31ba7703cd..ca0d328d0f 100644 --- a/crates/nomination/src/mock.rs +++ b/crates/nomination/src/mock.rs @@ -93,7 +93,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); pub const DEFAULT_CURRENCY_PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, @@ -312,8 +312,8 @@ impl ExtBuilder { balances: vec![ (ALICE.account_id, Token(DOT), ALICE_BALANCE), (BOB.account_id, Token(DOT), BOB_BALANCE), - (ALICE.account_id, Token(INTERBTC), ALICE_BALANCE), - (BOB.account_id, Token(INTERBTC), BOB_BALANCE), + (ALICE.account_id, Token(IBTC), ALICE_BALANCE), + (BOB.account_id, Token(IBTC), BOB_BALANCE), ], }) } diff --git a/crates/oracle/src/mock.rs b/crates/oracle/src/mock.rs index 122e584e77..56ca5704a2 100644 --- a/crates/oracle/src/mock.rs +++ b/crates/oracle/src/mock.rs @@ -81,7 +81,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); parameter_types! { pub const GetCollateralCurrencyId: CurrencyId = DEFAULT_COLLATERAL_CURRENCY; diff --git a/crates/redeem/src/mock.rs b/crates/redeem/src/mock.rs index 91dc20de55..84ac4aa631 100644 --- a/crates/redeem/src/mock.rs +++ b/crates/redeem/src/mock.rs @@ -94,7 +94,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); pub const DEFAULT_CURRENCY_PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, @@ -325,9 +325,9 @@ impl ExtBuilder { (USER, Token(DOT), ALICE_BALANCE), (VAULT.account_id, Token(DOT), VAULT_BALANCE), (CAROL, Token(DOT), CAROL_BALANCE), - (USER, Token(INTERBTC), ALICE_BALANCE), - (VAULT.account_id, Token(INTERBTC), VAULT_BALANCE), - (CAROL, Token(INTERBTC), CAROL_BALANCE), + (USER, Token(IBTC), ALICE_BALANCE), + (VAULT.account_id, Token(IBTC), VAULT_BALANCE), + (CAROL, Token(IBTC), CAROL_BALANCE), ], }) } diff --git a/crates/refund/src/mock.rs b/crates/refund/src/mock.rs index 1a70793586..309f04ae27 100644 --- a/crates/refund/src/mock.rs +++ b/crates/refund/src/mock.rs @@ -102,7 +102,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); pub const DEFAULT_CURRENCY_PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, diff --git a/crates/refund/src/tests.rs b/crates/refund/src/tests.rs index 4efa0c1684..47ff28363c 100644 --- a/crates/refund/src/tests.rs +++ b/crates/refund/src/tests.rs @@ -17,7 +17,7 @@ fn dummy_merkle_proof() -> MerkleProof { } fn wrapped(amount: u128) -> Amount { - Amount::new(amount, Token(INTERBTC)) + Amount::new(amount, Token(IBTC)) } #[test] diff --git a/crates/relay/src/mock.rs b/crates/relay/src/mock.rs index 413e46f39f..45d879149a 100644 --- a/crates/relay/src/mock.rs +++ b/crates/relay/src/mock.rs @@ -97,7 +97,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); pub const DEFAULT_CURRENCY_PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, diff --git a/crates/replace/src/mock.rs b/crates/replace/src/mock.rs index 9b5b5035e9..f7bc32300d 100644 --- a/crates/replace/src/mock.rs +++ b/crates/replace/src/mock.rs @@ -94,7 +94,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); parameter_types! { pub const GetCollateralCurrencyId: CurrencyId = DEFAULT_COLLATERAL_CURRENCY; diff --git a/crates/reward/src/mock.rs b/crates/reward/src/mock.rs index 00f09c10ab..436665decb 100644 --- a/crates/reward/src/mock.rs +++ b/crates/reward/src/mock.rs @@ -63,7 +63,7 @@ impl frame_system::Config for Test { parameter_types! { pub const GetNativeCurrencyId: CurrencyId = Token(INTR); - pub const GetWrappedCurrencyId: CurrencyId = Token(INTERBTC); + pub const GetWrappedCurrencyId: CurrencyId = Token(IBTC); } impl Config for Test { diff --git a/crates/reward/src/tests.rs b/crates/reward/src/tests.rs index a7827a49fa..9828266988 100644 --- a/crates/reward/src/tests.rs +++ b/crates/reward/src/tests.rs @@ -16,9 +16,9 @@ fn should_distribute_rewards_equally() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(50))); assert_ok!(Reward::deposit_stake(&BOB, fixed!(50))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(100))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 50); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &BOB), 50); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(100))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 50); + assert_ok!(Reward::compute_reward(Token(IBTC), &BOB), 50); }) } @@ -27,9 +27,9 @@ fn should_distribute_uneven_rewards_equally() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(50))); assert_ok!(Reward::deposit_stake(&BOB, fixed!(50))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(451))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 225); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &BOB), 225); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(451))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 225); + assert_ok!(Reward::compute_reward(Token(IBTC), &BOB), 225); }) } @@ -37,12 +37,12 @@ fn should_distribute_uneven_rewards_equally() { fn should_not_update_previous_rewards() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(40))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(1000))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 1000); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(1000))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 1000); assert_ok!(Reward::deposit_stake(&BOB, fixed!(20))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 1000); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &BOB), 0); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 1000); + assert_ok!(Reward::compute_reward(Token(IBTC), &BOB), 0); }) } @@ -51,10 +51,10 @@ fn should_withdraw_reward() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(45))); assert_ok!(Reward::deposit_stake(&BOB, fixed!(55))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(2344))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &BOB), 1289); - assert_ok!(Reward::withdraw_reward(&ALICE, Token(INTERBTC)), 1054); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &BOB), 1289); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(2344))); + assert_ok!(Reward::compute_reward(Token(IBTC), &BOB), 1289); + assert_ok!(Reward::withdraw_reward(&ALICE, Token(IBTC)), 1054); + assert_ok!(Reward::compute_reward(Token(IBTC), &BOB), 1289); }) } @@ -62,10 +62,10 @@ fn should_withdraw_reward() { fn should_withdraw_stake() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(1312))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(4242))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 4242); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(4242))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 4242); assert_ok!(Reward::withdraw_stake(&ALICE, fixed!(1312))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 4242); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 4242); }) } @@ -73,8 +73,8 @@ fn should_withdraw_stake() { fn should_not_withdraw_stake_if_balance_insufficient() { run_test(|| { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(100))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(2000))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 2000); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(2000))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 2000); assert_err!( Reward::withdraw_stake(&ALICE, fixed!(200)), TestError::InsufficientFunds @@ -89,8 +89,8 @@ fn should_deposit_stake() { assert_ok!(Reward::deposit_stake(&ALICE, fixed!(25))); assert_eq!(Reward::stake(&ALICE), fixed!(50)); assert_ok!(Reward::deposit_stake(&BOB, fixed!(50))); - assert_ok!(Reward::distribute_reward(Token(INTERBTC), fixed!(1000))); - assert_ok!(Reward::compute_reward(Token(INTERBTC), &ALICE), 500); + assert_ok!(Reward::distribute_reward(Token(IBTC), fixed!(1000))); + assert_ok!(Reward::compute_reward(Token(IBTC), &ALICE), 500); }) } @@ -98,10 +98,10 @@ fn should_deposit_stake() { fn should_not_distribute_rewards_without_stake() { run_test(|| { assert_err!( - Reward::distribute_reward(Token(INTERBTC), fixed!(1000)), + Reward::distribute_reward(Token(IBTC), fixed!(1000)), TestError::ZeroTotalStake ); - assert_eq!(Reward::total_rewards(Token(INTERBTC)), fixed!(0)); + assert_eq!(Reward::total_rewards(Token(IBTC)), fixed!(0)); }) } @@ -115,13 +115,13 @@ fn should_distribute_with_many_rewards() { for _ in 0..30 { // NOTE: this will overflow compute_reward with > u32 assert_ok!(Reward::distribute_reward( - Token(INTERBTC), + Token(IBTC), fixed!(rng.gen::() as i128) )); } - let alice_reward = Reward::compute_reward(Token(INTERBTC), &ALICE).unwrap(); - assert_ok!(Reward::withdraw_reward(&ALICE, Token(INTERBTC)), alice_reward); - let bob_reward = Reward::compute_reward(Token(INTERBTC), &BOB).unwrap(); - assert_ok!(Reward::withdraw_reward(&BOB, Token(INTERBTC)), bob_reward); + let alice_reward = Reward::compute_reward(Token(IBTC), &ALICE).unwrap(); + assert_ok!(Reward::withdraw_reward(&ALICE, Token(IBTC)), alice_reward); + let bob_reward = Reward::compute_reward(Token(IBTC), &BOB).unwrap(); + assert_ok!(Reward::withdraw_reward(&BOB, Token(IBTC)), bob_reward); }) } diff --git a/crates/staking/src/mock.rs b/crates/staking/src/mock.rs index 390663fc96..40e84014fd 100644 --- a/crates/staking/src/mock.rs +++ b/crates/staking/src/mock.rs @@ -82,21 +82,21 @@ pub const VAULT: VaultId = VaultId { account_id: 1, currencies: VaultCurrencyPair { collateral: Token(DOT), - wrapped: Token(INTERBTC), + wrapped: Token(IBTC), }, }; pub const ALICE: VaultId = VaultId { account_id: 2, currencies: VaultCurrencyPair { collateral: Token(DOT), - wrapped: Token(INTERBTC), + wrapped: Token(IBTC), }, }; pub const BOB: VaultId = VaultId { account_id: 3, currencies: VaultCurrencyPair { collateral: Token(DOT), - wrapped: Token(INTERBTC), + wrapped: Token(IBTC), }, }; diff --git a/crates/staking/src/tests.rs b/crates/staking/src/tests.rs index de4e700b92..53930d084d 100644 --- a/crates/staking/src/tests.rs +++ b/crates/staking/src/tests.rs @@ -15,14 +15,14 @@ fn should_stake_and_earn_rewards() { run_test(|| { assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(50))); assert_ok!(Staking::deposit_stake(&VAULT, &BOB.account_id, fixed!(50))); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(100))); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), 50); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &BOB.account_id), 50); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(20))); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(100))); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 50); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &BOB.account_id), 50); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(20))); assert_ok!(Staking::compute_stake(&VAULT, &ALICE.account_id), 40); assert_ok!(Staking::compute_stake(&VAULT, &BOB.account_id), 40); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), 50); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &BOB.account_id), 50); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 50); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &BOB.account_id), 50); }) } @@ -32,21 +32,21 @@ fn should_stake_and_distribute_and_withdraw() { assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(10000))); assert_ok!(Staking::deposit_stake(&VAULT, &BOB.account_id, fixed!(10000))); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(1000))); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), 500); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &BOB.account_id), 500); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(1000))); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 500); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &BOB.account_id), 500); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(50))); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(50))); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(50))); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(50))); assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(1000))); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(1000))); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(1000))); assert_ok!( - Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 1023 ); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &BOB.account_id), 976); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &BOB.account_id), 976); assert_ok!(Staking::withdraw_stake(&VAULT, &ALICE.account_id, fixed!(10000), None)); assert_ok!(Staking::compute_stake(&VAULT, &ALICE.account_id), 950); @@ -57,16 +57,16 @@ fn should_stake_and_distribute_and_withdraw() { assert_ok!(Staking::deposit_stake(&VAULT, &BOB.account_id, fixed!(10000))); assert_ok!(Staking::compute_stake(&VAULT, &BOB.account_id), 19950); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(1000))); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(10000))); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(1000))); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(10000))); assert_ok!(Staking::compute_stake(&VAULT, &BOB.account_id), 9949); assert_ok!( - Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 1023 ); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &BOB.account_id), 1975); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &BOB.account_id), 1975); }) } @@ -74,13 +74,13 @@ fn should_stake_and_distribute_and_withdraw() { fn should_stake_and_withdraw_rewards() { run_test(|| { assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(100))); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(100))); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), 100); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(100))); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 100); assert_ok!( - Staking::withdraw_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::withdraw_reward(Token(IBTC), &VAULT, &ALICE.account_id), 100 ); - assert_ok!(Staking::compute_reward(Token(INTERBTC), &VAULT, &ALICE.account_id), 0); + assert_ok!(Staking::compute_reward(Token(IBTC), &VAULT, &ALICE.account_id), 0); }) } @@ -101,7 +101,7 @@ fn should_not_withdraw_stake_if_balance_insufficient_after_slashing() { run_test(|| { assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(100))); assert_ok!(Staking::compute_stake(&VAULT, &ALICE.account_id), 100); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(100))); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(100))); assert_ok!(Staking::compute_stake(&VAULT, &ALICE.account_id), 0); assert_err!( Staking::withdraw_stake(&VAULT, &ALICE.account_id, fixed!(100), None), @@ -116,22 +116,22 @@ fn should_force_refund() { let mut nonce = Staking::nonce(&VAULT); assert_ok!(Staking::deposit_stake(&VAULT, &VAULT.account_id, fixed!(100))); assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(100))); - assert_ok!(Staking::slash_stake(Token(INTERBTC), &VAULT, fixed!(100))); + assert_ok!(Staking::slash_stake(Token(IBTC), &VAULT, fixed!(100))); assert_ok!(Staking::deposit_stake(&VAULT, &VAULT.account_id, fixed!(100))); assert_ok!(Staking::deposit_stake(&VAULT, &ALICE.account_id, fixed!(10))); - assert_ok!(Staking::distribute_reward(Token(INTERBTC), &VAULT, fixed!(100))); + assert_ok!(Staking::distribute_reward(Token(IBTC), &VAULT, fixed!(100))); // vault stake & rewards pre-refund assert_ok!(Staking::compute_stake_at_index(nonce, &VAULT, &VAULT.account_id), 150); assert_ok!( - Staking::compute_reward_at_index(nonce, Token(INTERBTC), &VAULT, &VAULT.account_id), + Staking::compute_reward_at_index(nonce, Token(IBTC), &VAULT, &VAULT.account_id), 71 ); // alice stake & rewards pre-refund assert_ok!(Staking::compute_stake_at_index(nonce, &VAULT, &ALICE.account_id), 60); assert_ok!( - Staking::compute_reward_at_index(nonce, Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::compute_reward_at_index(nonce, Token(IBTC), &VAULT, &ALICE.account_id), 28 ); @@ -142,19 +142,19 @@ fn should_force_refund() { // vault stake & rewards post-refund assert_ok!(Staking::compute_stake_at_index(nonce, &VAULT, &VAULT.account_id), 150); assert_ok!( - Staking::compute_reward_at_index(nonce, Token(INTERBTC), &VAULT, &VAULT.account_id), + Staking::compute_reward_at_index(nonce, Token(IBTC), &VAULT, &VAULT.account_id), 0 ); assert_ok!( - Staking::compute_reward_at_index(nonce - 1, Token(INTERBTC), &VAULT, &VAULT.account_id), + Staking::compute_reward_at_index(nonce - 1, Token(IBTC), &VAULT, &VAULT.account_id), 71 ); // alice stake & rewards post-refund assert_ok!(Staking::compute_stake_at_index(nonce, &VAULT, &ALICE.account_id), 0); assert_ok!( - Staking::compute_reward_at_index(nonce, Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::compute_reward_at_index(nonce, Token(IBTC), &VAULT, &ALICE.account_id), 0 ); @@ -163,7 +163,7 @@ fn should_force_refund() { 60 ); assert_ok!( - Staking::compute_reward_at_index(nonce - 1, Token(INTERBTC), &VAULT, &ALICE.account_id), + Staking::compute_reward_at_index(nonce - 1, Token(IBTC), &VAULT, &ALICE.account_id), 28 ); }) @@ -181,7 +181,7 @@ fn should_compute_stake_after_adjustments() { fixed!(1152923504604516976) )); assert_ok!(Staking::slash_stake( - Token(INTERBTC), + Token(IBTC), &VAULT, fixed!(1152923504604516976 + 100) )); @@ -194,7 +194,7 @@ fn should_compute_stake_after_adjustments() { fixed!(1152924504603286976) )); assert_ok!(Staking::slash_stake( - Token(INTERBTC), + Token(IBTC), &VAULT, fixed!(1152924504603286976 + 1_000_000) )); diff --git a/crates/vault-registry/src/mock.rs b/crates/vault-registry/src/mock.rs index f64d3c9abd..a53d3f16f1 100644 --- a/crates/vault-registry/src/mock.rs +++ b/crates/vault-registry/src/mock.rs @@ -89,7 +89,7 @@ impl frame_system::Config for Test { pub const DEFAULT_COLLATERAL_CURRENCY: CurrencyId = Token(DOT); pub const DEFAULT_NATIVE_CURRENCY: CurrencyId = Token(INTR); -pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: CurrencyId = Token(IBTC); pub const DEFAULT_CURRENCY_PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, diff --git a/crates/vault-registry/src/tests.rs b/crates/vault-registry/src/tests.rs index c6b2267ce2..586f8b87d4 100644 --- a/crates/vault-registry/src/tests.rs +++ b/crates/vault-registry/src/tests.rs @@ -60,7 +60,7 @@ fn convert_with_exchange_rate( exchange_rate: u128, ) -> impl Fn(CurrencyId, Amount) -> MockResult<(CurrencyId, Amount), Result, DispatchError>> { move |currency_id, amount| { - let amount = if currency_id == Token(INTERBTC) { + let amount = if currency_id == Token(IBTC) { Amount::new(amount.amount() / exchange_rate, currency_id) } else { Amount::new(amount.amount() * exchange_rate, currency_id) diff --git a/parachain/res/interlay.json b/parachain/res/interlay.json index 17436ea6d4..5ff254e5b6 100644 --- a/parachain/res/interlay.json +++ b/parachain/res/interlay.json @@ -24,7 +24,7 @@ ], "tokenSymbol": [ "INTR", - "INTERBTC", + "IBTC", "DOT", "KINT", "KBTC", diff --git a/parachain/res/kintsugi.json b/parachain/res/kintsugi.json index 421ba08bff..410e0ca70d 100644 --- a/parachain/res/kintsugi.json +++ b/parachain/res/kintsugi.json @@ -29,7 +29,7 @@ "KBTC", "KSM", "INTR", - "INTERBTC", + "IBTC", "DOT" ] }, diff --git a/parachain/res/testnet.json b/parachain/res/testnet.json index 7e8655b97b..04b9b71a3e 100644 --- a/parachain/res/testnet.json +++ b/parachain/res/testnet.json @@ -18,7 +18,7 @@ ], "tokenSymbol": [ "DOT", - "INTERBTC", + "IBTC", "INTR", "KSM", "KBTC", diff --git a/parachain/runtime/interlay/src/lib.rs b/parachain/runtime/interlay/src/lib.rs index c05324cbf7..6c3b7f1e6d 100644 --- a/parachain/runtime/interlay/src/lib.rs +++ b/parachain/runtime/interlay/src/lib.rs @@ -60,7 +60,7 @@ pub use security::StatusCode; pub use primitives::{ self, AccountId, Balance, BlockNumber, CurrencyId, CurrencyId::Token, CurrencyInfo, Hash, Moment, Nonce, Signature, - SignedFixedPoint, SignedInner, UnsignedFixedPoint, UnsignedInner, DOT, INTERBTC, INTR, + SignedFixedPoint, SignedInner, UnsignedFixedPoint, UnsignedInner, DOT, IBTC, INTR, }; // XCM imports @@ -885,7 +885,7 @@ impl btc_relay::Config for Runtime { const NATIVE_CURRENCY_ID: CurrencyId = Token(INTR); const PARENT_CURRENCY_ID: CurrencyId = Token(DOT); -const WRAPPED_CURRENCY_ID: CurrencyId = Token(INTERBTC); +const WRAPPED_CURRENCY_ID: CurrencyId = Token(IBTC); parameter_types! { pub const GetNativeCurrencyId: CurrencyId = NATIVE_CURRENCY_ID; diff --git a/parachain/src/chain_spec.rs b/parachain/src/chain_spec.rs index f4d4dae380..3cd634c80f 100644 --- a/parachain/src/chain_spec.rs +++ b/parachain/src/chain_spec.rs @@ -3,7 +3,7 @@ use cumulus_primitives_core::ParaId; use hex_literal::hex; use interbtc_rpc::jsonrpc_core::serde_json::{map::Map, Value}; use primitives::{ - AccountId, Balance, CurrencyId, CurrencyId::Token, CurrencyInfo, Signature, VaultCurrencyPair, DOT, INTERBTC, INTR, + AccountId, Balance, CurrencyId, CurrencyId::Token, CurrencyInfo, Signature, VaultCurrencyPair, DOT, IBTC, INTR, KBTC, KINT, KSM, }; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; @@ -102,7 +102,7 @@ fn testnet_properties() -> Map { let mut properties = Map::new(); let mut token_symbol: Vec = vec![]; let mut token_decimals: Vec = vec![]; - [KINT, KBTC, KSM, INTR, INTERBTC, DOT].iter().for_each(|token| { + [KINT, KBTC, KSM, INTR, IBTC, DOT].iter().for_each(|token| { token_symbol.push(token.symbol().to_string()); token_decimals.push(token.decimals() as u32); }); @@ -116,7 +116,7 @@ fn kintsugi_properties() -> Map { let mut properties = Map::new(); let mut token_symbol: Vec = vec![]; let mut token_decimals: Vec = vec![]; - [KINT, KBTC, KSM, INTR, INTERBTC, DOT].iter().for_each(|token| { + [KINT, KBTC, KSM, INTR, IBTC, DOT].iter().for_each(|token| { token_symbol.push(token.symbol().to_string()); token_decimals.push(token.decimals() as u32); }); @@ -130,7 +130,7 @@ fn interlay_properties() -> Map { let mut properties = Map::new(); let mut token_symbol: Vec = vec![]; let mut token_decimals: Vec = vec![]; - [INTR, INTERBTC, DOT, KINT, KBTC, KSM].iter().for_each(|token| { + [INTR, IBTC, DOT, KINT, KBTC, KSM].iter().for_each(|token| { token_symbol.push(token.symbol().to_string()); token_decimals.push(token.decimals() as u32); }); diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 01aa8a739e..fb72a5a513 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -472,7 +472,7 @@ create_currency_id! { #[repr(u8)] pub enum TokenSymbol { DOT("Polkadot", 10) = 0, - INTERBTC("interBTC", 8) = 1, + IBTC("interBTC", 8) = 1, INTR("Interlay", 10) = 2, KSM("Kusama", 12) = 10, diff --git a/standalone/res/testnet.json b/standalone/res/testnet.json index 5bba800d34..15a9b14870 100644 --- a/standalone/res/testnet.json +++ b/standalone/res/testnet.json @@ -20,7 +20,7 @@ ], "tokenSymbol": [ "DOT", - "INTERBTC", + "IBTC", "INTR", "KSM", "KBTC", diff --git a/standalone/runtime/src/lib.rs b/standalone/runtime/src/lib.rs index 677e748484..b6476d7c26 100644 --- a/standalone/runtime/src/lib.rs +++ b/standalone/runtime/src/lib.rs @@ -59,8 +59,7 @@ pub use security::StatusCode; pub use primitives::{ self, AccountId, Balance, BlockNumber, CurrencyId, CurrencyId::Token, CurrencyInfo, Hash, Moment, Nonce, Signature, - SignedFixedPoint, SignedInner, TokenSymbol, UnsignedFixedPoint, UnsignedInner, DOT, INTERBTC, INTR, KBTC, KINT, - KSM, + SignedFixedPoint, SignedInner, TokenSymbol, UnsignedFixedPoint, UnsignedInner, DOT, IBTC, INTR, KBTC, KINT, KSM, }; type VaultId = primitives::VaultId; @@ -546,7 +545,7 @@ impl btc_relay::Config for Runtime { const NATIVE_CURRENCY_ID: CurrencyId = Token(INTR); const PARENT_CURRENCY_ID: CurrencyId = Token(DOT); -const WRAPPED_CURRENCY_ID: CurrencyId = Token(INTERBTC); +const WRAPPED_CURRENCY_ID: CurrencyId = Token(IBTC); parameter_types! { pub const GetNativeCurrencyId: CurrencyId = NATIVE_CURRENCY_ID; diff --git a/standalone/runtime/tests/mock/mod.rs b/standalone/runtime/tests/mock/mod.rs index 1d630175c3..9d1edc42b2 100644 --- a/standalone/runtime/tests/mock/mod.rs +++ b/standalone/runtime/tests/mock/mod.rs @@ -22,7 +22,7 @@ pub use interbtc_runtime_standalone::{ pub use mocktopus::mocking::*; pub use orml_tokens::CurrencyAdapter; pub use primitives::{ - CurrencyId::Token, VaultCurrencyPair, VaultId as PrimitiveVaultId, DOT, INTERBTC, INTR, KBTC, KINT, KSM, + CurrencyId::Token, VaultCurrencyPair, VaultId as PrimitiveVaultId, DOT, IBTC, INTR, KBTC, KINT, KSM, }; use redeem::RedeemRequestStatus; use staking::DefaultVaultCurrencyPair; @@ -184,7 +184,7 @@ pub type SchedulerCall = pallet_scheduler::Call; pub type SchedulerPallet = pallet_scheduler::Pallet; pub const DEFAULT_COLLATERAL_CURRENCY: ::CurrencyId = Token(DOT); -pub const DEFAULT_WRAPPED_CURRENCY: ::CurrencyId = Token(INTERBTC); +pub const DEFAULT_WRAPPED_CURRENCY: ::CurrencyId = Token(IBTC); pub const DEFAULT_NATIVE_CURRENCY: ::CurrencyId = Token(INTR); pub const DEFAULT_GRIEFING_CURRENCY: ::CurrencyId = DEFAULT_NATIVE_CURRENCY; @@ -352,7 +352,7 @@ pub fn iter_native_currencies() -> impl Iterator { } pub fn iter_wrapped_currencies() -> impl Iterator { - vec![Token(INTERBTC), Token(KBTC)].into_iter() + vec![Token(IBTC), Token(KBTC)].into_iter() } pub fn iter_all_currencies() -> impl Iterator { diff --git a/standalone/runtime/tests/test_fee_pool.rs b/standalone/runtime/tests/test_fee_pool.rs index 4ac6b24400..3917d2ac7e 100644 --- a/standalone/runtime/tests/test_fee_pool.rs +++ b/standalone/runtime/tests/test_fee_pool.rs @@ -72,7 +72,7 @@ fn withdraw_local_pool_rewards(vault_id: &VaultId, nominator_id: &AccountId) -> } fn get_vault_global_pool_rewards(vault_id: &VaultId) -> i128 { - VaultRewardsPallet::compute_reward(Token(INTERBTC), vault_id).unwrap() + VaultRewardsPallet::compute_reward(Token(IBTC), vault_id).unwrap() } fn get_local_pool_rewards(vault_id: &VaultId, nominator_id: &AccountId) -> i128 { diff --git a/standalone/runtime/tests/test_issue.rs b/standalone/runtime/tests/test_issue.rs index 6f6987f372..b709173134 100644 --- a/standalone/runtime/tests/test_issue.rs +++ b/standalone/runtime/tests/test_issue.rs @@ -12,7 +12,7 @@ fn test_with(execute: impl Fn(VaultId) -> R) { for currency_id in iter_collateral_currencies() { assert_ok!(OraclePallet::_set_exchange_rate(currency_id, FixedU128::one())); } - if wrapped_id != Token(INTERBTC) { + if wrapped_id != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_id, FixedU128::one())); } UserData::force_to(USER, default_user_state()); @@ -23,8 +23,8 @@ fn test_with(execute: impl Fn(VaultId) -> R) { }); }; test_with(Token(DOT), Token(KBTC)); - test_with(Token(KSM), Token(INTERBTC)); - test_with(Token(DOT), Token(INTERBTC)); + test_with(Token(KSM), Token(IBTC)); + test_with(Token(DOT), Token(IBTC)); } fn test_with_initialized_vault(execute: impl Fn(VaultId) -> R) { diff --git a/standalone/runtime/tests/test_nomination.rs b/standalone/runtime/tests/test_nomination.rs index 42fb4dbd1a..97acd51f38 100644 --- a/standalone/runtime/tests/test_nomination.rs +++ b/standalone/runtime/tests/test_nomination.rs @@ -12,7 +12,7 @@ fn test_with(execute: impl Fn(VaultId) -> R) { for currency_id in iter_collateral_currencies() { assert_ok!(OraclePallet::_set_exchange_rate(currency_id, FixedU128::one())); } - if wrapped_id != Token(INTERBTC) { + if wrapped_id != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_id, FixedU128::one())); } UserData::force_to(USER, default_user_state()); @@ -24,8 +24,8 @@ fn test_with(execute: impl Fn(VaultId) -> R) { }); }; test_with(Token(DOT), Token(KBTC)); - test_with(Token(KSM), Token(INTERBTC)); - test_with(Token(DOT), Token(INTERBTC)); + test_with(Token(KSM), Token(IBTC)); + test_with(Token(DOT), Token(IBTC)); } fn test_with_nomination_enabled(execute: impl Fn(VaultId) -> R) { @@ -174,8 +174,8 @@ mod spec_based_tests { // - `get_total_nominated_collateral(vault_id)` must return zero. // - For all nominators, `get_nominator_collateral(vault_id, user_id)` must return zero. // - Staking pallet `nonce` must be incremented by one. - // - `compute_reward_at_index(nonce - 1, Token(INTERBTC), vault_id, user_id)` in the Staking pallet must be - // equal to the user’s nomination just before the vault opted out. + // - `compute_reward_at_index(nonce - 1, Token(IBTC), vault_id, user_id)` in the Staking pallet must be equal + // to the user’s nomination just before the vault opted out. test_with_nomination_enabled_and_vault_opted_in(|vault_id| { assert_nominate_collateral(&vault_id, account_of(USER), default_nomination(&vault_id)); assert_eq!( diff --git a/standalone/runtime/tests/test_redeem.rs b/standalone/runtime/tests/test_redeem.rs index 90dcd86256..0a09e05fc2 100644 --- a/standalone/runtime/tests/test_redeem.rs +++ b/standalone/runtime/tests/test_redeem.rs @@ -11,7 +11,7 @@ fn test_with(execute: impl Fn(VaultId) -> R) { let vault_id = PrimitiveVaultId::new(account_of(VAULT), collateral_id, wrapped_id); SecurityPallet::set_active_block_number(1); assert_ok!(OraclePallet::_set_exchange_rate(collateral_id, FixedU128::one())); - if wrapped_id != Token(INTERBTC) { + if wrapped_id != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_id, FixedU128::one())); } set_default_thresholds(); @@ -34,9 +34,9 @@ fn test_with(execute: impl Fn(VaultId) -> R) { }; test_with(Token(DOT), Token(KBTC), None); - test_with(Token(DOT), Token(INTERBTC), None); - test_with(Token(DOT), Token(INTERBTC), Some(Token(KSM))); - test_with(Token(KSM), Token(INTERBTC), None); + test_with(Token(DOT), Token(IBTC), None); + test_with(Token(DOT), Token(IBTC), Some(Token(KSM))); + test_with(Token(KSM), Token(IBTC), None); } /// to-be-replaced & replace_collateral are decreased in request_redeem @@ -1167,7 +1167,7 @@ mod spec_based_tests { currency_pair: VaultCurrencyPair { collateral: vault_id.currencies.collateral, wrapped: if vault_id.currencies.wrapped == Token(DOT) { - Token(INTERBTC) + Token(IBTC) } else { Token(DOT) }, diff --git a/standalone/runtime/tests/test_refund.rs b/standalone/runtime/tests/test_refund.rs index e31bac479b..a962de4eee 100644 --- a/standalone/runtime/tests/test_refund.rs +++ b/standalone/runtime/tests/test_refund.rs @@ -11,7 +11,7 @@ fn test_with(execute: impl Fn(VaultId) -> R) { for currency_id in iter_collateral_currencies() { assert_ok!(OraclePallet::_set_exchange_rate(currency_id, FixedU128::one())); } - if wrapped_currency != Token(INTERBTC) { + if wrapped_currency != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_currency, FixedU128::one())); } let vault_id = VaultId::new(account_of(BOB), collateral_currency, wrapped_currency); @@ -19,8 +19,8 @@ fn test_with(execute: impl Fn(VaultId) -> R) { execute(vault_id) }); }; - test_with(Token(KSM), Token(INTERBTC)); - test_with(Token(DOT), Token(INTERBTC)); + test_with(Token(KSM), Token(IBTC)); + test_with(Token(DOT), Token(IBTC)); test_with(Token(DOT), Token(KBTC)); } diff --git a/standalone/runtime/tests/test_replace.rs b/standalone/runtime/tests/test_replace.rs index 3577f41fcc..3de5475e8e 100644 --- a/standalone/runtime/tests/test_replace.rs +++ b/standalone/runtime/tests/test_replace.rs @@ -21,7 +21,7 @@ fn test_with(execute: impl Fn(VaultId, VaultId) -> R) { assert_ok!(OraclePallet::_set_exchange_rate(old_vault_currency, FixedU128::one())); assert_ok!(OraclePallet::_set_exchange_rate(new_vault_currency, FixedU128::one())); - if wrapped_currency != Token(INTERBTC) { + if wrapped_currency != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_currency, FixedU128::one())); } set_default_thresholds(); @@ -52,10 +52,10 @@ fn test_with(execute: impl Fn(VaultId, VaultId) -> R) { }) }; test_with(Token(DOT), Token(KSM), Token(KBTC), None); - test_with(Token(DOT), Token(DOT), Token(INTERBTC), None); - test_with(Token(DOT), Token(DOT), Token(INTERBTC), Some(Token(KSM))); - test_with(Token(DOT), Token(KSM), Token(INTERBTC), None); - test_with(Token(KSM), Token(DOT), Token(INTERBTC), None); + test_with(Token(DOT), Token(DOT), Token(IBTC), None); + test_with(Token(DOT), Token(DOT), Token(IBTC), Some(Token(KSM))); + test_with(Token(DOT), Token(KSM), Token(IBTC), None); + test_with(Token(KSM), Token(DOT), Token(IBTC), None); } fn test_without_initialization(execute: impl Fn(CurrencyId) -> R) { @@ -264,10 +264,10 @@ mod accept_replace_tests { #[test] fn integration_test_replace_other_wrapped_currency_fails() { test_with(|old_vault_id, new_vault_id| { - let other_currency = if let Token(INTERBTC) = old_vault_id.wrapped_currency() { + let other_currency = if let Token(IBTC) = old_vault_id.wrapped_currency() { Token(KBTC) } else { - Token(INTERBTC) + Token(IBTC) }; assert_ok!(OraclePallet::_set_exchange_rate(other_currency, FixedU128::one())); diff --git a/standalone/runtime/tests/test_vault_registry.rs b/standalone/runtime/tests/test_vault_registry.rs index a5046870e8..20ff8a62dc 100644 --- a/standalone/runtime/tests/test_vault_registry.rs +++ b/standalone/runtime/tests/test_vault_registry.rs @@ -13,7 +13,7 @@ fn test_with(execute: impl Fn(VaultId) -> R) { for currency_id in iter_collateral_currencies() { assert_ok!(OraclePallet::_set_exchange_rate(currency_id, FixedU128::one())); } - if wrapped_id != Token(INTERBTC) { + if wrapped_id != Token(IBTC) { assert_ok!(OraclePallet::_set_exchange_rate(wrapped_id, FixedU128::one())); } UserData::force_to(USER, default_user_state()); @@ -25,8 +25,8 @@ fn test_with(execute: impl Fn(VaultId) -> R) { }); }; test_with(Token(DOT), Token(KBTC)); - test_with(Token(KSM), Token(INTERBTC)); - test_with(Token(DOT), Token(INTERBTC)); + test_with(Token(KSM), Token(IBTC)); + test_with(Token(DOT), Token(IBTC)); } mod deposit_collateral_test { diff --git a/standalone/src/chain_spec.rs b/standalone/src/chain_spec.rs index e1ac36fbb3..2f06f034c1 100644 --- a/standalone/src/chain_spec.rs +++ b/standalone/src/chain_spec.rs @@ -5,7 +5,7 @@ use interbtc_runtime::{ token_distribution, AccountId, AuraConfig, BTCRelayConfig, CurrencyId, CurrencyId::Token, CurrencyInfo, FeeConfig, GenesisConfig, GetWrappedCurrencyId, GrandpaConfig, IssueConfig, NominationConfig, OracleConfig, RedeemConfig, RefundConfig, ReplaceConfig, SecurityConfig, Signature, StatusCode, SudoConfig, SupplyConfig, SystemConfig, - TechnicalCommitteeConfig, TokensConfig, VaultRegistryConfig, BITCOIN_BLOCK_SPACING, DAYS, DOT, INTERBTC, INTR, + TechnicalCommitteeConfig, TokensConfig, VaultRegistryConfig, BITCOIN_BLOCK_SPACING, DAYS, DOT, IBTC, INTR, KBTC, KINT, KSM, WASM_BINARY, YEARS, }; use primitives::VaultCurrencyPair; @@ -52,7 +52,7 @@ fn get_properties() -> Map { let mut properties = Map::new(); let mut token_symbol: Vec = vec![]; let mut token_decimals: Vec = vec![]; - [INTR, INTERBTC, DOT, KINT, KBTC, KSM].iter().for_each(|token| { + [INTR, IBTC, DOT, KINT, KBTC, KSM].iter().for_each(|token| { token_symbol.push(token.symbol().to_string()); token_decimals.push(token.decimals() as u32); });