From 109efd616cf11bd8f78e36684e5d16a028692164 Mon Sep 17 00:00:00 2001 From: Eugene Way Date: Wed, 10 Jan 2024 06:08:07 +0100 Subject: [PATCH] Set up Vara inflation pararms (#10164) * set up vara inflation pararms * use lint --- packages/apps-config/src/api/constants.ts | 4 ++++ packages/apps-config/src/api/params/inflation.ts | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index 8b27f031168a..05e313f82f00 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -36,3 +36,7 @@ export const NFTMART_GENESIS = '0xfcf9074303d8f319ad1bf0195b145871977e7c375883b8 export const CERE_NETWORK_GENESIS = '0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c'; export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d0a160e9bc0424ab4ab217f7a8ba30dc'; + +export const VARA_NETWORK_GENESIS = '0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763'; + +export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6'; diff --git a/packages/apps-config/src/api/params/inflation.ts b/packages/apps-config/src/api/params/inflation.ts index b12367f99c70..3e16bad3f20a 100644 --- a/packages/apps-config/src/api/params/inflation.ts +++ b/packages/apps-config/src/api/params/inflation.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; -import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS } from '../constants.js'; +import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS, VARA_NETWORK_GENESIS, VARA_NETWORK_TESTNET_GENESIS } from '../constants.js'; interface InflationParams { auctionAdjust: number; @@ -29,6 +29,8 @@ const DEFAULT_PARAMS: InflationParams = { const CERE_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.05, minInflation: 0.0001, stakeTarget: 0.2 }; +const VARA_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0, minInflation: 0.0001, stakeTarget: 0.85 }; + const KNOWN_PARAMS: Record = { [CERE_NETWORK_GENESIS]: CERE_NETWORK_INFLATION_PARAMS, [CERE_NETWORK_TESTNET_GENESIS]: CERE_NETWORK_INFLATION_PARAMS, @@ -40,7 +42,9 @@ const KNOWN_PARAMS: Record = { [KUSAMA_GENESIS]: { ...DEFAULT_PARAMS, auctionAdjust: (0.3 / 60), auctionMax: 60, stakeTarget: 0.75 }, [NEATCOIN_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, [NFTMART_GENESIS]: { ...DEFAULT_PARAMS, falloff: 0.04, stakeTarget: 0.60 }, - [POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 } + [POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, + [VARA_NETWORK_GENESIS]: VARA_NETWORK_INFLATION_PARAMS, + [VARA_NETWORK_TESTNET_GENESIS]: VARA_NETWORK_INFLATION_PARAMS }; export function getInflationParams (api: ApiPromise): InflationParams {