Re-organize xcm types (#3914)
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { v0 } from './v0';
|
||||
import { v1 } from './v1';
|
||||
import { v2 } from './v2';
|
||||
|
||||
const xcm = {
|
||||
XcmOrigin: {
|
||||
_enum: {
|
||||
@@ -13,301 +17,10 @@ const xcm = {
|
||||
}
|
||||
},
|
||||
Xcm: 'XcmV1',
|
||||
XcmV0: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV0'
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV0',
|
||||
message: 'XcmV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmV1: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV1'
|
||||
},
|
||||
TransferAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV1',
|
||||
message: 'XcmV1'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmErrorV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocation, Xcm)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null'
|
||||
}
|
||||
},
|
||||
XcmErrorV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocationV1, XcmV1)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null'
|
||||
}
|
||||
},
|
||||
XcmErrorV2: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
MultiLocationFull: 'Null',
|
||||
MultiLocationNotInvertible: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null',
|
||||
Transport: 'Null',
|
||||
Unroutable: 'Null',
|
||||
UnknownWeightRequired: 'Null',
|
||||
Trap: 'u64',
|
||||
UnknownClaim: 'Null'
|
||||
}
|
||||
},
|
||||
XcmpMessageFormat: {
|
||||
_enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
|
||||
}
|
||||
};
|
||||
|
||||
const xmcOrder = {
|
||||
XcmOrder: 'XcmOrderV1',
|
||||
XcmOrderV0: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'Vec<MultiAssetV0>',
|
||||
receive: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
reserve: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV0',
|
||||
assets: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
xcm: 'Vec<XcmV0>'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmOrderV1: {
|
||||
_enum: {
|
||||
Noop: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'MultiLocationV1'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'MultiAssetFilterV1',
|
||||
receive: 'MultiAssetsV1'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
reserve: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV1',
|
||||
assets: 'MultiAssetFilterV1'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
orders: 'Vec<XcmOrderV1>',
|
||||
instructions: 'Vec<XcmV1>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const multiAsset = {
|
||||
XcmOrder: 'XcmOrderV1',
|
||||
XcmAssetId: {
|
||||
_enum: {
|
||||
Concrete: 'MultiLocation',
|
||||
@@ -315,32 +28,6 @@ const multiAsset = {
|
||||
}
|
||||
},
|
||||
AssetInstance: 'AssetInstanceV1',
|
||||
AssetInstanceV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index8: 'u8',
|
||||
Index16: 'Compact<u16>',
|
||||
Index32: 'Compact<u32>',
|
||||
Index64: 'Compact<u64>',
|
||||
Index128: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Vec<u8>'
|
||||
}
|
||||
},
|
||||
AssetInstanceV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Bytes'
|
||||
}
|
||||
},
|
||||
Fungibility: {
|
||||
_enum: {
|
||||
Fungible: 'u128',
|
||||
@@ -354,62 +41,12 @@ const multiAsset = {
|
||||
_enum: ['Ok', 'Suspended']
|
||||
},
|
||||
MultiAssetFilter: 'MultiAssetFilterV1',
|
||||
MultiAssetFilterV1: {
|
||||
_enum: {
|
||||
Definite: 'MultiAssetsV1',
|
||||
Wild: 'WildMultiAssetV1'
|
||||
}
|
||||
},
|
||||
MultiAsset: 'MultiAssetV1',
|
||||
MultiAssetV0: {
|
||||
_enum: {
|
||||
None: 'Null',
|
||||
All: 'Null',
|
||||
AllFungible: 'Null',
|
||||
AllNonFungible: 'Null',
|
||||
AllAbstractFungible: 'Vec<u8>',
|
||||
AllAbstractNonFungible: 'Vec<u8>',
|
||||
AllConcreteFungible: 'MultiLocationV0',
|
||||
AllConcreteNonFungible: 'MultiLocationV0',
|
||||
AbstractFungible: {
|
||||
id: 'Vec<u8>',
|
||||
instance: 'Compact<u128>'
|
||||
},
|
||||
AbstractNonFungible: {
|
||||
class: 'Vec<u8>',
|
||||
instance: 'AssetInstanceV0'
|
||||
},
|
||||
ConcreteFungible: {
|
||||
id: 'MultiLocationV0',
|
||||
amount: 'Compact<u128>'
|
||||
},
|
||||
ConcreteNonFungible: {
|
||||
class: 'MultiLocationV0',
|
||||
instance: 'AssetInstanceV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
MultiAssetV1: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'Fungibility'
|
||||
},
|
||||
MultiAssetV2: 'MultiAssetV1',
|
||||
MultiAssets: 'Vec<MultiAsset>',
|
||||
MultiAssetsV1: 'Vec<MultiAssetV1>',
|
||||
MultiAssetsV2: 'MultiAssetsV1',
|
||||
WildFungibility: {
|
||||
_enum: ['Fungible', 'NonFungible']
|
||||
},
|
||||
WildMultiAsset: 'WildMultiAssetV1',
|
||||
WildMultiAssetV1: {
|
||||
_enum: {
|
||||
All: 'Null',
|
||||
AllOf: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'WildFungibility'
|
||||
}
|
||||
}
|
||||
}
|
||||
WildMultiAsset: 'WildMultiAssetV1'
|
||||
};
|
||||
|
||||
const location = {
|
||||
@@ -495,9 +132,10 @@ export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...location,
|
||||
...multiAsset,
|
||||
...xcm,
|
||||
...xmcOrder,
|
||||
...v0,
|
||||
...v1,
|
||||
...v2,
|
||||
DoubleEncodedCall: {
|
||||
encoded: 'Vec<u8>'
|
||||
},
|
||||
@@ -505,28 +143,6 @@ export default {
|
||||
_enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']
|
||||
},
|
||||
Response: 'ResponseV1',
|
||||
ResponseV0: {
|
||||
_enum: {
|
||||
Assets: 'Vec<MultiAssetV0>'
|
||||
}
|
||||
},
|
||||
ResponseV1: {
|
||||
_enum: {
|
||||
Assets: 'MultiAssetsV1'
|
||||
}
|
||||
},
|
||||
ResponseV2: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
Assets: 'MultiAssetsV2',
|
||||
ExecutionResult: 'ResponseV2Result'
|
||||
}
|
||||
},
|
||||
ResponseV2Error: '(u32, XcmErrorV2)',
|
||||
ResponseV2Result: 'Result<Null, ResponseV2Error>',
|
||||
MultiLocationV0: 'MultiLocation',
|
||||
MultiLocationV1: 'MultiLocation',
|
||||
MultiLocationV2: 'MultiLocation',
|
||||
Outcome: {
|
||||
_enum: {
|
||||
Complete: 'Weight',
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v0: DefinitionsTypes = {
|
||||
AssetInstanceV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index8: 'u8',
|
||||
Index16: 'Compact<u16>',
|
||||
Index32: 'Compact<u32>',
|
||||
Index64: 'Compact<u64>',
|
||||
Index128: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Vec<u8>'
|
||||
}
|
||||
},
|
||||
MultiAssetV0: {
|
||||
_enum: {
|
||||
None: 'Null',
|
||||
All: 'Null',
|
||||
AllFungible: 'Null',
|
||||
AllNonFungible: 'Null',
|
||||
AllAbstractFungible: 'Vec<u8>',
|
||||
AllAbstractNonFungible: 'Vec<u8>',
|
||||
AllConcreteFungible: 'MultiLocationV0',
|
||||
AllConcreteNonFungible: 'MultiLocationV0',
|
||||
AbstractFungible: {
|
||||
id: 'Vec<u8>',
|
||||
instance: 'Compact<u128>'
|
||||
},
|
||||
AbstractNonFungible: {
|
||||
class: 'Vec<u8>',
|
||||
instance: 'AssetInstanceV0'
|
||||
},
|
||||
ConcreteFungible: {
|
||||
id: 'MultiLocationV0',
|
||||
amount: 'Compact<u128>'
|
||||
},
|
||||
ConcreteNonFungible: {
|
||||
class: 'MultiLocationV0',
|
||||
instance: 'AssetInstanceV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
MultiLocationV0: 'MultiLocation',
|
||||
ResponseV0: {
|
||||
_enum: {
|
||||
Assets: 'Vec<MultiAssetV0>'
|
||||
}
|
||||
},
|
||||
XcmV0: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV0'
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV0',
|
||||
message: 'XcmV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmErrorV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocation, Xcm)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null'
|
||||
}
|
||||
},
|
||||
XcmOrderV0: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'Vec<MultiAssetV0>',
|
||||
receive: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
reserve: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV0',
|
||||
assets: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
xcm: 'Vec<XcmV0>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,174 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v1: DefinitionsTypes = {
|
||||
AssetInstanceV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Bytes'
|
||||
}
|
||||
},
|
||||
MultiAssetsV1: 'Vec<MultiAssetV1>',
|
||||
MultiAssetV1: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'Fungibility'
|
||||
},
|
||||
MultiAssetFilterV1: {
|
||||
_enum: {
|
||||
Definite: 'MultiAssetsV1',
|
||||
Wild: 'WildMultiAssetV1'
|
||||
}
|
||||
},
|
||||
MultiLocationV1: 'MultiLocation',
|
||||
ResponseV1: {
|
||||
_enum: {
|
||||
Assets: 'MultiAssetsV1'
|
||||
}
|
||||
},
|
||||
WildMultiAssetV1: {
|
||||
_enum: {
|
||||
All: 'Null',
|
||||
AllOf: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'WildFungibility'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmV1: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV1'
|
||||
},
|
||||
TransferAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV1',
|
||||
message: 'XcmV1'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmErrorV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocationV1, XcmV1)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null'
|
||||
}
|
||||
},
|
||||
XcmOrderV1: {
|
||||
_enum: {
|
||||
Noop: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'MultiLocationV1'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'MultiAssetFilterV1',
|
||||
receive: 'MultiAssetsV1'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
reserve: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV1',
|
||||
assets: 'MultiAssetFilterV1'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
orders: 'Vec<XcmOrderV1>',
|
||||
instructions: 'Vec<XcmV1>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v2: DefinitionsTypes = {
|
||||
MultiAssetsV2: 'MultiAssetsV1',
|
||||
MultiAssetV2: 'MultiAssetV1',
|
||||
MultiLocationV2: 'MultiLocation',
|
||||
ResponseV2: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
Assets: 'MultiAssetsV2',
|
||||
ExecutionResult: 'ResponseV2Result'
|
||||
}
|
||||
},
|
||||
ResponseV2Error: '(u32, XcmErrorV2)',
|
||||
ResponseV2Result: 'Result<Null, ResponseV2Error>',
|
||||
XcmErrorV2: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
MultiLocationFull: 'Null',
|
||||
MultiLocationNotInvertible: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null',
|
||||
Transport: 'Null',
|
||||
Unroutable: 'Null',
|
||||
UnknownWeightRequired: 'Null',
|
||||
Trap: 'u64',
|
||||
UnknownClaim: 'Null'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user