Check out/in assets when teleporting to maintain total issuance (#3007)

* Check out/in assets when teleporting to maintain total issuance

* Fixes

* Fixes

* Fixes

* Fixes

* Update xcm/xcm-executor/src/traits/transact_asset.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Docs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Gavin Wood
2021-05-12 08:39:16 +02:00
committed by GitHub
parent c68903f3bb
commit 41a93127a9
9 changed files with 179 additions and 15 deletions
+7
View File
@@ -26,6 +26,7 @@ use sp_runtime::{RuntimeDebug, traits::BadOrigin};
use frame_support::traits::{EnsureOrigin, OriginTrait, Filter, Get, Contains};
pub use pallet::*;
use frame_support::PalletId;
#[frame_support::pallet]
pub mod pallet {
@@ -33,6 +34,7 @@ pub mod pallet {
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use xcm_executor::traits::WeightBounds;
use sp_runtime::traits::AccountIdConversion;
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
@@ -198,6 +200,11 @@ pub mod pallet {
};
T::XcmRouter::send_xcm(dest, message)
}
pub fn check_account() -> T::AccountId {
const ID: PalletId = PalletId(*b"py/xcmch");
AccountIdConversion::<T::AccountId>::into_account(&ID)
}
}
}