mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-26 03:51:01 +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,39 @@
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@pezkuwi/api';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/types';
|
||||
import type { DeriveCollectiveProposal } from '@pezkuwi/api-derive/types';
|
||||
|
||||
import { BN_ONE, BN_ZERO } from '@pezkuwi/util';
|
||||
|
||||
import { alice, bob } from '../keyring/addresses.js';
|
||||
import { balanceOf } from './balance.js';
|
||||
import { aHash } from './hashes.js';
|
||||
|
||||
export interface ProposalFactory {
|
||||
aProposal: (extrinsic: SubmittableExtrinsic<'promise'>, ayes?: string[], nays?: string[]) => DeriveCollectiveProposal
|
||||
}
|
||||
|
||||
export function proposalFactory (api: ApiPromise): ProposalFactory {
|
||||
const registry = api.registry;
|
||||
|
||||
return {
|
||||
aProposal: (extrinsic, ayes = [alice], nays = [bob]) => ({
|
||||
hash: aHash(),
|
||||
proposal: registry.createType('Proposal', extrinsic),
|
||||
votes: registry.createType('Votes', {
|
||||
ayes,
|
||||
index: 0,
|
||||
nays,
|
||||
threshold: 4
|
||||
})
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
export const defaultTreasury = {
|
||||
burn: BN_ONE,
|
||||
spendPeriod: BN_ZERO,
|
||||
value: balanceOf(1)
|
||||
};
|
||||
Reference in New Issue
Block a user