Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add Westend with staking to preConfigured #3075

Merged
merged 6 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions chains/v20/preConfigured/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
"chainId": "21a1ba24a807ab70ade25cbd741e6428746a7007926ac7b82d102df7d620e2ea",
"name": "VTB Mainnet"
},
{
"chainId": "e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"name": "Westend (TESTNET)"
},
{
"chainId": "67f9723393ef76214df0118c34bbbd3dbebc8ed46a10973a8c969d48fe7598c9",
"name": "Westend Asset Hub (TESTNET)"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"chainId": "e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"name": "Westend",
leohar marked this conversation as resolved.
Show resolved Hide resolved
"assets": [
{
"assetId": 0,
"symbol": "WND",
"precision": 12,
"icon": "https://raw.githubusercontent.com/novasamatech/nova-utils/master/icons/tokens/white/Default.svg",
"staking": [
"relaychain",
"nomination-pools"
]
}
],
"nodes": [
{
"url": "wss://westend-rpc.dwellir.com",
"name": "Dwellir node"
},
{
"url": "wss://rpc.ibp.network/westend",
"name": "IBP1 node"
},
{
"url": "wss://westend.dotters.network",
"name": "IBP2 node"
},
{
"url": "wss://westend.public.curie.radiumblock.co/ws",
"name": "RadiumBlock node"
},
{
"url": "wss://westend.api.onfinality.io/public-ws",
"name": "OnFinality node"
}
],
"explorers": [
{
"name": "Subscan",
"extrinsic": "https://westend.subscan.io/extrinsic/{hash}",
"account": "https://westend.subscan.io/account/{address}"
}
],
"addressPrefix": 42,
"externalApi": {
"staking": [
{
"type": "subquery",
"url": "https://api.subquery.network/sq/nova-wallet/nova-wallet-westend"
}
],
"history": [
{
"type": "subquery",
"url": "https://api.subquery.network/sq/nova-wallet/nova-wallet-westend"
}
],
"crowdloans": [
{
"type": "github",
"url": "https://raw.githubusercontent.com/novasamatech/nova-utils/master/crowdloan/westend.json"
}
],
"governance": [
{
"type": "subsquare",
"url": "https://westend.subsquare.io/api"
}
]
},
"options": [
"testnet",
"crowdloans",
"governance",
"proxy"
],
"additional": {
"themeColor": "#1F78FF",
"stakingWiki": "https://docs.novawallet.io/nova-wallet-wiki/staking/polkadot-and-kusama",
"stakingMaxElectingVoters": 22500,
"feeViaRuntimeCall": true,
"identityChain": "1eb6fb0ba5187434de017a70cb84d4f47142df1d571d0ef9e7e1407f2b80b93c",
"supportsGenericLedgerApp": true
}
}
10 changes: 6 additions & 4 deletions scripts/polkadotjs_endpoints_to_preconfigured.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,18 @@ def process_json_file(file_path):


def process_dict_data(file_path, data):
if "(SHUTTING DOWN)" not in data.get('name', ''):
if "(SHUTTING DOWN)" in data.get('name', '') or "Westend" in data.get('name', ''):
leohar marked this conversation as resolved.
Show resolved Hide resolved
pass
else:
os.remove(file_path)
print(f"Removed file: {file_path}")


def process_list_data(file_path, data):
shutting_down_items = [entry for entry in data if "(SHUTTING DOWN)" in entry.get('name', '')]
if shutting_down_items:
skipped_items = [entry for entry in data if "(SHUTTING DOWN)" in entry.get('name', '') or "Westend" in entry.get('name', '')]
leohar marked this conversation as resolved.
Show resolved Hide resolved
if skipped_items:
with open(file_path, 'w') as f:
json.dump(shutting_down_items, f, indent=4)
json.dump(skipped_items, f, indent=4)
print(f"Updated file: {file_path}")
else:
os.remove(file_path)
Expand Down
Loading