Skip to content

Commit

Permalink
no-op implementation of ForeignAssetCreatedHook and ForeignAssetDestr…
Browse files Browse the repository at this point in the history
…oyedHook for ()
  • Loading branch information
ParthDesai committed Mar 19, 2024
1 parent ad1fbb0 commit 625a5fb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pallets/foreign-asset-creator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,26 @@ pub trait ForeignAssetCreatedHook<ForeignAsset, AssetId, AssetBalance> {
);
}

impl<ForeignAsset, AssetId, AssetBalance>
ForeignAssetCreatedHook<ForeignAsset, AssetId, AssetBalance> for ()
{
fn on_asset_created(
_foreign_asset: &ForeignAsset,
_asset_id: &AssetId,
_min_balance: &AssetBalance,
) {
}
}

/// Trait for the OnForeignAssetDeregistered hook
pub trait ForeignAssetDestroyedHook<ForeignAsset, AssetId> {
fn on_asset_destroyed(foreign_asset: &ForeignAsset, asset_id: &AssetId);
}

impl<ForeignAsset, AssetId> ForeignAssetDestroyedHook<ForeignAsset, AssetId> for () {
fn on_asset_destroyed(_foreign_asset: &ForeignAsset, _asset_id: &AssetId) {}
}

#[pallet]
pub mod pallet {
use super::*;
Expand Down

0 comments on commit 625a5fb

Please sign in to comment.