forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Trusted Query API implementation for Westend and Rococo relay c…
…hains (paritytech#6212) Added missing API methods to Rococo and Westend parachains. Preparatory work for making chopstick tests run smoothly. Follow-up of [PR#6039](paritytech#6039)
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: "Added Trusted Query API calls for Westend and Rococo chains" | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
Added is_trusted_reserve and is_trusted_teleporter API calls to relay chains. | ||
Given an asset and a location, they return if the chain trusts that location as a reserve or teleporter for that asset respectively. | ||
You can implement them on your runtime by simply calling a helper function on `pallet-xcm`. | ||
```rust | ||
impl xcm_runtime_apis::trusted_query::TrustedQueryApi<Block> for Runtime { | ||
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> { | ||
PolkadotXcm::is_trusted_reserve(asset, location) | ||
} | ||
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> { | ||
PolkadotXcm::is_trusted_teleporter(asset, location) | ||
} | ||
} | ||
``` | ||
|
||
- audience: Runtime User | ||
description: | | ||
There's a new runtime API to check if a chain trust a Location as a reserve or teleporter for a given Asset. | ||
It's implemented in all the relays and system parachains in Westend and Rococo. | ||
|
||
crates: | ||
- name: westend-runtime | ||
bump: minor | ||
- name: rococo-runtime | ||
bump: minor |