Skip to content

Commit 8806cc2

Browse files
authored
feat: ⏫ upgrade to Polkadot SDK v1.11.0 (#212)
* refactor: 🎨 moved runtime apis into their own file * fix: ⬆️ fix upgrade to polkadot-sdk v1.10.0 * fix: 🐛 add removed runtime api `get_worst_case_scenario_slashable_amount` * fix: 🐛 add missing generic in storage providers runtime api * chore: 🏷️ run typegen * style: 🚨 run cargo fmt * fix: 🎨 fix cargo clippy * fix: 🚑 fix mocked relay chain randomness * style: 🚨 run cargo fmt * chore: 🚨 temporary remove unused import (until v1.13.0) * fix: 🩹 update `query_earliest_file_volunteer_tick` runtime api * fix: 🚑 fix issues with merge from main * style: 🚨 run cargo fmt * feat: 📦 initial update to polkadot sdk v1.11.0 * feat: ⬆️ finish upgrade to polkadot sdk v1.11.0 * chore: 🏷️ run typegen * chore: 🏷️ run typegen * fix: ✅ fix node tests after rebenchmark of balances pallet in v1.11.0 * fix: 🩹 fix merge from main
1 parent f347a67 commit 8806cc2

File tree

39 files changed

+3084
-2658
lines changed

39 files changed

+3084
-2658
lines changed

Cargo.lock

Lines changed: 1939 additions & 1824 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 101 additions & 100 deletions
Large diffs are not rendered by default.

api-augment/dist/interfaces/lookup.js

Lines changed: 85 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-augment/dist/interfaces/lookup.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-augment/dist/types/interfaces/augment-api-errors.d.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,6 @@ declare module "@polkadot/api-base/types/errors" {
793793
* The unlock operation cannot succeed because there are still consumers of the lock.
794794
**/
795795
InUse: AugmentedError<ApiType>;
796-
/**
797-
* Invalid non-concrete asset.
798-
**/
799-
InvalidAssetNotConcrete: AugmentedError<ApiType>;
800796
/**
801797
* Invalid asset, reserve chain could not be determined for it.
802798
**/
@@ -842,10 +838,6 @@ declare module "@polkadot/api-base/types/errors" {
842838
* Too many assets with different reserve locations have been attempted for transfer.
843839
**/
844840
TooManyReserves: AugmentedError<ApiType>;
845-
/**
846-
* Could not decode XCM.
847-
**/
848-
UnableToDecode: AugmentedError<ApiType>;
849841
/**
850842
* The desired destination was unreachable, generally because there is a no way of routing
851843
* to it.
@@ -855,11 +847,6 @@ declare module "@polkadot/api-base/types/errors" {
855847
* The message's weight could not be determined.
856848
**/
857849
UnweighableMessage: AugmentedError<ApiType>;
858-
/**
859-
* XCM encoded length is too large.
860-
* Returned when an XCM encoded length is larger than `MaxXcmEncodedSize`.
861-
**/
862-
XcmTooLarge: AugmentedError<ApiType>;
863850
/**
864851
* Generic error
865852
**/

api-augment/dist/types/interfaces/augment-api-tx.d.ts

Lines changed: 156 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ import type {
3131
SpRuntimeMultiSignature,
3232
SpTrieStorageProofCompactProof,
3333
SpWeightsWeightV2Weight,
34+
StagingXcmExecutorAssetTransferTransferType,
3435
StagingXcmV4Location,
3536
StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters,
3637
StorageHubRuntimeSessionKeys,
3738
XcmV3WeightLimit,
39+
XcmVersionedAssetId,
3840
XcmVersionedAssets,
3941
XcmVersionedLocation,
4042
XcmVersionedXcm
@@ -2548,9 +2550,6 @@ declare module "@polkadot/api-base/types/submittable" {
25482550
* No more than `max_weight` will be used in its attempted execution. If this is less than
25492551
* the maximum amount of weight that the message could take to be executed, then no
25502552
* execution attempt will be made.
2551-
*
2552-
* WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob`
2553-
* instead.
25542553
**/
25552554
execute: AugmentedSubmittable<
25562555
(
@@ -2578,32 +2577,6 @@ declare module "@polkadot/api-base/types/submittable" {
25782577
) => SubmittableExtrinsic<ApiType>,
25792578
[XcmVersionedXcm, SpWeightsWeightV2Weight]
25802579
>;
2581-
/**
2582-
* Execute an XCM from a local, signed, origin.
2583-
*
2584-
* An event is deposited indicating whether the message could be executed completely
2585-
* or only partially.
2586-
*
2587-
* No more than `max_weight` will be used in its attempted execution. If this is less than
2588-
* the maximum amount of weight that the message could take to be executed, then no
2589-
* execution attempt will be made.
2590-
*
2591-
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
2592-
**/
2593-
executeBlob: AugmentedSubmittable<
2594-
(
2595-
encodedMessage: Bytes | string | Uint8Array,
2596-
maxWeight:
2597-
| SpWeightsWeightV2Weight
2598-
| {
2599-
refTime?: any;
2600-
proofSize?: any;
2601-
}
2602-
| string
2603-
| Uint8Array
2604-
) => SubmittableExtrinsic<ApiType>,
2605-
[Bytes, SpWeightsWeightV2Weight]
2606-
>;
26072580
/**
26082581
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
26092582
* version a destination can accept is unknown).
@@ -2938,9 +2911,6 @@ declare module "@polkadot/api-base/types/submittable" {
29382911
) => SubmittableExtrinsic<ApiType>,
29392912
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
29402913
>;
2941-
/**
2942-
* WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
2943-
**/
29442914
send: AugmentedSubmittable<
29452915
(
29462916
dest:
@@ -2972,33 +2942,6 @@ declare module "@polkadot/api-base/types/submittable" {
29722942
) => SubmittableExtrinsic<ApiType>,
29732943
[XcmVersionedLocation, XcmVersionedXcm]
29742944
>;
2975-
/**
2976-
* Send an XCM from a local, signed, origin.
2977-
*
2978-
* The destination, `dest`, will receive this message with a `DescendOrigin` instruction
2979-
* that makes the origin of the message be the origin on this system.
2980-
*
2981-
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
2982-
**/
2983-
sendBlob: AugmentedSubmittable<
2984-
(
2985-
dest:
2986-
| XcmVersionedLocation
2987-
| {
2988-
V2: any;
2989-
}
2990-
| {
2991-
V3: any;
2992-
}
2993-
| {
2994-
V4: any;
2995-
}
2996-
| string
2997-
| Uint8Array,
2998-
encodedMessage: Bytes | string | Uint8Array
2999-
) => SubmittableExtrinsic<ApiType>,
3000-
[XcmVersionedLocation, Bytes]
3001-
>;
30022945
/**
30032946
* Teleport some assets from the local chain to some destination chain.
30042947
*
@@ -3154,6 +3097,160 @@ declare module "@polkadot/api-base/types/submittable" {
31543097
) => SubmittableExtrinsic<ApiType>,
31553098
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]
31563099
>;
3100+
/**
3101+
* Transfer assets from the local chain to the destination chain using explicit transfer
3102+
* types for assets and fees.
3103+
*
3104+
* `assets` must have same reserve location or may be teleportable to `dest`. Caller must
3105+
* provide the `assets_transfer_type` to be used for `assets`:
3106+
* - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
3107+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
3108+
* assets to `beneficiary`.
3109+
* - `TransferType::DestinationReserve`: burn local assets and forward a notification to
3110+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
3111+
* deposit them to `beneficiary`.
3112+
* - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
3113+
* chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
3114+
* XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
3115+
* the remote `reserve` is Asset Hub.
3116+
* - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
3117+
* mint/teleport assets and deposit them to `beneficiary`.
3118+
*
3119+
* On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
3120+
* buy execution using transferred `assets` identified by `remote_fees_id`.
3121+
* Make sure enough of the specified `remote_fees_id` asset is included in the given list
3122+
* of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
3123+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
3124+
* at risk.
3125+
*
3126+
* `remote_fees_id` may use different transfer type than rest of `assets` and can be
3127+
* specified through `fees_transfer_type`.
3128+
*
3129+
* The caller needs to specify what should happen to the transferred assets once they reach
3130+
* the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
3131+
* contains the instructions to execute on `dest` as a final step.
3132+
* This is usually as simple as:
3133+
* `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
3134+
* but could be something more exotic like sending the `assets` even further.
3135+
*
3136+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
3137+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
3138+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
3139+
* relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
3140+
* parachain across a bridge to another ecosystem destination.
3141+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
3142+
* fee on the `dest` (and possibly reserve) chains.
3143+
* - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
3144+
* - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
3145+
* - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
3146+
* - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
3147+
* transfer, which also determines what happens to the assets on the destination chain.
3148+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
3149+
**/
3150+
transferAssetsUsingTypeAndThen: AugmentedSubmittable<
3151+
(
3152+
dest:
3153+
| XcmVersionedLocation
3154+
| {
3155+
V2: any;
3156+
}
3157+
| {
3158+
V3: any;
3159+
}
3160+
| {
3161+
V4: any;
3162+
}
3163+
| string
3164+
| Uint8Array,
3165+
assets:
3166+
| XcmVersionedAssets
3167+
| {
3168+
V2: any;
3169+
}
3170+
| {
3171+
V3: any;
3172+
}
3173+
| {
3174+
V4: any;
3175+
}
3176+
| string
3177+
| Uint8Array,
3178+
assetsTransferType:
3179+
| StagingXcmExecutorAssetTransferTransferType
3180+
| {
3181+
Teleport: any;
3182+
}
3183+
| {
3184+
LocalReserve: any;
3185+
}
3186+
| {
3187+
DestinationReserve: any;
3188+
}
3189+
| {
3190+
RemoteReserve: any;
3191+
}
3192+
| string
3193+
| Uint8Array,
3194+
remoteFeesId:
3195+
| XcmVersionedAssetId
3196+
| {
3197+
V3: any;
3198+
}
3199+
| {
3200+
V4: any;
3201+
}
3202+
| string
3203+
| Uint8Array,
3204+
feesTransferType:
3205+
| StagingXcmExecutorAssetTransferTransferType
3206+
| {
3207+
Teleport: any;
3208+
}
3209+
| {
3210+
LocalReserve: any;
3211+
}
3212+
| {
3213+
DestinationReserve: any;
3214+
}
3215+
| {
3216+
RemoteReserve: any;
3217+
}
3218+
| string
3219+
| Uint8Array,
3220+
customXcmOnDest:
3221+
| XcmVersionedXcm
3222+
| {
3223+
V2: any;
3224+
}
3225+
| {
3226+
V3: any;
3227+
}
3228+
| {
3229+
V4: any;
3230+
}
3231+
| string
3232+
| Uint8Array,
3233+
weightLimit:
3234+
| XcmV3WeightLimit
3235+
| {
3236+
Unlimited: any;
3237+
}
3238+
| {
3239+
Limited: any;
3240+
}
3241+
| string
3242+
| Uint8Array
3243+
) => SubmittableExtrinsic<ApiType>,
3244+
[
3245+
XcmVersionedLocation,
3246+
XcmVersionedAssets,
3247+
StagingXcmExecutorAssetTransferTransferType,
3248+
XcmVersionedAssetId,
3249+
StagingXcmExecutorAssetTransferTransferType,
3250+
XcmVersionedXcm,
3251+
XcmV3WeightLimit
3252+
]
3253+
>;
31573254
/**
31583255
* Generic tx
31593256
**/

0 commit comments

Comments
 (0)