Statemint v14 types (#4045)
* Statemint v14 types * CHANGELOG * v4 & v5 * Adjust
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust Statemint known types for version 4+
|
||||
- Add Kusama & Polkadot upgrade blocks for 9100/9110
|
||||
- Adjust contracts `InstantiateReturnValue` type (no rent projection after 267)
|
||||
|
||||
|
||||
@@ -5,29 +5,44 @@
|
||||
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
import { mapXcm } from '@polkadot/types/interfaces/xcm/definitions';
|
||||
|
||||
const sharedTypes = {
|
||||
TAssetBalance: 'u128',
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'CancelProxy',
|
||||
'Assets',
|
||||
'AssetOwner',
|
||||
'AssetManager',
|
||||
'Staking'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// these are override types for Statemine, Statemint, Westmint
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, undefined],
|
||||
minmax: [0, 3],
|
||||
types: {
|
||||
TAssetBalance: 'u128',
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'CancelProxy',
|
||||
'Assets',
|
||||
'AssetOwner',
|
||||
'AssetManager',
|
||||
'Staking'
|
||||
]
|
||||
},
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
...sharedTypes,
|
||||
...mapXcm('V0')
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [4, 4],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...mapXcm('V1')
|
||||
}
|
||||
},
|
||||
{
|
||||
// metadata V14
|
||||
minmax: [5, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user