Skip to content

Commit

Permalink
Merge pull request #438 from gregdhill/chore/kintsugi-labs
Browse files Browse the repository at this point in the history
chore: update kintsugi labs addresses
  • Loading branch information
sander2 authored Dec 14, 2021
2 parents 25de78b + 2c375a5 commit ffb998c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
7 changes: 4 additions & 3 deletions parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@ parameter_types! {

parameter_types! {
pub KintsugiLabsAccounts: Vec<AccountId> = vec![
hex_literal::hex!["249cf21ac84a06f2e1661e215e404530529f3932034abe9a5b8e3da5eee8b374"].into(), // 5CtiCmFoHDSiLLoaBkqj9sGonciXgAvj2mnbZ8DZe4bpLLQ7
hex_literal::hex!["4aa5c577b4dcfcd72e78a728ca52707eed424b7bfa6c584b3ad9caa8087bdd20"].into(), // 5DkaeN4Rpq4cfyExfopCSEDiJAEpKR8A4szT398p5271bVaa
hex_literal::hex!["accb25b6794d8efa88397ccc05017727f658494484525ae8a3bd4c0bc0316e16"].into(), // 5FyGSWj5b6VcK7L9psiDE6RQBp1XC3SzbXNt5TU1Zqr56QGY
// 5FkEVjGhBDTUvuT8owzVnfSJs8MiuCG7h22ZprDABhr8ze1W
hex_literal::hex!["a2da693fe73a14147f52186c1e8386ac10ef77330b095cbd9f53c5b97e00a6c0"].into(),
// 5Fhn5mX4JGeDxikaxkJZYRYjxxbZ7DjxS5f9hsAVAzGXUNyG
hex_literal::hex!["a0fb017d4b777bc2be8ad9e9dfe7bdf0a3db060644de499685adacd19f84df71"].into(),
];
}

Expand Down
30 changes: 29 additions & 1 deletion standalone/runtime/tests/test_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use mock::{assert_eq, *};
use orml_tokens::AccountData;
use orml_vesting::VestingSchedule;
use primitives::VaultCurrencyPair;
use sp_core::{Encode, H256};
use sp_core::{crypto::Ss58Codec, Encode, H256};
use sp_std::str::FromStr;

type VestingCall = orml_vesting::Call<Runtime>;

Expand Down Expand Up @@ -301,3 +302,30 @@ fn integration_test_batched_multisig_vesting() {
}
});
}

// multisig may produce an invalid address if inputs are not sorted
fn sort_addresses(entries: Vec<AccountId>) -> Vec<AccountId> {
let mut signatories = entries.clone();
signatories.sort_by(|left, right| left.cmp(right));
signatories
}

#[test]
fn should_calculate_sorted_multisig_address() {
ExtBuilder::build().execute_with(|| {
// 0xb42637741a394e89426e8026536090c23647fdc0cccd1156785d84ff87ed2eb0
let multisig_account = MultiSigPallet::multi_account_id(
&sort_addresses(vec![
AccountId::from_str("5Gn1vqSHnzz61gfXK1wRBcbKtPcSPmxKrpihApnTuvA7NJnj").unwrap(),
AccountId::from_str("5CyPQSfoHdb626qGyH16D1DJKjxQtZxbF4pbKzTRRGyCchEx").unwrap(),
AccountId::from_str("5EEj6K6FFDBuMwfS1DtxMDdumWGjqNq34nnbUsFH4vQRfjQi").unwrap(),
AccountId::from_str("5D2xxiX1ACobFxxD4gvD7pmQRg7q2yi94n4JjtGRHsnh3gns").unwrap(),
]),
2,
);
assert_eq!(
"5DnWh2e4Fi2iDeEjNYMr5iU1RJ4cnG2X7tZcwcFgxJkBrBXX",
multisig_account.to_ss58check()
);
})
}

0 comments on commit ffb998c

Please sign in to comment.