Skip to content

Commit

Permalink
[Issue 2993] feat: support Avail mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
nampc1 committed May 2, 2024
1 parent e3de568 commit 0048b7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const API_MAX_RETRY = 2;
export const _API_OPTIONS_CHAIN_GROUP = {
acala: ['acala', 'karura', 'origintrail', 'kintsugi'],
turing: ['turingStaging', 'turing'],
avail: ['kate', 'availTuringTest'],
avail: ['kate', 'availTuringTest', 'avail_mainnet'],
goldberg: ['goldberg_testnet']
};

Expand Down Expand Up @@ -93,7 +93,8 @@ export const _STAKING_ERA_LENGTH_MAP: Record<string, number> = { // in hours
krest_network: 4,
polimec: 6,
enjin_relaychain: 24,
availTuringTest: 24
availTuringTest: 24,
avail_mainnet: 24
};

export const _EXPECTED_BLOCK_TIME: Record<string, number> = { // in seconds
Expand Down Expand Up @@ -122,7 +123,8 @@ export const _EXPECTED_BLOCK_TIME: Record<string, number> = { // in seconds
calamari_test: 12,
manta_network: 12,
enjin_relaychain: 6,
availTuringTest: 20
availTuringTest: 20,
avail_mainnet: 20
};

export const _PARACHAIN_INFLATION_DISTRIBUTION: Record<string, Record<string, number>> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0

export const _STAKING_CHAIN_GROUP = {
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest'],
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet'],
para: ['moonbeam', 'moonriver', 'moonbase', 'turing', 'turingStaging', 'bifrost', 'bifrost_testnet', 'calamari_test', 'calamari', 'manta_network', 'polimec'],
astar: ['astar', 'shiden', 'shibuya'],
amplitude: ['amplitude', 'amplitude_test', 'kilt', 'kilt_peregrine', 'pendulum', 'krest_network'], // amplitude and kilt only share some common logic
kilt: ['kilt', 'kilt_peregrine'],
nominationPool: ['polkadot', 'kusama', 'westend', 'alephTest', 'aleph', 'kate', 'vara_network', 'goldberg_testnet', 'availTuringTest'],
nominationPool: ['polkadot', 'kusama', 'westend', 'alephTest', 'aleph', 'kate', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet'],
bifrost: ['bifrost', 'bifrost_testnet'],
aleph: ['aleph', 'alephTest'], // A0 has distinct tokenomics
ternoa: ['ternoa'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class EarningService implements StoppableServiceInterface, Persis

private dbService: DatabaseService;
private eventService: EventService;
private useOnlineCacheOnly = true;
private useOnlineCacheOnly = false;

constructor (state: KoniState) {
this.state = state;
Expand Down

0 comments on commit 0048b7d

Please sign in to comment.