git.delta.rocks / unique-network / refs/commits / ce442c5a4cf9

difftreelog

test(helpers) add paraSiblingSovereignAccount

Daniel Shiposha2022-08-23parent: #1c90efe.patch.diff
in: master

1 file changed

modifiedtests/src/util/helpers.tsdiffbeforeafterboth
1096 return balance;1096 return balance;
1097}1097}
1098
1099export async function paraSiblingSovereignAccount(paraid: number): Promise<string> {
1100 return usingApi(async api => {
1101 const siblingPrefix = '0x7369626c';
1102 const encodedParaId = api.createType('u32', paraid).toHex(true).substring(2);
1103 const suffix = '000000000000000000000000000000000000000000000000';
1104
1105 return siblingPrefix + encodedParaId + suffix;
1106 });
1107}
10981108
1099export async function transferBalanceTo(api: ApiPromise, source: IKeyringPair, target: string, amount = 1000n * UNIQUE) {1109export async function transferBalanceTo(api: ApiPromise, source: IKeyringPair, target: string, amount = 1000n * UNIQUE) {
1100 const tx = api.tx.balances.transfer(target, amount);1110 const tx = api.tx.balances.transfer(target, amount);