Cere Network config improvements (#9259)

* Please replace the name "Cere Mainnet" with "Cere Network".

* Add inflation parameters for Cere Network and Cere Network Testnet
This commit is contained in:
Shamilkhan 2023-03-31 16:44:46 +04:00 committed by GitHub
parent 77b79e071f
commit 2daf9d89ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -30,3 +30,7 @@ export const DOCK_GENESIS = '0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471
export const DOCK_POS_TESTNET_GENESIS = '0x59d93e2ce42abb8aa52ca9a9e820233667104751f8f2980578a47a26a7235027';
export const NFTMART_GENESIS = '0xfcf9074303d8f319ad1bf0195b145871977e7c375883b834247cb01ff22f51f9';
export const CERE_NETWORK_GENESIS = '0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c';
export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d0a160e9bc0424ab4ab217f7a8ba30dc';

View File

@ -3,7 +3,7 @@
import type { ApiPromise } from '@polkadot/api';
import { 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 } from '../constants.js';
interface InflationParams {
auctionAdjust: number;
@ -27,7 +27,11 @@ const DEFAULT_PARAMS: InflationParams = {
stakeTarget: 0.5
};
const CERE_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.05, minInflation: 0.0001, stakeTarget: 0.2 };
const KNOWN_PARAMS: Record<string, InflationParams> = {
[CERE_NETWORK_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
[CERE_NETWORK_TESTNET_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
[DOCK_POS_TESTNET_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 },
// 30% for up to 60 slots, see
// https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L526-L527

View File

@ -90,7 +90,7 @@ export const prodChains: EndpointOption[] = [
'Cere Network': 'wss://archive.mainnet.cere.network/ws',
'Republic Crypto | Runtime': 'wss://mainnet.cere-archive.republiccrypto-runtime.com:444'
},
text: 'Cere Mainnet',
text: 'Cere Network',
ui: {
color: '#B7AEFF',
logo: nodesCereSVG

View File

@ -142,7 +142,7 @@ export const testChains: EndpointOption[] = [
'Cere Network': 'wss://archive.testnet.cere.network/ws',
'Republic Crypto | Runtime': 'wss://testnet.cere-archive.republiccrypto-runtime.com:444'
},
text: 'Cere Testnet',
text: 'Cere Network Testnet',
ui: {
color: '#B7AEFF',
logo: nodesCereSVG