Skip to content

Commit

Permalink
Merge pull request #1255 from bifrost-finance/fix_slpx_migrates
Browse files Browse the repository at this point in the history
Fix slpx migrates
  • Loading branch information
hqwangningbo committed May 31, 2024
2 parents 1954ab7 + c4b3ba0 commit 065e92d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions runtime/bifrost-kusama/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub mod slpx_migrates_whitelist {
impl OnRuntimeUpgrade for UpdateWhitelist {
fn on_runtime_upgrade() -> Weight {
let new_whitelist: BoundedVec<AccountId, ConstU32<10>> =
vec![AccountId::from_ss58check("eVjSno5E5Teibbu3zdaZbBKhsFWU4QjpQXif2YiZ1jFbmEB")
vec![AccountId::from_ss58check("gtXJWw9ME9w7cXfmR6n9MFkKCSu2MrtA3dcFV2BhHpEZFjZ")
.unwrap()]
.try_into()
.unwrap();
Expand All @@ -257,7 +257,7 @@ pub mod slpx_migrates_whitelist {
let whitelist =
bifrost_slpx::WhitelistAccountId::<Runtime>::get(SupportChain::Moonbeam);
let new_whitelist: BoundedVec<AccountId, ConstU32<10>> =
vec![AccountId::from_ss58check("eVjSno5E5Teibbu3zdaZbBKhsFWU4QjpQXif2YiZ1jFbmEB")
vec![AccountId::from_ss58check("gtXJWw9ME9w7cXfmR6n9MFkKCSu2MrtA3dcFV2BhHpEZFjZ")
.unwrap()]
.try_into()
.unwrap();
Expand Down
16 changes: 8 additions & 8 deletions runtime/bifrost-polkadot/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ pub mod slpx_migrates_whitelist {
impl OnRuntimeUpgrade for UpdateWhitelist {
fn on_runtime_upgrade() -> Weight {
let new_whitelist: BoundedVec<AccountId, ConstU32<10>> = vec![
AccountId::from_ss58check("dCCU6pkmwQEb29MSigvWjhvnWTtE3GaBqaAdxt4ppW7kUkw")
AccountId::from_ss58check("gWEvf2EDMzxR7JHyrEHXf3nqxKLGvHaFbk7HUkJnNPUxDts")
.unwrap(),
AccountId::from_ss58check("fV6ngGNKkM1BUymusAMcZECxNu3fqhSnS4Jhz2RBk4NtZrw")
AccountId::from_ss58check("bpRBE4rWcBJqqN2ESts5LefuvLonBeZ4r2YBpfuuxvMxoea")
.unwrap(),
]
.try_into()
Expand All @@ -253,9 +253,9 @@ pub mod slpx_migrates_whitelist {
);

let new_whitelist: BoundedVec<AccountId, ConstU32<10>> = vec![
AccountId::from_ss58check("fErAtK3KrBPZyAtd26DMQAmuAvo8YswQQBhexibCcqh3D1c")
AccountId::from_ss58check("g96o4GVpsAop1MJiArnmUYtXUjEisfkbfcpsuqmXrS28MEr")
.unwrap(),
AccountId::from_ss58check("cG6stm2jXgbreRNGxZEvaUn3jT17fxdFXUa6mwE4bSL1v1L")
AccountId::from_ss58check("dZWAvaUWbPN1oKbWMkeDWHBceX8RqP4CMwmi1trq9uf5pBn")
.unwrap(),
]
.try_into()
Expand All @@ -270,9 +270,9 @@ pub mod slpx_migrates_whitelist {
let whitelist =
bifrost_slpx::WhitelistAccountId::<Runtime>::get(SupportChain::Moonbeam);
let new_whitelist: BoundedVec<AccountId, ConstU32<10>> = vec![
AccountId::from_ss58check("dCCU6pkmwQEb29MSigvWjhvnWTtE3GaBqaAdxt4ppW7kUkw")
AccountId::from_ss58check("gWEvf2EDMzxR7JHyrEHXf3nqxKLGvHaFbk7HUkJnNPUxDts")
.unwrap(),
AccountId::from_ss58check("fV6ngGNKkM1BUymusAMcZECxNu3fqhSnS4Jhz2RBk4NtZrw")
AccountId::from_ss58check("bpRBE4rWcBJqqN2ESts5LefuvLonBeZ4r2YBpfuuxvMxoea")
.unwrap(),
]
.try_into()
Expand All @@ -281,9 +281,9 @@ pub mod slpx_migrates_whitelist {

let whitelist = bifrost_slpx::WhitelistAccountId::<Runtime>::get(SupportChain::Astar);
let new_whitelist: BoundedVec<AccountId, ConstU32<10>> = vec![
AccountId::from_ss58check("fErAtK3KrBPZyAtd26DMQAmuAvo8YswQQBhexibCcqh3D1c")
AccountId::from_ss58check("g96o4GVpsAop1MJiArnmUYtXUjEisfkbfcpsuqmXrS28MEr")
.unwrap(),
AccountId::from_ss58check("cG6stm2jXgbreRNGxZEvaUn3jT17fxdFXUa6mwE4bSL1v1L")
AccountId::from_ss58check("dZWAvaUWbPN1oKbWMkeDWHBceX8RqP4CMwmi1trq9uf5pBn")
.unwrap(),
]
.try_into()
Expand Down
20 changes: 10 additions & 10 deletions runtime/bifrost-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ mod tests {
#[test]
fn test_location_to_account() {
let moonbeam_slpx_origin_location = MultiLocation::new(
0,
1,
X2(
Parachain(2004),
AccountKey20 {
Expand All @@ -791,7 +791,7 @@ mod tests {
.unwrap();

let moonbeam_receiver_origin_location = MultiLocation::new(
0,
1,
X2(
Parachain(2004),
AccountKey20 {
Expand All @@ -807,7 +807,7 @@ mod tests {
.unwrap();

let moonriver_slpx_origin_location = MultiLocation::new(
0,
1,
X2(
Parachain(2023),
AccountKey20 {
Expand All @@ -823,7 +823,7 @@ mod tests {
.unwrap();

let astar_slpx_origin_location = MultiLocation::new(
0,
1,
X2(
Parachain(2006),
AccountId32 {
Expand All @@ -840,7 +840,7 @@ mod tests {
.unwrap();

let astar_receiver_origin_location = MultiLocation::new(
0,
1,
X2(
Parachain(2006),
AccountId32 {
Expand All @@ -858,23 +858,23 @@ mod tests {

assert_eq!(
moonbeam_slpx_derived,
AccountId::from_ss58check("dCCU6pkmwQEb29MSigvWjhvnWTtE3GaBqaAdxt4ppW7kUkw").unwrap()
AccountId::from_ss58check("gWEvf2EDMzxR7JHyrEHXf3nqxKLGvHaFbk7HUkJnNPUxDts").unwrap()
);
assert_eq!(
moonbeam_receiver_derived,
AccountId::from_ss58check("fV6ngGNKkM1BUymusAMcZECxNu3fqhSnS4Jhz2RBk4NtZrw").unwrap()
AccountId::from_ss58check("bpRBE4rWcBJqqN2ESts5LefuvLonBeZ4r2YBpfuuxvMxoea").unwrap()
);
assert_eq!(
moonriver_slpx_derived,
AccountId::from_ss58check("eVjSno5E5Teibbu3zdaZbBKhsFWU4QjpQXif2YiZ1jFbmEB").unwrap()
AccountId::from_ss58check("gtXJWw9ME9w7cXfmR6n9MFkKCSu2MrtA3dcFV2BhHpEZFjZ").unwrap()
);
assert_eq!(
astar_slpx_derived,
AccountId::from_ss58check("fErAtK3KrBPZyAtd26DMQAmuAvo8YswQQBhexibCcqh3D1c").unwrap()
AccountId::from_ss58check("g96o4GVpsAop1MJiArnmUYtXUjEisfkbfcpsuqmXrS28MEr").unwrap()
);
assert_eq!(
astar_receiver_derived,
AccountId::from_ss58check("cG6stm2jXgbreRNGxZEvaUn3jT17fxdFXUa6mwE4bSL1v1L").unwrap()
AccountId::from_ss58check("dZWAvaUWbPN1oKbWMkeDWHBceX8RqP4CMwmi1trq9uf5pBn").unwrap()
);
}
}

0 comments on commit 065e92d

Please sign in to comment.