mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-25 12:55:42 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
// Copyright 2017-2025 @pezkuwi/app-alliance authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||
|
||||
import { Metadata, TypeRegistry } from '@pezkuwi/types';
|
||||
import bizinikiwi from '@pezkuwi/types-support/metadata/static-bizinikiwi';
|
||||
|
||||
import { createCid, createPalletCid } from './util.js';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
const metadata = new Metadata(registry, bizinikiwi);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
|
||||
describe('util', (): void => {
|
||||
describe('createPalletCid', (): void => {
|
||||
it('encodes an ipfs hash to a pallet CID', (): void => {
|
||||
expect(
|
||||
createPalletCid(registry, 'QmTx8GZrQGwQ1ZLquZ4yPqSukDdkvKwpYCULsfLo6G47TX')?.toHuman()
|
||||
).toEqual({
|
||||
codec: 0x70.toString(),
|
||||
hash_: {
|
||||
code: 0x12.toString(),
|
||||
digest: '0x5360ecbd380c10f43bc0a6aba27556580011a5e833592df8dcf330c94759e862'
|
||||
},
|
||||
version: 'V0'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('createIpfsHash', (): void => {
|
||||
it('encodes a pallet CID into an ipfs hash', (): void => {
|
||||
const cid = registry.createType('PalletAllianceCid', {
|
||||
codec: 0x70,
|
||||
hash_: {
|
||||
code: 0x12,
|
||||
digest: '0x5360ecbd380c10f43bc0a6aba27556580011a5e833592df8dcf330c94759e862'
|
||||
},
|
||||
version: 'V0'
|
||||
});
|
||||
|
||||
expect(
|
||||
createCid(cid).ipfs
|
||||
).toEqual('QmTx8GZrQGwQ1ZLquZ4yPqSukDdkvKwpYCULsfLo6G47TX');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user