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

[xcm] runtime api for LocationToAccount conversions #4857

Merged
merged 32 commits into from
Jun 26, 2024
Merged

Conversation

bkontur
Copy link
Contributor

@bkontur bkontur commented Jun 21, 2024

Closes: #4298

This PR also merges xcm-fee-payment-runtime-api module to the xcm-runtime-api.

TODO

Open questions

  • should we merge xcm-runtime-api and xcm-fee-payment-runtime-api to the one module xcm-runtime-api ?

Usage

Input:

  • location: VersionedLocation

Output:

  • account_id bytes

image

@bkontur bkontur added the T6-XCM This PR/Issue is related to XCM. label Jun 21, 2024
@bkontur bkontur marked this pull request as ready for review June 25, 2024 09:16
@bkontur bkontur requested a review from a team as a code owner June 25, 2024 09:16
Copy link
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

should we merge xcm-runtime-api and xcm-fee-payment-runtime-api to the one module xcm-runtime-api ?

that sounds good hygiene to me, makes sense to have a structure like:

xcm-runtime-api
|    mod conversions
|    mod dry_run
|    mod fees

prdoc/pr_4857.prdoc Show resolved Hide resolved
polkadot/xcm/xcm-runtime-api/src/conversions.rs Outdated Show resolved Hide resolved
bkontur and others added 3 commits June 26, 2024 12:17
…c/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6554913

@bkontur bkontur enabled auto-merge June 26, 2024 12:33
Copy link
Contributor

@franciscoaguirre franciscoaguirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

polkadot/xcm/xcm-runtime-api/Cargo.toml Outdated Show resolved Hide resolved
polkadot/xcm/xcm-runtime-api/tests/conversions.rs Outdated Show resolved Hide resolved
prdoc/pr_4857.prdoc Outdated Show resolved Hide resolved
@bkontur bkontur disabled auto-merge June 26, 2024 12:45
@bkontur bkontur enabled auto-merge June 26, 2024 13:08
@bkontur bkontur added this pull request to the merge queue Jun 26, 2024
Merged via the queue into master with commit 7506956 Jun 26, 2024
153 of 159 checks passed
@bkontur bkontur deleted the bko-xcm-runtime-api branch June 26, 2024 14:15
fgamundi pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jul 17, 2024
Closes: paritytech#4298

This PR also merges `xcm-fee-payment-runtime-api` module to the
`xcm-runtime-api`.

## TODO

- [x] rename `convert` to `convert_location` and add new one
`convert_account` (opposite direction)
- [x] add to the all testnet runtimes
- [x] check polkadot-js if supports that automatically or if needs to be
added manually polkadot-js/api#5917
- [ ] backport/patch for fellows and release (asap)

## Open questions
- [x] should we merge `xcm-runtime-api` and
`xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?

## Usage
Input:
 - `location:  VersionedLocation`

Output:
 - account_id bytes

![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml
#	cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
#	cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs
#	cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
#	cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs
#	cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
#	cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
#	cumulus/parachains/runtimes/people/people-westend/Cargo.toml
#	cumulus/parachains/runtimes/people/people-westend/src/lib.rs
#	cumulus/parachains/runtimes/testing/penpal/Cargo.toml
#	cumulus/parachains/runtimes/testing/penpal/src/lib.rs
#	cumulus/polkadot-parachain/Cargo.toml
#	polkadot/node/service/Cargo.toml
#	polkadot/runtime/rococo/Cargo.toml
#	polkadot/runtime/westend/Cargo.toml
#	polkadot/xcm/pallet-xcm/Cargo.toml
#	polkadot/xcm/xcm-runtime-apis/Cargo.toml
#	umbrella/Cargo.toml
#	umbrella/src/lib.rs
fgamundi pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jul 17, 2024
Closes: paritytech#4298

This PR also merges `xcm-fee-payment-runtime-api` module to the
`xcm-runtime-api`.

## TODO

- [x] rename `convert` to `convert_location` and add new one
`convert_account` (opposite direction)
- [x] add to the all testnet runtimes
- [x] check polkadot-js if supports that automatically or if needs to be
added manually polkadot-js/api#5917
- [ ] backport/patch for fellows and release (asap)

## Open questions
- [x] should we merge `xcm-runtime-api` and
`xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?

## Usage
Input:
 - `location:  VersionedLocation`

Output:
 - account_id bytes

![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml
#	cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
#	cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs
#	cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
#	cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs
#	cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
#	cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
#	cumulus/parachains/runtimes/people/people-westend/Cargo.toml
#	cumulus/parachains/runtimes/people/people-westend/src/lib.rs
#	cumulus/parachains/runtimes/testing/penpal/Cargo.toml
#	cumulus/parachains/runtimes/testing/penpal/src/lib.rs
#	cumulus/polkadot-parachain/Cargo.toml
#	polkadot/node/service/Cargo.toml
#	polkadot/runtime/rococo/Cargo.toml
#	polkadot/runtime/westend/Cargo.toml
#	polkadot/xcm/pallet-xcm/Cargo.toml
#	polkadot/xcm/xcm-runtime-apis/Cargo.toml
#	umbrella/Cargo.toml
#	umbrella/src/lib.rs
fgamundi pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Jul 17, 2024
Closes: paritytech#4298

This PR also merges `xcm-fee-payment-runtime-api` module to the
`xcm-runtime-api`.

## TODO

- [x] rename `convert` to `convert_location` and add new one
`convert_account` (opposite direction)
- [x] add to the all testnet runtimes
- [x] check polkadot-js if supports that automatically or if needs to be
added manually polkadot-js/api#5917
- [ ] backport/patch for fellows and release (asap)

## Open questions
- [x] should we merge `xcm-runtime-api` and
`xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?

## Usage
Input:
 - `location:  VersionedLocation`

Output:
 - account_id bytes

![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml
#	cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
#	cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs
#	cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
#	cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs
#	cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
#	cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
#	cumulus/parachains/runtimes/people/people-westend/Cargo.toml
#	cumulus/parachains/runtimes/people/people-westend/src/lib.rs
#	cumulus/parachains/runtimes/testing/penpal/Cargo.toml
#	cumulus/parachains/runtimes/testing/penpal/src/lib.rs
#	cumulus/polkadot-parachain/Cargo.toml
#	polkadot/node/service/Cargo.toml
#	polkadot/runtime/rococo/Cargo.toml
#	polkadot/runtime/westend/Cargo.toml
#	polkadot/xcm/pallet-xcm/Cargo.toml
#	polkadot/xcm/xcm-runtime-apis/Cargo.toml
#	umbrella/Cargo.toml
#	umbrella/src/lib.rs
girazoki pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Aug 1, 2024
Closes: paritytech#4298

This PR also merges `xcm-fee-payment-runtime-api` module to the
`xcm-runtime-api`.

## TODO

- [x] rename `convert` to `convert_location` and add new one
`convert_account` (opposite direction)
- [x] add to the all testnet runtimes
- [x] check polkadot-js if supports that automatically or if needs to be
added manually polkadot-js/api#5917
- [ ] backport/patch for fellows and release (asap)

## Open questions
- [x] should we merge `xcm-runtime-api` and
`xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?

## Usage
Input:
 - `location:  VersionedLocation`

Output:
 - account_id bytes

![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml
#	cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
#	cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
#	cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs
#	cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
#	cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
#	cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
#	cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs
#	cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
#	cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
#	cumulus/parachains/runtimes/people/people-westend/Cargo.toml
#	cumulus/parachains/runtimes/people/people-westend/src/lib.rs
#	cumulus/parachains/runtimes/testing/penpal/Cargo.toml
#	cumulus/parachains/runtimes/testing/penpal/src/lib.rs
#	cumulus/polkadot-parachain/Cargo.toml
#	polkadot/node/service/Cargo.toml
#	polkadot/runtime/rococo/Cargo.toml
#	polkadot/runtime/westend/Cargo.toml
#	polkadot/xcm/pallet-xcm/Cargo.toml
#	polkadot/xcm/xcm-runtime-apis/Cargo.toml
#	umbrella/Cargo.toml
#	umbrella/src/lib.rs
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Closes: paritytech#4298

This PR also merges `xcm-fee-payment-runtime-api` module to the
`xcm-runtime-api`.


## TODO

- [x] rename `convert` to `convert_location` and add new one
`convert_account` (opposite direction)
- [x] add to the all testnet runtimes
- [x] check polkadot-js if supports that automatically or if needs to be
added manually polkadot-js/api#5917
- [ ] backport/patch for fellows and release (asap)

## Open questions
- [x] should we merge `xcm-runtime-api` and
`xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?

## Usage
Input:
 - `location:  VersionedLocation`
 
Output:
 - account_id bytes


![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
fellowship-merge-bot bot pushed a commit to polkadot-fellows/runtimes that referenced this pull request Aug 7, 2024
…imes (#413)

Relates to: paritytech/polkadot-sdk#4298
Relates to: paritytech/polkadot-sdk#4857


<!-- Remember that you can run `/merge` to enable auto-merge in the PR
-->

<!-- Remember to modify the changelog. If you don't need to modify it,
you can check the following box.
Instead, if you have already modified it, simply delete the following
line. -->

- [ ] Does not require a CHANGELOG entry

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Dónal Murray <donalm@seadanda.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Runtime API for LocationToAccountId Conversion
6 participants