From ebed2e09acc3a5d941276805d5043509bf19934d Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:19:34 +0000 Subject: [PATCH] fix(generate): add native chain --- script/generate.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/script/generate.js b/script/generate.js index cde95ce9..9b680cc5 100644 --- a/script/generate.js +++ b/script/generate.js @@ -20,15 +20,22 @@ const tokenMetaInfos = [ const tokenNamesForOracle = [ 'ETH', 'wstETH' // not case sensitive ] +const nativeChain = { + "name": "Exocore", + "meta_info": "The (native) Exocore chain", + "finalization_blocks": 10, + "layer_zero_chain_id": 0, // virtual chain + "address_length": 20, +} const nativeAsset = { "asset_basic_info": { - "name": "exo", + "name": "Native EXO token", "symbol": "exo", "address": "0x0000000000000000000000000000000000000000", "decimals": "18", - "layer_zero_chain_id": 0, + "layer_zero_chain_id": nativeChain.layer_zero_chain_id, "exocore_chain_index": "1", - "meta_info": "Native EXO Token" + "meta_info": "EXO native to the Exocore chain", }, "staking_total_amount": "0" }; @@ -670,7 +677,8 @@ async function updateGenesisFile() { genesisJSON.app_state.delegation.delegation_states = delegation_states; genesisJSON.app_state.delegation.stakers_by_operator = stakers_by_operator; - // add the native token at the end so that count-related issues don't arise. + // add the native chain and at the end so that count-related issues don't arise. + genesisJSON.app_state.assets.client_chains.push(nativeChain); genesisJSON.app_state.assets.tokens.push(nativeAsset); // TODO: copy the staking data over from the previous genesis, if any. genesisJSON.app_state.dogfood.params.asset_ids.push(