1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
pub use pallet::*;
pub mod benchmarking;
#[cfg(test)]
mod mock;
#[frame_support::pallet]
pub mod pallet {
use frame_benchmarking::BenchmarkError;
use frame_support::{dispatch::Dispatchable, pallet_prelude::Encode, weights::GetDispatchInfo};
use xcm::latest::{MultiAssets, MultiLocation, Response};
#[pallet::config]
pub trait Config<I: 'static = ()>: frame_system::Config + crate::Config {
type Call: Dispatchable<Origin = Self::Origin>
+ GetDispatchInfo
+ From<frame_system::Call<Self>>
+ Encode;
fn worst_case_response() -> (u64, Response);
fn transact_origin() -> Result<MultiLocation, BenchmarkError>;
fn subscribe_origin() -> Result<MultiLocation, BenchmarkError>;
fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError>;
}
#[pallet::pallet]
pub struct Pallet<T, I = ()>(_);
}