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

Added Trusted Query API calls #6039

Merged
merged 32 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
529397e
WIP: trusted API implementation. Dunno how to convert VersionedAsset …
x3c41a Oct 7, 2024
1b2e653
finished tests and moved them to trusted_query file
x3c41a Oct 14, 2024
a3f2e18
code cleanup
x3c41a Oct 14, 2024
65d9f80
moved api implementation into pallet-xcm
x3c41a Oct 14, 2024
5190ae1
added API implementation for AH westend
x3c41a Oct 14, 2024
2eb2cfb
added error message to abstract asset test
x3c41a Oct 14, 2024
4fda268
formatted the test
x3c41a Oct 14, 2024
90bca8c
added new API to all the runtimes
x3c41a Oct 14, 2024
0c41137
Added missing penpal runtime and PRDOC
x3c41a Oct 14, 2024
a07ecfa
removed unused import
x3c41a Oct 15, 2024
a3b2378
formatted API
x3c41a Oct 15, 2024
e40a689
improved error logging
x3c41a Oct 16, 2024
a08d659
improved error logging[2]
x3c41a Oct 16, 2024
cbeb369
changed log::error! to log::trace
x3c41a Oct 16, 2024
f8fe180
Update prdoc/pr_6039.prdoc
x3c41a Oct 16, 2024
6925659
Update prdoc/pr_6039.prdoc
x3c41a Oct 16, 2024
fd30553
Update comment in polkadot/xcm/xcm-runtime-apis/src/lib.rs
x3c41a Oct 16, 2024
6993c51
Removed newline in polkadot/xcm/xcm-runtime-apis/tests/mock.rs
x3c41a Oct 16, 2024
de36457
Merge branch 'master' into new-runtime-call
franciscoaguirre Oct 16, 2024
4b715a1
changed logging to tracing
x3c41a Oct 16, 2024
451fcab
replaced tabs with spaces in the PRDOC
x3c41a Oct 16, 2024
873ebc4
formatted lib.rs
x3c41a Oct 16, 2024
688f164
added Invalid asset conversion test
x3c41a Oct 16, 2024
67c2e9b
unified API naming
x3c41a Oct 16, 2024
fe134b5
removed unwanted test
x3c41a Oct 16, 2024
909e711
changed bump from patch to minor
x3c41a Oct 16, 2024
bd36c5d
added API documentation
x3c41a Oct 16, 2024
8b75323
refactor leftovers
x3c41a Oct 16, 2024
2739f1d
tiny change to prdoc to re-run the check
x3c41a Oct 16, 2024
151745b
Merge branch 'master' into new-runtime-call
x3c41a Oct 16, 2024
bcbd187
refactored error name
x3c41a Oct 16, 2024
225a055
added XcmTrustedQueryResult type and removed extra argument lines
x3c41a Oct 17, 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
Prev Previous commit
Next Next commit
formatted API
x3c41a committed Oct 15, 2024
commit a3b23784b4e1f62fba99e97c9124a47b1e880be7
4 changes: 1 addition & 3 deletions polkadot/xcm/xcm-runtime-apis/tests/trusted_query.rs
x3c41a marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -16,9 +16,7 @@

mod mock;

use frame_support::sp_runtime::{
testing::H256,
};
use frame_support::sp_runtime::testing::H256;
use mock::*;
use sp_api::ProvideRuntimeApi;
use xcm::prelude::*;

Unchanged files with check annotations Beta

})?;
let ass: Asset = asset.try_into().map_err(|e| {
log::error!(
target: "xcm::TrustedQueryApi::is_trusted_teleporter",

Check failure on line 2612 in polkadot/xcm/pallet-xcm/src/lib.rs

GitHub Actions / cargo-check-all-crate-macos

failed to resolve: use of undeclared crate or module `log`
"Location version conversion failed with error: {:?}",
e,
);
Ok(<T::XcmExecutor as XcmAssetTransfers>::IsTeleporter::contains(&ass, &location))
}
pub fn query_delivery_fees(

Check failure on line 2621 in polkadot/xcm/pallet-xcm/src/lib.rs

GitHub Actions / cargo-check-all-crate-macos

failed to resolve: use of undeclared crate or module `log`
destination: VersionedLocation,
message: VersionedXcm<()>,
) -> Result<VersionedAssets, XcmPaymentApiError> {
let (_, fees) = validate_send::<T::XcmRouter>(destination, message).map_err(|error| {
log::error!(target: "xcm::pallet_xcm::query_delivery_fees", "Error when querying delivery fees: {:?}", error);
XcmPaymentApiError::Unroutable
})?;

Check failure on line 2637 in polkadot/xcm/pallet-xcm/src/lib.rs

GitHub Actions / cargo-check-all-crate-macos

failed to resolve: use of undeclared crate or module `log`
VersionedAssets::from(fees)
.into_version(result_version)
}
/// Create a new expectation of a query response with the querier being here.
fn do_new_query(

Check failure on line 2645 in polkadot/xcm/pallet-xcm/src/lib.rs

GitHub Actions / cargo-check-all-crate-macos

failed to resolve: use of undeclared crate or module `log`
responder: impl Into<Location>,
maybe_notify: Option<(u8, u8)>,
timeout: BlockNumberFor<T>,