Skip to content

update stake info for tangle network #11390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/apps-config/src/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ export const VARA_NETWORK_GENESIS = '0xfe1b4c55fd4d668101126434206571a7838a8b6b9
export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6';

export const JOYSTREAM_GENESIS = '0x6b5e488e0fa8f9821110d5c13f4c468abcd43ce5e297e62b34c53c3346465956';

export const TANGLE_GENESIS = '0x44f68476df71ebf765b630bf08dc1e0fedb2bf614a1aa0563b3f74f20e47b3e0';
7 changes: 5 additions & 2 deletions packages/apps-config/src/api/params/inflation.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2017-2025 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { ApiPromise } from '@polkadot/api';

Check failure on line 4 in packages/apps-config/src/api/params/inflation.ts

View workflow job for this annotation

GitHub Actions / pr (lint)

Run autofix to sort these imports!

import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, JOYSTREAM_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS, VARA_NETWORK_GENESIS, VARA_NETWORK_TESTNET_GENESIS } from '../constants.js';
import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, JOYSTREAM_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS, VARA_NETWORK_GENESIS, VARA_NETWORK_TESTNET_GENESIS, TANGLE_GENESIS } from '../constants.js';

interface InflationParams {
auctionAdjust: number;
Expand Down Expand Up @@ -33,6 +33,8 @@

const JOYSTREAM_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.03, minInflation: 0.0075 };

const TANGLE_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.25, minInflation: 0.15, stakeTarget: 0.60 };

const KNOWN_PARAMS: Record<string, InflationParams> = {
[CERE_NETWORK_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
[CERE_NETWORK_TESTNET_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
Expand All @@ -47,7 +49,8 @@
[NFTMART_GENESIS]: { ...DEFAULT_PARAMS, falloff: 0.04, stakeTarget: 0.60 },
[POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 },
[VARA_NETWORK_GENESIS]: VARA_NETWORK_INFLATION_PARAMS,
[VARA_NETWORK_TESTNET_GENESIS]: VARA_NETWORK_INFLATION_PARAMS
[VARA_NETWORK_TESTNET_GENESIS]: VARA_NETWORK_INFLATION_PARAMS,
[TANGLE_GENESIS]: TANGLE_INFLATION_PARAMS

Check failure on line 53 in packages/apps-config/src/api/params/inflation.ts

View workflow job for this annotation

GitHub Actions / pr (lint)

Expected object keys to be in ascending order. 'TANGLE_GENESIS' should be before 'VARA_NETWORK_TESTNET_GENESIS'
};

export function getInflationParams (api: ApiPromise): InflationParams {
Expand Down
Loading