From d15497b1fb8332754a0a8bd8e7217865d1cf7cd9 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Tue, 3 Feb 2026 05:54:06 +0300 Subject: [PATCH] fix: Define MultiAddress inline for v14+ metadata compatibility --- chains/types/default.json | 354 ++++++++++++++++++++++++++++++-------- 1 file changed, 283 insertions(+), 71 deletions(-) diff --git a/chains/types/default.json b/chains/types/default.json index 0337ca3..d36ef5d 100644 --- a/chains/types/default.json +++ b/chains/types/default.json @@ -112,8 +112,14 @@ "PriorLock": { "type": "struct", "type_mapping": [ - ["blockNumber", "BlockNumber"], - ["balance", "Balance"] + [ + "blockNumber", + "BlockNumber" + ], + [ + "balance", + "Balance" + ] ] }, "ReferendumInfoFinished": { @@ -187,8 +193,14 @@ "VotingDirectVote": { "type": "struct", "type_mapping": [ - ["referendumIndex", "ReferendumIndex"], - ["accountVote", "AccountVote"] + [ + "referendumIndex", + "ReferendumIndex" + ], + [ + "accountVote", + "AccountVote" + ] ] }, "VotingDirect": { @@ -582,16 +594,31 @@ "FullIdentification": { "type": "struct", "type_mapping": [ - ["total", "Compact"], - ["own", "Compact"], - ["others", "Vec"] + [ + "total", + "Compact" + ], + [ + "own", + "Compact" + ], + [ + "others", + "Vec" + ] ] }, "IdentificationTuple": { "type": "struct", "type_mapping": [ - ["validatorId", "ValidatorId"], - ["exposure", "FullIdentification"] + [ + "validatorId", + "ValidatorId" + ], + [ + "exposure", + "FullIdentification" + ] ] }, "SetId": "u64", @@ -629,8 +656,14 @@ "NextAuthority": { "type": "struct", "type_mapping": [ - ["AuthorityId", "AuthorityId"], - ["weight", "AuthorityWeight"] + [ + "AuthorityId", + "AuthorityId" + ], + [ + "weight", + "AuthorityWeight" + ] ] }, "BeefyCommitment": { @@ -669,9 +702,18 @@ "BeefyNextAuthoritySet": { "type": "struct", "type_mapping": [ - ["id", "ValidatorSetId"], - ["len", "u32"], - ["root", "MerkleRoot"] + [ + "id", + "ValidatorSetId" + ], + [ + "len", + "u32" + ], + [ + "root", + "MerkleRoot" + ] ] }, "MerkleRoot": "Hash", @@ -806,8 +848,14 @@ "IdentityInfoAdditional": { "type": "struct", "type_mapping": [ - ["field", "Data"], - ["value", "Data"] + [ + "field", + "Data" + ], + [ + "value", + "Data" + ] ] }, "IdentityInfo": { @@ -1386,8 +1434,14 @@ "RegistrationJudgement": { "type": "struct", "type_mapping": [ - ["registrarIndex", "RegistrarIndex"], - ["judgement", "Judgement"] + [ + "registrarIndex", + "RegistrarIndex" + ], + [ + "judgement", + "Judgement" + ] ] }, "Registration": { @@ -2142,7 +2196,16 @@ "SlotRange": { "type": "enum", "value_list": [ - "ZeroZero", "ZeroOne", "ZeroTwo", "ZeroThree", "OneOne", "OneTwo", "OneThree", "TwoTwo", "TwoThree", "ThreeThree" + "ZeroZero", + "ZeroOne", + "ZeroTwo", + "ZeroThree", + "OneOne", + "OneTwo", + "OneThree", + "TwoTwo", + "TwoThree", + "ThreeThree" ] }, "WinningDataEntry": "Option<(AccountId, ParaId, BalanceOf)>", @@ -2368,8 +2431,14 @@ "UnappliedSlashOther": { "type": "struct", "type_mapping": [ - ["account", "AccountId"], - ["amount", "Balance"] + [ + "account", + "AccountId" + ], + [ + "amount", + "Balance" + ] ] }, "UnappliedSlash": { @@ -2403,62 +2472,155 @@ "SessionKeys3": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ] ] }, "SessionKeys4": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"], - ["authority_discovery", "AccountId"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ], + [ + "authority_discovery", + "AccountId" + ] ] }, "SessionKeys5": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"], - ["authority_discovery", "AccountId"], - ["parachains", "AccountId"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ], + [ + "authority_discovery", + "AccountId" + ], + [ + "parachains", + "AccountId" + ] ] }, "SessionKeys6B": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"], - ["authority_discovery", "AccountId"], - ["parachains", "AccountId"], - ["beefy", "Beefy"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ], + [ + "authority_discovery", + "AccountId" + ], + [ + "parachains", + "AccountId" + ], + [ + "beefy", + "Beefy" + ] ] }, "SessionKeys6": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"], - ["para_validator", "AccountId"], - ["para_assignment", "AccountId"], - ["authority_discovery", "AccountId"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ], + [ + "para_validator", + "AccountId" + ], + [ + "para_assignment", + "AccountId" + ], + [ + "authority_discovery", + "AccountId" + ] ] }, "SessionKeys7B": { "type": "struct", "type_mapping": [ - ["grandpa", "AccountId"], - ["babe", "AccountId"], - ["im_online", "AccountId"], - ["para_validator", "AccountId"], - ["para_assignment", "AccountId"], - ["authority_discovery", "AccountId"], - ["beefy", "Beefy"] + [ + "grandpa", + "AccountId" + ], + [ + "babe", + "AccountId" + ], + [ + "im_online", + "AccountId" + ], + [ + "para_validator", + "AccountId" + ], + [ + "para_assignment", + "AccountId" + ], + [ + "authority_discovery", + "AccountId" + ], + [ + "beefy", + "Beefy" + ] ] }, "Keys": "SessionKeysSubstrate", @@ -3194,17 +3356,29 @@ "OffchainAccuracyCompact": "Compact", "CompactScoreCompact": { "type": "struct", - "type_mapping": [ - ["validatorIndex", "ValidatorIndexCompact"], - ["offchainAccuracy", "OffchainAccuracyCompact"] + "type_mapping": [ + [ + "validatorIndex", + "ValidatorIndexCompact" + ], + [ + "offchainAccuracy", + "OffchainAccuracyCompact" ] + ] }, "CompactScore": { "type": "struct", - "type_mapping": [ - ["validatorIndex", "ValidatorIndex"], - ["offchainAccuracy", "OffchainAccuracy"] + "type_mapping": [ + [ + "validatorIndex", + "ValidatorIndex" + ], + [ + "offchainAccuracy", + "OffchainAccuracy" ] + ] }, "CompactAssignmentsFrom258": { "type": "struct", @@ -3447,11 +3621,20 @@ }, "DeferredOffenceOf": { "type": "struct", - "type_mapping": [ - ["offences", "Vec"], - ["perc", "Vec"], - ["session", "SessionIndex"] + "type_mapping": [ + [ + "offences", + "Vec" + ], + [ + "perc", + "Vec" + ], + [ + "session", + "SessionIndex" ] + ] }, "Statement": { "type": "enum", @@ -3737,8 +3920,14 @@ "TaskAddress": { "type": "struct", "type_mapping": [ - ["blockNumber", "BlockNumber"], - ["index", "u32"] + [ + "blockNumber", + "BlockNumber" + ], + [ + "index", + "u32" + ] ] }, "ValidationFunctionParams": { @@ -3813,7 +4002,31 @@ ] }, "ModuleId": "LockIdentifier", - "MultiAddress": "GenericMultiAddress", + "MultiAddress": { + "type": "enum", + "type_mapping": [ + [ + "Id", + "AccountId" + ], + [ + "Index", + "Compact" + ], + [ + "Raw", + "Bytes" + ], + [ + "Address32", + "H256" + ], + [ + "Address20", + "H160" + ] + ] + }, "MultiSigner": { "type": "enum", "type_mapping": [ @@ -4983,7 +5196,7 @@ "maxMessageSize", "Compact" ], - [ + [ "maxCapacity", "Compact" ] @@ -5303,7 +5516,7 @@ "debt", "u64" ], - [ + [ "haltOnError", "bool" ], @@ -6013,11 +6226,11 @@ "haltOnError", "bool" ], - [ + [ "orders", "Vec" ], - [ + [ "instructions", "Vec" ] @@ -6456,7 +6669,7 @@ ], [ "ClaimAsset", - "InstructionV2::ClaimAsset" + "InstructionV2::ClaimAsset" ], [ "Trap", @@ -7720,7 +7933,6 @@ "KeyValue": "(StorageKey, StorageData)", "KeyTypeId": "u32", "LookupSource": "Address", - "LookupTarget": "AccountId", "Perbill": "u32", "Permill": "u32",