Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⏫ upgrade to Polkadot SDK v1.11.0 #212

Merged
merged 25 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2eff08b
refactor: :art: moved runtime apis into their own file
TDemeco Sep 27, 2024
303feb3
fix: :arrow_up: fix upgrade to polkadot-sdk v1.10.0
TDemeco Sep 27, 2024
e5ba5bd
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 27, 2024
3e4328d
fix: :bug: add removed runtime api `get_worst_case_scenario_slashable…
TDemeco Sep 27, 2024
3605611
fix: :bug: add missing generic in storage providers runtime api
TDemeco Sep 27, 2024
3659377
chore: :label: run typegen
TDemeco Sep 27, 2024
c1219f1
style: :rotating_light: run cargo fmt
TDemeco Sep 27, 2024
5ac0258
fix: :art: fix cargo clippy
TDemeco Sep 28, 2024
e82a113
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
91ae601
fix: :ambulance: fix mocked relay chain randomness
TDemeco Sep 28, 2024
97c0b64
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
787d1df
chore: :rotating_light: temporary remove unused import (until v1.13.0)
TDemeco Sep 28, 2024
9653a4e
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
6fb8bd4
fix: :adhesive_bandage: update `query_earliest_file_volunteer_tick` r…
TDemeco Sep 28, 2024
cde6b90
fix: :ambulance: fix issues with merge from main
TDemeco Sep 28, 2024
570e548
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
9bb33cc
feat: :package: initial update to polkadot sdk v1.11.0
TDemeco Sep 30, 2024
e28f09b
feat: :arrow_up: finish upgrade to polkadot sdk v1.11.0
TDemeco Sep 30, 2024
2947b01
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 30, 2024
5c07140
chore: :label: run typegen
TDemeco Sep 30, 2024
f86f2c1
Merge branch 'update/polkadot-sdk-1.10.0' into update/polkadot-sdk-1.…
TDemeco Sep 30, 2024
f4964fc
chore: :label: run typegen
TDemeco Sep 30, 2024
f85735d
fix: :white_check_mark: fix node tests after rebenchmark of balances …
TDemeco Oct 1, 2024
3d7b45e
Merge branch 'main' into update/polkadot-sdk-1.11.0
TDemeco Oct 3, 2024
ff49678
fix: :adhesive_bandage: fix merge from main
TDemeco Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,763 changes: 1,939 additions & 1,824 deletions Cargo.lock

Large diffs are not rendered by default.

201 changes: 101 additions & 100 deletions Cargo.toml

Large diffs are not rendered by default.

148 changes: 85 additions & 63 deletions api-augment/dist/interfaces/lookup.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api-augment/dist/interfaces/lookup.js.map

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions api-augment/dist/types/interfaces/augment-api-errors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,10 +793,6 @@ declare module "@polkadot/api-base/types/errors" {
* The unlock operation cannot succeed because there are still consumers of the lock.
**/
InUse: AugmentedError<ApiType>;
/**
* Invalid non-concrete asset.
**/
InvalidAssetNotConcrete: AugmentedError<ApiType>;
/**
* Invalid asset, reserve chain could not be determined for it.
**/
Expand Down Expand Up @@ -842,10 +838,6 @@ declare module "@polkadot/api-base/types/errors" {
* Too many assets with different reserve locations have been attempted for transfer.
**/
TooManyReserves: AugmentedError<ApiType>;
/**
* Could not decode XCM.
**/
UnableToDecode: AugmentedError<ApiType>;
/**
* The desired destination was unreachable, generally because there is a no way of routing
* to it.
Expand All @@ -855,11 +847,6 @@ declare module "@polkadot/api-base/types/errors" {
* The message's weight could not be determined.
**/
UnweighableMessage: AugmentedError<ApiType>;
/**
* XCM encoded length is too large.
* Returned when an XCM encoded length is larger than `MaxXcmEncodedSize`.
**/
XcmTooLarge: AugmentedError<ApiType>;
/**
* Generic error
**/
Expand Down
215 changes: 156 additions & 59 deletions api-augment/dist/types/interfaces/augment-api-tx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ import type {
SpRuntimeMultiSignature,
SpTrieStorageProofCompactProof,
SpWeightsWeightV2Weight,
StagingXcmExecutorAssetTransferTransferType,
StagingXcmV4Location,
StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters,
StorageHubRuntimeSessionKeys,
XcmV3WeightLimit,
XcmVersionedAssetId,
XcmVersionedAssets,
XcmVersionedLocation,
XcmVersionedXcm
Expand Down Expand Up @@ -2548,9 +2550,6 @@ declare module "@polkadot/api-base/types/submittable" {
* No more than `max_weight` will be used in its attempted execution. If this is less than
* the maximum amount of weight that the message could take to be executed, then no
* execution attempt will be made.
*
* WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob`
* instead.
**/
execute: AugmentedSubmittable<
(
Expand Down Expand Up @@ -2578,32 +2577,6 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedXcm, SpWeightsWeightV2Weight]
>;
/**
* Execute an XCM from a local, signed, origin.
*
* An event is deposited indicating whether the message could be executed completely
* or only partially.
*
* No more than `max_weight` will be used in its attempted execution. If this is less than
* the maximum amount of weight that the message could take to be executed, then no
* execution attempt will be made.
*
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
**/
executeBlob: AugmentedSubmittable<
(
encodedMessage: Bytes | string | Uint8Array,
maxWeight:
| SpWeightsWeightV2Weight
| {
refTime?: any;
proofSize?: any;
}
| string
| Uint8Array
) => SubmittableExtrinsic<ApiType>,
[Bytes, SpWeightsWeightV2Weight]
>;
/**
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
* version a destination can accept is unknown).
Expand Down Expand Up @@ -2938,9 +2911,6 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
>;
/**
* WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
**/
send: AugmentedSubmittable<
(
dest:
Expand Down Expand Up @@ -2972,33 +2942,6 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, XcmVersionedXcm]
>;
/**
* Send an XCM from a local, signed, origin.
*
* The destination, `dest`, will receive this message with a `DescendOrigin` instruction
* that makes the origin of the message be the origin on this system.
*
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
**/
sendBlob: AugmentedSubmittable<
(
dest:
| XcmVersionedLocation
| {
V2: any;
}
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
encodedMessage: Bytes | string | Uint8Array
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, Bytes]
>;
/**
* Teleport some assets from the local chain to some destination chain.
*
Expand Down Expand Up @@ -3154,6 +3097,160 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]
>;
/**
* Transfer assets from the local chain to the destination chain using explicit transfer
* types for assets and fees.
*
* `assets` must have same reserve location or may be teleportable to `dest`. Caller must
* provide the `assets_transfer_type` to be used for `assets`:
* - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
* assets to `beneficiary`.
* - `TransferType::DestinationReserve`: burn local assets and forward a notification to
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
* deposit them to `beneficiary`.
* - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
* chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
* XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
* the remote `reserve` is Asset Hub.
* - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
* mint/teleport assets and deposit them to `beneficiary`.
*
* On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
* buy execution using transferred `assets` identified by `remote_fees_id`.
* Make sure enough of the specified `remote_fees_id` asset is included in the given list
* of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
* at risk.
*
* `remote_fees_id` may use different transfer type than rest of `assets` and can be
* specified through `fees_transfer_type`.
*
* The caller needs to specify what should happen to the transferred assets once they reach
* the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
* contains the instructions to execute on `dest` as a final step.
* This is usually as simple as:
* `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
* but could be something more exotic like sending the `assets` even further.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `[Parent,
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
* relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
* parachain across a bridge to another ecosystem destination.
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
* fee on the `dest` (and possibly reserve) chains.
* - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
* - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
* - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
* - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
* transfer, which also determines what happens to the assets on the destination chain.
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
**/
transferAssetsUsingTypeAndThen: AugmentedSubmittable<
(
dest:
| XcmVersionedLocation
| {
V2: any;
}
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
assets:
| XcmVersionedAssets
| {
V2: any;
}
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
assetsTransferType:
| StagingXcmExecutorAssetTransferTransferType
| {
Teleport: any;
}
| {
LocalReserve: any;
}
| {
DestinationReserve: any;
}
| {
RemoteReserve: any;
}
| string
| Uint8Array,
remoteFeesId:
| XcmVersionedAssetId
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
feesTransferType:
| StagingXcmExecutorAssetTransferTransferType
| {
Teleport: any;
}
| {
LocalReserve: any;
}
| {
DestinationReserve: any;
}
| {
RemoteReserve: any;
}
| string
| Uint8Array,
customXcmOnDest:
| XcmVersionedXcm
| {
V2: any;
}
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
weightLimit:
| XcmV3WeightLimit
| {
Unlimited: any;
}
| {
Limited: any;
}
| string
| Uint8Array
) => SubmittableExtrinsic<ApiType>,
[
XcmVersionedLocation,
XcmVersionedAssets,
StagingXcmExecutorAssetTransferTransferType,
XcmVersionedAssetId,
StagingXcmExecutorAssetTransferTransferType,
XcmVersionedXcm,
XcmV3WeightLimit
]
>;
/**
* Generic tx
**/
Expand Down
Loading
Loading