Files
pwap/pezkuwi-sdk-ui/packages/test-support/scripts/lib/changeBountyStateFunctions.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

46 lines
1.9 KiB
TypeScript

// Copyright 2017-2026 @pezkuwi/test-support authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiPromise } from '@pezkuwi/api';
import type { KeyringPair } from '@pezkuwi/keyring/types';
import type { BN } from '@pezkuwi/util';
import { execute } from '@pezkuwi/test-support/transaction';
import { acceptMotion, fillTreasury, getMotion, proposeMotion } from './helpers.js';
export async function acceptCurator (api: ApiPromise, id: number, signer: KeyringPair): Promise<void> {
await execute(api.tx.bounties.acceptCurator(id), signer);
}
export async function awardBounty (api: ApiPromise, index: number, signer: KeyringPair): Promise<void> {
await execute(api.tx.bounties.awardBounty(index, signer.address), signer);
}
export async function claimBounty (api: ApiPromise, index: number, signer: KeyringPair): Promise<void> {
await execute(api.tx.bounties.claimBounty(index), signer);
}
export async function proposeBounty (api: ApiPromise, value: BN, title: string, signer: KeyringPair): Promise<number> {
await execute(api.tx.bounties.proposeBounty(value, title), signer);
const index = await api.query.bounties.bountyCount();
return index.toNumber() - 1;
}
export async function proposeCurator (api: ApiPromise, index: number, signer: KeyringPair): Promise<void> {
await proposeMotion(api, api.tx.bounties.proposeCurator(index, signer.address, 10), signer);
const bountyProposal = await getMotion(api, index);
await acceptMotion(api, bountyProposal.hash, bountyProposal.votes?.index.toNumber() ?? 0);
}
export async function approveBounty (api: ApiPromise, index: number, signer: KeyringPair): Promise<void> {
await proposeMotion(api, api.tx.bounties.approveBounty(index), signer);
const bountyProposal = await getMotion(api, index);
await acceptMotion(api, bountyProposal.hash, bountyProposal.votes?.index.toNumber() ?? 0);
await fillTreasury(api, signer);
}