Encode PezkuwiChain networks by genesis in XCM

WESTEND held a stale genesis labelled Zagros. The runtimes declare ThisNetwork as ByGenesis and
the XCM v5 NetworkId has no Westend or Zagros variant, so the named mapping is removed and every
PezkuwiChain network is encoded as ByGenesis.
This commit is contained in:
Satoshi Qazi Muhammed committed 2026-11-03 03:56:34 +04:00
1 parent 8b0be959e4
commit 431dc63333
2 files changed
-5

No files matched your search

@@ -112,7 +112,6 @@ private fun bindGlobalConsensusJunction(instance: Any?): Junction {
"Polkadot" -> Junction.GlobalConsensus(NetworkId.Substrate(Chain.Geneses.POLKADOT))
"Kusama" -> Junction.GlobalConsensus(NetworkId.Substrate(Chain.Geneses.KUSAMA))
"Westend" -> Junction.GlobalConsensus(NetworkId.Substrate(Chain.Geneses.WESTEND))
"Ethereum" -> {
val chainId = bindInt(asDictEnum.value.castToStruct()["chain_id"])
Junction.GlobalConsensus(NetworkId.Ethereum(chainId))
@@ -189,7 +188,6 @@ private fun NetworkId.Substrate.toEncodableInstance(): Any {
return when (genesisHash) {
Chain.Geneses.POLKADOT -> DictEnum.Entry("Polkadot", null)
Chain.Geneses.KUSAMA -> DictEnum.Entry("Kusama", null)
Chain.Geneses.WESTEND -> DictEnum.Entry("Westend", null)
Chain.Ids.ETHEREUM -> DictEnum.Entry("Ethereum", null)
else -> DictEnum.Entry("ByGenesis", genesisHash.fromHex())
}
@@ -461,9 +461,6 @@ object ChainGeneses {
const val KUSAMA = "b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe"
const val POLKADOT = "91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3"
// Westend constant now points to Zagros Testnet
const val WESTEND = "1b0b4727bbb5e44ed587d1056b4ad537ffb330034509a58866a088d77e792cd5"
const val KUSAMA_ASSET_HUB = "48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"
const val ACALA = "fc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c"