Files
pwap/pezkuwi-sdk-ui/packages/apps-config/src/api/params/proposalThresholds.ts
T
pezkuwichain 971df8edba Rebrand: Remove 3rd party chains, update domains to PezkuwiChain
- Remove all 3rd party parachain configurations from endpoints:
  - productionRelayPolkadot.ts: Keep only system parachains
  - productionRelayDicle.ts: Keep only system parachains
  - testingRelayZagros.ts: Keep only system parachains
  - testingRelayTeyrChain.ts: Keep only system parachains

- Update domain references:
  - polkadot.js.org → pezkuwichain.app
  - wiki.polkadot.network → wiki.pezkuwichain.io
  - dotapps.io → pezkuwichain.app
  - statement.polkadot.network → docs.pezkuwichain.io/statement
  - support.polkadot.network → docs.pezkuwichain.io

- Update repository references:
  - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap

- Rename system parachains to Pezkuwi ecosystem:
  - PolkadotAssetHub → PezkuwiAssetHub
  - polkadotBridgeHub → pezkuwiBridgeHub
  - polkadotCollectives → pezkuwiCollectives
  - polkadotCoretime → pezkuwiCoretime
  - polkadotPeople → pezkuwiPeople

- Update network name in claims utility:
  - Polkadot → Pezkuwi
2026-01-09 03:08:11 +03:00

55 lines
1.5 KiB
TypeScript

// Copyright 2017-2026 @pezkuwi/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiPromise } from '@pezkuwi/api';
import { KULUPU_GENESIS, KUSAMA_GENESIS, POLKADOT_GENESIS } from '../constants.js';
// normal fast-track proposals
const FAST_TRACK: Record<string, number> = {
default: 2 / 3
};
// in the case where block < fastTrackVotingPeriod
const FAST_TRACK_NO_DELAY: Record<string, number> = {
default: 1
};
const PROPOSE: Record<string, number> = {
[KULUPU_GENESIS]: 1,
[KUSAMA_GENESIS]: 1 / 2,
[POLKADOT_GENESIS]: 3 / 5,
default: 1 / 2
};
const SLASH: Record<string, number> = {
[KUSAMA_GENESIS]: 1 / 2,
[POLKADOT_GENESIS]: 3 / 4,
default: 1 / 2
};
const TREASURY: Record<string, number> = {
[KULUPU_GENESIS]: 1 / 2,
[KUSAMA_GENESIS]: 3 / 5,
[POLKADOT_GENESIS]: 3 / 5,
default: 3 / 5
};
export function getFastTrackThreshold (api: ApiPromise, isDefault: boolean): number {
return isDefault
? (FAST_TRACK[api.genesisHash.toHex()] || FAST_TRACK.default)
: (FAST_TRACK_NO_DELAY[api.genesisHash.toHex()] || FAST_TRACK_NO_DELAY.default);
}
export function getProposalThreshold (api: ApiPromise): number {
return PROPOSE[api.genesisHash.toHex()] || PROPOSE.default;
}
export function getSlashProposalThreshold (api: ApiPromise): number {
return SLASH[api.genesisHash.toHex()] || SLASH.default;
}
export function getTreasuryProposalThreshold (api: ApiPromise): number {
return TREASURY[api.genesisHash.toHex()] || TREASURY.default;
}