Metadata bump (#4606)

* Metadata bump

* Detect BitSequence order

* Adjust
This commit is contained in:
Jaco
2022-02-26 10:29:41 +02:00
committed by GitHub
parent 8aff13b827
commit d5ae7031cd
16 changed files with 50 additions and 36 deletions
+2
View File
@@ -893,6 +893,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
@@ -867,6 +867,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+1 -1
View File
@@ -1680,7 +1680,7 @@ declare module '@polkadot/api-base/types/errors' {
/**
* The given asset ID is unknown.
**/
Unknown: AugmentedError<ApiType>;
UnknownClass: AugmentedError<ApiType>;
/**
* The delegate turned out to be different to what was expected.
**/
@@ -3655,7 +3655,7 @@ export default {
**/
PalletContractsScheduleLimits: {
eventTopics: 'u32',
stackHeight: 'u32',
stackHeight: 'Option<u32>',
globals: 'u32',
parameters: 'u32',
memoryPages: 'u32',
@@ -4185,7 +4185,7 @@ export default {
* Lookup534: pallet_uniques::pallet::Error<T, I>
**/
PalletUniquesError: {
_enum: ['NoPermission', 'Unknown', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved']
_enum: ['NoPermission', 'UnknownClass', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved']
},
/**
* Lookup536: pallet_transaction_storage::TransactionInfo
@@ -4018,7 +4018,7 @@ declare module '@polkadot/types/lookup' {
/** @name PalletContractsScheduleLimits (434) */
export interface PalletContractsScheduleLimits extends Struct {
readonly eventTopics: u32;
readonly stackHeight: u32;
readonly stackHeight: Option<u32>;
readonly globals: u32;
readonly parameters: u32;
readonly memoryPages: u32;
@@ -4669,7 +4669,7 @@ declare module '@polkadot/types/lookup' {
/** @name PalletUniquesError (534) */
export interface PalletUniquesError extends Enum {
readonly isNoPermission: boolean;
readonly isUnknown: boolean;
readonly isUnknownClass: boolean;
readonly isAlreadyExists: boolean;
readonly isWrongOwner: boolean;
readonly isBadWitness: boolean;
@@ -4678,7 +4678,7 @@ declare module '@polkadot/types/lookup' {
readonly isWrongDelegate: boolean;
readonly isNoDelegate: boolean;
readonly isUnapproved: boolean;
readonly type: 'NoPermission' | 'Unknown' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved';
readonly type: 'NoPermission' | 'UnknownClass' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved';
}
/** @name PalletTransactionStorageTransactionInfo (536) */
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 165,
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000900000000",
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000a00000000",
"docs": [
" Get the chain's current version."
]
@@ -5144,7 +5144,9 @@
},
"fallback": "0x00",
"docs": [
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included."
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included.",
"",
" Consider using the [`ParachainsCache`] type of modifying."
]
},
{
@@ -29103,7 +29103,7 @@
{
"name": null,
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -29237,7 +29237,7 @@
{
"name": "validator_indices",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -39631,13 +39631,13 @@
{
"name": "availability_votes",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "backers",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -40462,13 +40462,13 @@
{
"name": "votes_accept",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "votes_reject",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -41692,13 +41692,13 @@
{
"name": "validators_for",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
},
{
"name": "validators_against",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
},
{
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 158,
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000a00000000",
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000b00000000",
"docs": [
" Get the chain's current version."
]
@@ -4552,7 +4552,9 @@
},
"fallback": "0x00",
"docs": [
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included."
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included.",
"",
" Consider using the [`ParachainsCache`] type of modifying."
]
},
{
@@ -23661,7 +23661,7 @@
{
"name": null,
"type": 362,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -23795,7 +23795,7 @@
{
"name": "validator_indices",
"type": 362,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -36271,13 +36271,13 @@
{
"name": "availability_votes",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "backers",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -37102,13 +37102,13 @@
{
"name": "votes_accept",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "votes_reject",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
File diff suppressed because one or more lines are too long
@@ -3092,7 +3092,7 @@
{
"name": "Schedule",
"type": 433,
"value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000009f0b00007a1c0000ee20000066170000472700004e0c00009f150000ef1a00005000000058870200754504003d180000850c0000190f0000580c0000a7210000c7290000f70d0000046cac00080c0000300c00009a0b0000b20c0000c20b00007c0b0000f40b0000ed120000291300009d120000b11200009d120000d9120000a7120000e3120000151300001b120000c11100002f12000067110000612b0000412d0000072b0000ff2d0000e911000011120000e9110000b11200007f120000431200007f120000ed1200007a9c0700000000009abcb60100000000285c030000000000ea8b0700000000008e74070000000000e8a715000000000066880700000000001c870700000000005a8a070000000000a66b070000000000d4c3120000000000eebd030000000000a062070000000000730000000000000008331a0000000000c0000000000000001869e926000000007a45180000000000ea932c0000000000e0b99f07000000002603000000000000444c06000000000010a5b1070000000018010000000000006f00000000000000e83df00700000000bae0ad07000000006c0000000000000054f1a901000000006300000000000000ec49af01000000007c020000000000002836b307000000008102000000000000aa7c85080000000032c23e1300000000da624c0d000000000c047e080000000030d3010000000000d6e43e2e0000000097270000000000000106000000000000c4340c0000000000c1110000000000009a0c0e0000000000b80b00000000000002cc0900000000009704000000000000a4ac0900000000009b04000000000000a2a12b0900000000",
"value": "0x0400000000000100008000000010000000001000000001000020000000200000000040000000000200020000009f0b00008a1b0000e01f00008417000051270000080c0000b31500008b1a000028000000c8040100754d01002b070000df0c0000d30e0000860b000089210000bd290000bf0e00007550b100c20b0000b80b0000540b0000b20c0000fa0a0000c80a0000cc0b000089120000fd1100004d12000007120000fd110000751200004312000039120000a712000025120000ad110000851100002b1100000b2c0000372d0000e32b0000c32d000053110000491100005d110000e9110000431200003912000007120000f31100001ab10700000000004ac7b501000000009648030000000000d2a8070000000000fa9907000000000020b6150000000000689f070000000000b093070000000000fea4070000000000589607000000000020f512000000000050e8030000000000727c070000000000730000000000000088d01f0000000000bc0000000000000088b5f52600000000746e180000000000b4462d00000000005241a107000000002603000000000000e6590600000000000843b2070000000017010000000000006a000000000000005658ef0700000000d452ae0700000000680000000000000042fdaa01000000005e000000000000004677af01000000007002000000000000941fb307000000007802000000000000e697830800000000f2243a130000000002a0460d00000000589785080000000020d401000000000096383f2e000000000120000000000000ef0500000000000038610c0000000000ba11000000000000a83f0e0000000000ad0b0000000000006eec0900000000008904000000000000f8d0090000000000890400000000000082d12f0900000000",
"docs": [
" Cost schedule and limits."
]
@@ -3100,7 +3100,7 @@
{
"name": "DeletionQueueDepth",
"type": 4,
"value": "0x01460000",
"value": "0x52440000",
"docs": [
" The maximum number of contracts that can be pending for deletion.",
"",
@@ -28991,8 +28991,8 @@
},
{
"name": "stack_height",
"type": 4,
"typeName": "u32",
"type": 92,
"typeName": "Option<u32>",
"docs": []
},
{
@@ -34338,7 +34338,7 @@
]
},
{
"name": "Unknown",
"name": "UnknownClass",
"fields": [],
"index": 1,
"docs": [
@@ -104,7 +104,7 @@ function matchParts (first: string[], second: (string | Text)[]): boolean {
// check if the path matches the PATHS_ALIAS (with wildcards)
function getAliasPath (path: SiPath): string | null {
// TODO We need to handle ink! Balance in some way
return path.length && PATHS_ALIAS.some((p) => matchParts(p, path))
return path.length && PATHS_ALIAS.some((a) => matchParts(a, path))
? path[path.length - 1].toString()
: null;
}
@@ -514,8 +514,13 @@ export class PortableRegistry extends Struct implements ILookup {
}
#extractBitSequence (_: number, { bitOrderType, bitStoreType }: SiTypeDefBitSequence): TypeDef {
const bitOrder = this.#createSiDef(bitOrderType);
const bitStore = this.#createSiDef(bitStoreType);
// With the v3 of scale-info this swapped around, but obviously the decoder cannot determine
// the order. With that in-mind, we apply a detection for LSb0/Msb and set accordingly
const a = this.#createSiDef(bitOrderType);
const b = this.#createSiDef(bitStoreType);
const [bitOrder, bitStore] = ['bitvec::order::Lsb0', 'bitvec::order::Msb0'].includes(a.namespace || '')
? [a, b]
: [b, a];
// NOTE: Currently the BitVec type is one-way only, i.e. we only use it to decode, not
// re-encode stuff. As such we ignore the msb/lsb identifier given by bitOrderType, or rather
@@ -740,7 +745,7 @@ export class PortableRegistry extends Struct implements ILookup {
return this.getTypeDef(ids[0]);
}
const sub = ids.map((type) => this.#createSiDef(type));
const sub = ids.map((t) => this.#createSiDef(t));
return withTypeString(this.registry, {
info: TypeDefInfo.Tuple,