Skip to content

Commit

Permalink
fix(generate): add native chain
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Sep 27, 2024
1 parent 5e999dd commit ebed2e0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions script/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ebed2e0

Please sign in to comment.