Repository: chainx-org/ChainX (language: rust)

Issue:
Overhaul Events
Currently the namings of events in various xpallets are inconsistent, basically we should follow the rule of Substrate:

- app-friendly event description(https://github.com/paritytech/substrate/pull/6684)
- better to use passive voice(https://github.com/paritytech/substrate/pull/6960#discussion_r479937473)


Discussion / hints:

Fix patch:
diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs
index 41c8b6eda..013311998 100644
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -172,8 +172,7 @@ impl SignedExtension for BaseFilter {
                 FORBIDDEN_CALL,
             )));
         }
-
-        if XSystem::blocked_accounts(who) {
+        if XSystem::blacklist(who) {
             return Err(TransactionValidityError::from(InvalidTransaction::Custom(
                 FORBIDDEN_ACCOUNT,
             )));
diff --git a/scripts/chainx-js/res/chainx_types.json b/scripts/chainx-js/res/chainx_types.json
index 8b6487fed..672012393 100644
--- a/scripts/chainx-js/res/chainx_types.json
+++ b/scripts/chainx-js/res/chainx_types.json
@@ -5,8 +5,7 @@
             "Locked",
             "Reserved",
             "ReservedWithdrawal",
-            "ReservedDexSpot",
-            "ReservedXRC20"
+            "ReservedDexSpot"
         ]
     },
     "Chain": {
diff --git a/xpallets/assets-registrar/src/lib.rs b/xpallets/assets-registrar/src/lib.rs
index a037e3bb7..eae94ffb2 100644
--- a/xpallets/assets-registrar/src/lib.rs
+++ b/xpallets/assets-registrar/src/lib.rs
@@ -54,12 +54,12 @@ pub trait Trait: frame_system::Trait {
 decl_event!(
     /// Event for the XAssetRegistrar Module
     pub enum Event {
-        /// A new asset is registered. [asset_id, has_mining_rights]
-        Register(AssetId, bool),
-        /// A deregistered asset is recovered. [asset_id, has_mining_rights]
-        Recover(AssetId, bool),
-        /// An asset is invalid now. [asset_id]
-        Deregister(AssetId),
+        /// A new asset was registered. [asset_id, has_mining_rights]
+        Registered(AssetId, bool),
+        /// A deregistered asset was recovered. [asset_id, has_mining_rights]
+        Recovered(AssetId, bool),
+        /// An asset was deregistered. [asset_id]
+        Deregistered(AssetId),
     }
 );
 
@@ -144,8 +144,8 @@ decl_module! {
 
             Self::apply_register(asset_id, asset)?;
 
+            Self::deposit_event(Event::Registered(asset_id, has_mining_rights));
             T::RegistrarHandler::on_register(&asset_id, has_mining_rights)?;
-            Self::deposit_event(Event::Register(asset_id, has_mining_rights));
 
             if !is_online {
                 let _ = Self::deregister(frame_system::RawOrigin::Root.into(), asset_id);
@@ -166,9 +166,9 @@ decl_module! {
             ensure!(Self::is_valid(&id), Error::<T>::AssetIsInvalid);
 
             AssetOnline::remove(id);
-            T::RegistrarHandler::on_deregister(&id)?;
 
-            Self::deposit_event(Event::Deregister(id));
+            Self::deposit_event(Event::Deregistered(id));
+            T::RegistrarHandler::on_deregister(&id)?;
 
             Ok(())
         }
@@ -187,8 +187,8 @@ decl_module! {
 
             AssetOnline::insert(id, true);
 
+            Self::deposit_event(Event::Recovered(id, has_mining_rights));
             T::RegistrarHandler::on_register(&id, has_mining_rights)?;
-            Self::deposit_event(Event::Recover(id, has_mining_rights));
             Ok(())
         }
 
diff --git a/xpallets/assets/src/benchmarking.rs b/xpallets/assets/src/benchmarking.rs
index d7d9e4100..874fb81bb 100644
--- a/xpallets/assets/src/benchmarking.rs
+++ b/xpallets/assets/src/benchmarking.rs
@@ -51,7 +51,6 @@ benchmarks! {
         balances.insert(AssetType::Reserved, 1000.into());
         balances.insert(AssetType::ReservedWithdrawal, 1000.into());
         balances.insert(AssetType::ReservedDexSpot, 1000.into());
-        balances.insert(AssetType::ReservedXRC20, 1000.into());
     }: set_balance(RawOrigin::Root, user_lookup, ASSET_ID, balances.clone())
     verify {
         assert_eq!(XAssets::<T>::asset_balance(&user, &ASSET_ID), balances);
diff --git a/xpallets/assets/src/lib.rs b/xpallets/assets/src/lib.rs
index aaf0b651c..e8ebf2b5d 100644
--- a/xpallets/assets/src/lib.rs
+++ b/xpallets/assets/src/lib.rs
@@ -66,7 +66,7 @@ pub trait WeightInfo {
 /// The module's config trait.
 ///
 /// `frame_system::Trait` should always be included in our implied traits.
-pub trait Trait: frame_system::Trait + xpallet_assets_registrar::Trait {
+pub trait Trait: xpallet_assets_registrar::Trait {
     /// The overarching event type.
     type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
@@ -124,11 +124,15 @@ decl_event!(
         <T as frame_system::Trait>::AccountId,
         Balance = BalanceOf<T>,
     {
-        Move(AssetId, AccountId, AssetType, AccountId, AssetType, Balance),
-        Issue(AssetId, AccountId, Balance),
-        Destroy(AssetId, AccountId, Balance),
-        Set(AssetId, AccountId, AssetType, Balance),
-        /// Set restrictions for an asset
+        /// Some balances of an asset was moved from one to another. [asset_id, from, from_type, to, to_type, amount]
+        Moved(AssetId, AccountId, AssetType, AccountId, AssetType, Balance),
+        /// New balances of an asset were issued. [asset_id, receiver, amount]
+        Issued(AssetId, AccountId, Balance),
+        /// Some balances of an asset were destoryed. [asset_id, who, amount]
+        Destroyed(AssetId, AccountId, Balance),
+        /// Set asset balance of an account by root. [asset_id, who, asset_type, amount]
+        SetBalance(AssetId, AccountId, AssetType, Balance),
+        /// Set restrictions for an asset by root. [asset_id, assets_restrictions]
         SetRestrictions(AssetId, AssetRestrictions),
     }
 );
diff --git a/xpallets/assets/src/trigger.rs b/xpallets/assets/src/trigger.rs
index 6db3375aa..fe0c9c308 100644
--- a/xpallets/assets/src/trigger.rs
+++ b/xpallets/assets/src/trigger.rs
@@ -11,7 +11,7 @@ use crate::{BalanceOf, Event, Module, Trait};
 
 impl<AccountId, Balance> OnAssetChanged<AccountId, Balance> for () {}
 
-pub struct AssetChangedTrigger<T: Trait>(::sp_std::marker::PhantomData<T>);
+pub struct AssetChangedTrigger<T: Trait>(sp_std::marker::PhantomData<T>);
 
 impl<T: Trait> AssetChangedTrigger<T> {
     pub fn on_move_pre(
@@ -33,7 +33,7 @@ impl<T: Trait> AssetChangedTrigger<T> {
         to_type: AssetType,
         value: BalanceOf<T>,
     ) -> result::Result<(), AssetErr> {
-        Module::<T>::deposit_event(Event::<T>::Move(
+        Module::<T>::deposit_event(Event::<T>::Moved(
             *id,
             from.clone(),
             from_type,
@@ -50,7 +50,7 @@ impl<T: Trait> AssetChangedTrigger<T> {
     }
 
     pub fn on_issue_post(id: &AssetId, who: &T::AccountId, value: BalanceOf<T>) -> DispatchResult {
-        Module::<T>::deposit_event(Event::<T>::Issue(*id, who.clone(), value));
+        Module::<T>::deposit_event(Event::<T>::Issued(*id, who.clone(), value));
         T::OnAssetChanged::on_issue_post(id, who, value)?;
         Ok(())
     }
@@ -64,7 +64,7 @@ impl<T: Trait> AssetChangedTrigger<T> {
         who: &T::AccountId,
         value: BalanceOf<T>,
     ) -> DispatchResult {
-        Module::<T>::deposit_event(Event::<T>::Destroy(*id, who.clone(), value));
+        Module::<T>::deposit_event(Event::<T>::Destroyed(*id, who.clone(), value));
         T::OnAssetChanged::on_destroy_post(id, who, value)?;
         Ok(())
     }
@@ -75,7 +75,7 @@ impl<T: Trait> AssetChangedTrigger<T> {
         type_: AssetType,
         value: BalanceOf<T>,
     ) -> DispatchResult {
-        Module::<T>::deposit_event(Event::<T>::Set(*id, who.clone(), type_, value));
+        Module::<T>::deposit_event(Event::<T>::SetBalance(*id, who.clone(), type_, value));
         T::OnAssetChanged::on_set_balance(id, who, type_, value)?;
         Ok(())
     }
diff --git a/xpallets/assets/src/types.rs b/xpallets/assets/src/types.rs
index cbdd484e9..9e0b992a3 100644
--- a/xpallets/assets/src/types.rs
+++ b/xpallets/assets/src/types.rs
@@ -17,13 +17,12 @@ use frame_support::traits::LockIdentifier;
 
 use crate::{Error, Trait};
 
-const ASSET_TYPES: [AssetType; 6] = [
+const ASSET_TYPES: [AssetType; 5] = [
     AssetType::Usable,
     AssetType::Locked,
     AssetType::Reserved,
     AssetType::ReservedWithdrawal,
     AssetType::ReservedDexSpot,
-    AssetType::ReservedXRC20,
 ];
 
 #[derive(PartialEq, PartialOrd, Ord, Eq, Clone, Copy, Encode, Decode, RuntimeDebug)]
@@ -34,7 +33,6 @@ pub enum AssetType {
     Reserved,
     ReservedWithdrawal,
     ReservedDexSpot,
-    ReservedXRC20,
 }
 
 impl AssetType {
diff --git a/xpallets/dex/spot/src/execution/order.rs b/xpallets/dex/spot/src/execution/order.rs
index 6feea357a..663672f43 100644
--- a/xpallets/dex/spot/src/execution/order.rs
+++ b/xpallets/dex/spot/src/execution/order.rs
@@ -72,7 +72,7 @@ impl<T: Trait> Module<T> {
         // The order count of user should be increased after a new order is created.
         <OrderCountOf<T>>::insert(&who, order_id + 1);
 
-        Self::deposit_event(RawEvent::NewOrder(order.clone()));
+        Self::deposit_event(Event::<T>::NewOrder(order.clone()));
 
         order
     }
@@ -382,9 +382,9 @@ impl<T: Trait> Module<T> {
         Self::insert_executed_order(taker_order);
 
         // FIXME: The information delivered by these events seems be redundant.
-        Self::deposit_event(RawEvent::MakerOrderUpdated(maker_order.clone()));
-        Self::deposit_event(RawEvent::TakerOrderUpdated(taker_order.clone()));
-        Self::deposit_event(RawEvent::OrderExecuted(OrderExecutedInfo::new(
+        Self::deposit_event(Event::<T>::MakerOrderUpdated(maker_order.clone()));
+        Self::deposit_event(Event::<T>::TakerOrderUpdated(taker_order.clone()));
+        Self::deposit_event(Event::<T>::OrderExecuted(OrderExecutedInfo::new(
             trading_history_idx,
             pair_id,
             price,
@@ -416,7 +416,7 @@ impl<T: Trait> Module<T> {
 
         OrderInfoOf::<T>::insert(order.submitter(), order.id(), order.clone());
 
-        Self::deposit_event(RawEvent::CanceledOrderUpdated(order.clone()));
+        Self::deposit_event(Event::<T>::CanceledOrderUpdated(order.clone()));
 
         Ok(())
     }
diff --git a/xpallets/dex/spot/src/lib.rs b/xpallets/dex/spot/src/lib.rs
index aacd59cac..523851ca2 100644
--- a/xpallets/dex/spot/src/lib.rs
+++ b/xpallets/dex/spot/src/lib.rs
@@ -157,21 +157,21 @@ decl_event!(
         <T as frame_system::Trait>::BlockNumber,
         <T as Trait>::Price,
     {
-        /// A new order is created.
+        /// A new order was created. [order_info]
         NewOrder(Order<TradingPairId, AccountId, Balance, Price, BlockNumber>),
-        /// There is an update to the order due to it gets executed.
+        /// There was an update to the order due to it gets executed. [maker_order_info]
         MakerOrderUpdated(Order<TradingPairId, AccountId, Balance, Price, BlockNumber>),
-        /// There is an update to the order due to it gets executed.
+        /// There was an update to the order due to it gets executed. [taker_order_info]
         TakerOrderUpdated(Order<TradingPairId, AccountId, Balance, Price, BlockNumber>),
-        /// Overall information about the maker and taker orders when there is an order execution.
+        /// Overall information about the maker and taker orders when there was an order execution. [order_executed_info]
         OrderExecuted(OrderExecutedInfo<AccountId, Balance, BlockNumber, Price>),
-        /// There is an update to the order due to it gets canceled.
+        /// There is an update to the order due to it gets canceled. [order_info]
         CanceledOrderUpdated(Order<TradingPairId, AccountId, Balance, Price, BlockNumber>),
-        /// A new trading pair is added.
+        /// A new trading pair is added. [pair_profile]
         TradingPairAdded(TradingPairProfile),
-        /// Trading pair profile has been updated.
+        /// Trading pair profile has been updated. [pair_profile]
         TradingPairUpdated(TradingPairProfile),
-        /// Price fluctuation of trading pair has been updated.
+        /// Price fluctuation of trading pair has been updated. [pair_id, price_fluctuation]
         PriceFluctuationUpdated(TradingPairId, PriceFluctuation),
     }
 );
@@ -301,7 +301,7 @@ decl_module! {
         ) {
             ensure_root(origin)?;
             PriceFluctuationOf::insert(pair_id, new);
-            Self::deposit_event(RawEvent::PriceFluctuationUpdated(pair_id, new));
+            Self::deposit_event(Event::<T>::PriceFluctuationUpdated(pair_id, new));
         }
 
         /// Add a new trading pair.
@@ -340,7 +340,7 @@ decl_module! {
             let pair = Self::trading_pair(pair_id)?;
             ensure!(tick_decimals >= pair.tick_decimals, Error::<T>::InvalidTickdecimals);
             Self::apply_update_trading_pair(pair_id, tick_decimals, tradable);
-            Self::deposit_event(RawEvent::TradingPairUpdated(pair));
+            Self::deposit_event(Event::<T>::TradingPairUpdated(pair));
         }
     }
 }
@@ -401,7 +401,7 @@ impl<T: Trait> Module<T> {
 
         TradingPairCount::put(pair_id + 1);
 
-        Self::deposit_event(RawEvent::TradingPairAdded(pair));
+        Self::deposit_event(Event::<T>::TradingPairAdded(pair));
     }
 
     fn apply_update_trading_pair(pair_id: TradingPairId, tick_decimals: u32, tradable: bool) {
@@ -503,7 +503,7 @@ impl<T: Trait> xpallet_assets_registrar::RegistrarHandler for Module<T> {
                 if pair.base().eq(token) || pair.quote().eq(token) {
                     pair.tradable = false;
                     TradingPairOf::insert(i, &pair);
-                    Self::deposit_event(RawEvent::TradingPairUpdated(pair));
+                    Self::deposit_event(Event::<T>::TradingPairUpdated(pair));
                 }
             }
         }
diff --git a/xpallets/gateway/bitcoin/src/lib.rs b/xpallets/gateway/bitcoin/src/lib.rs
index 6bcb72ace..e4d722d79 100644
--- a/xpallets/gateway/bitcoin/src/lib.rs
+++ b/xpallets/gateway/bitcoin/src/lib.rs
@@ -166,28 +166,28 @@ decl_event!(
         <T as frame_system::Trait>::AccountId,
         Balance = BalanceOf<T>
     {
-        /// block hash
-        InsertHeader(H256),
-        /// tx hash, block hash, tx type
-        ProcessTx(H256, H256, BtcTxState),
-        /// Unclaimed deposit tx
+        /// A Bitcoin header was validated and inserted. [btc_header_hash]
+        HeaderInserted(H256),
+        /// A Bitcoin transaction was processed. [tx_hash, block_hash, tx_state]
+        TxProcessed(H256, H256, BtcTxState),
+        /// An account deposited some token. [tx_hash, who, amount]
+        Deposited(H256, AccountId, Balance),
+        /// A list of withdrawal applications were processed successfully. [tx_hash, withdrawal_ids, total_withdrawn]
+        Withdrawn(H256, Vec<u32>, Balance),
+        /// A new record of unclaimed deposit. [tx_hash]
         UnclaimedDeposit(H256),
-        /// who, balance, txhsah, Chain Addr
-        DepositPending(AccountId, Balance, H256, AddrStr),
-        /// create withdraw tx, who proposal, withdrawal list id
-        CreateWithdrawalProposal(AccountId, Vec<u32>),
-        /// Sign withdraw tx
-        SignWithdrawalProposal(AccountId, bool),
-        /// finish proposal and wait for broadcasting
-        FinishProposal(H256),
-        /// WithdrawalFatalErr, tx hash, Proposal hash,
+        /// A unclaimed deposit record was removed. [depositor, deposit_amount, tx_hash, chain_addr]
+        PendingDepositRemoved(AccountId, Balance, H256, AddrStr),
+        /// A new withdrawal proposal was created. [proposer, withdrawal_ids]
+        WithdrawalProposalCreated(AccountId, Vec<u32>),
+        /// A trustee voted/vetoed a withdrawal proposal. [trustee, vote_status]
+        WithdrawalProposalVoted(AccountId, bool),
+        /// A withdrawal proposal was dropped. [reject_count, total_count, withdrawal_ids]
+        WithdrawalProposalDropped(u32, u32, Vec<u32>),
+        /// The proposal has been processed successfully and is waiting for broadcasting. [tx_hash]
+        WithdrawalProposalCompleted(H256),
+        /// A fatal error happened during the withdrwal process. [tx_hash, proposal_hash]
         WithdrawalFatalErr(H256, H256),
-        /// reject_count, sum_count, withdrawal id list
-        DropWithdrawalProposal(u32, u32, Vec<u32>),
-        /// Deposit token for a account.
-        DepositToken(H256, AccountId, Balance),
-        /// Withdraw token for a list of withdrawal applications.
-        WithdrawToken(H256, Vec<u32>, Balance),
     }
 );
 
@@ -560,7 +560,7 @@ impl<T: Trait> Module<T> {
                 info!("[apply_push_header]|best index larger than this height|best height:{:}|this height{:}", best_index.height, header_info.height);
                 header::check_confirmed_header::<T>(&header_info)?;
             };
-            Self::deposit_event(RawEvent::InsertHeader(hash));
+            Self::deposit_event(Event::<T>::HeaderInserted(hash));
             Ok(())
         })
     }
@@ -603,7 +603,7 @@ impl<T: Trait> Module<T> {
 
         let state = tx::process_tx::<T>(tx.raw, prev)?;
         TxState::insert(&tx_hash, state);
-        Self::deposit_event(RawEvent::ProcessTx(tx_hash, block_hash, state));
+        Self::deposit_event(Event::<T>::TxProcessed(tx_hash, block_hash, state));
         match state.result {
             BtcTxResult::Success => Ok(()),
             BtcTxResult::Failed => Err(Error::<T>::ProcessTxFailed.into()),
diff --git a/xpallets/gateway/bitcoin/src/trustee.rs b/xpallets/gateway/bitcoin/src/trustee.rs
index eb24fc407..a04c920ea 100644
--- a/xpallets/gateway/bitcoin/src/trustee.rs
+++ b/xpallets/gateway/bitcoin/src/trustee.rs
@@ -28,7 +28,7 @@ use xpallet_support::{debug, error, info};
 use crate::tx::utils::{addr2vecu8, ensure_identical, parse_output_addr};
 use crate::tx::validator::parse_and_check_signed_tx;
 use crate::types::{BtcWithdrawalProposal, VoteResult};
-use crate::{Error, Module, RawEvent, Trait, WithdrawalProposal};
+use crate::{Error, Event, Module, Trait, WithdrawalProposal};
 
 pub fn trustee_session<T: Trait>(
 ) -> Result<TrusteeSessionInfo<T::AccountId, BtcTrusteeAddrInfo>, DispatchError> {
@@ -275,14 +275,14 @@ impl<T: Trait> Module<T> {
 
         info!("[apply_create_withdraw]|Through the legality check of withdrawal");
 
-        Self::deposit_event(RawEvent::CreateWithdrawalProposal(
+        Self::deposit_event(Event::<T>::WithdrawalProposalCreated(
             who.clone(),
             withdrawal_id_list,
         ));
 
         if apply_sig {
             info!("[apply_create_withdraw]apply sign after create proposal");
-            // due to `SignWithdrawalProposal` event should after `CreateWithdrawalProposal`, thus this function should after proposal
+            // due to `SignWithdrawalProposal` event should after `WithdrawalProposalCreated`, thus this function should after proposal
             // but this function would have an error return, this error return should not meet.
             if insert_trustee_vote_state::<T>(true, &who, &mut proposal.trustee_list).is_err() {
                 // should not be error in this function, if hit this branch, panic to clear all modification
@@ -343,7 +343,7 @@ impl<T: Trait> Module<T> {
                     info!("[apply_sig_withdraw]Signature completed: {:}", sigs_count);
                     proposal.sig_state = VoteResult::Finish;
 
-                    Self::deposit_event(RawEvent::FinishProposal(tx.hash()))
+                    Self::deposit_event(Event::<T>::WithdrawalProposalCompleted(tx.hash()))
                 } else {
                     proposal.sig_state = VoteResult::Unfinish;
                 }
@@ -380,7 +380,7 @@ impl<T: Trait> Module<T> {
 
                     WithdrawalProposal::<T>::kill();
 
-                    Self::deposit_event(RawEvent::DropWithdrawalProposal(
+                    Self::deposit_event(Event::<T>::WithdrawalProposalDropped(
                         reject_count as u32,
                         sig_num as u32,
                         proposal.withdrawal_id_list,
@@ -505,7 +505,7 @@ fn insert_trustee_vote_state<T: Trait>(
             );
         }
     }
-    Module::<T>::deposit_event(RawEvent::SignWithdrawalProposal(who.clone(), state));
+    Module::<T>::deposit_event(Event::<T>::WithdrawalProposalVoted(who.clone(), state));
     Ok(())
 }
 
diff --git a/xpallets/gateway/bitcoin/src/tx/mod.rs b/xpallets/gateway/bitcoin/src/tx/mod.rs
index 09c0ba688..25b074098 100644
--- a/xpallets/gateway/bitcoin/src/tx/mod.rs
+++ b/xpallets/gateway/bitcoin/src/tx/mod.rs
@@ -39,16 +39,14 @@ use crate::tx::utils::addr2vecu8;
 use crate::types::{
     AccountInfo, BtcAddress, BtcDepositCache, BtcTxResult, BtcTxState, DepositInfo, MetaTxType,
 };
-use crate::{BalanceOf, Module, PendingDeposits, RawEvent, Trait, WithdrawalProposal};
+use crate::{BalanceOf, Event, Module, PendingDeposits, Trait, WithdrawalProposal};
 
 pub fn process_tx<T: Trait>(
     tx: Transaction,
     prev: Option<Transaction>,
 ) -> result::Result<BtcTxState, DispatchError> {
     let meta_type = detect_transaction_type::<T>(&tx, prev.as_ref())?;
-    // process
     let state = handle_tx::<T>(tx, meta_type);
-
     Ok(state)
 }
 
@@ -357,10 +355,10 @@ fn deposit<T: Trait>(hash: H256, deposit_info: DepositInfo<T::AccountId>) -> Btc
 fn deposit_token<T: Trait>(tx_hash: H256, who: &T::AccountId, balance: u64) -> DispatchResult {
     let id: AssetId = <Module<T> as ChainT<_>>::ASSET_ID;
 
-    let b: BalanceOf<T> = balance.saturated_into();
-    match <xpallet_gateway_records::Module<T>>::deposit(&who, id, b) {
+    let value: BalanceOf<T> = balance.saturated_into();
+    match <xpallet_gateway_records::Module<T>>::deposit(&who, id, value) {
         Ok(a) => {
-            Module::<T>::deposit_event(RawEvent::DepositToken(tx_hash, who.clone(), b));
+            Module::<T>::deposit_event(Event::<T>::Deposited(tx_hash, who.clone(), value));
             Ok(a)
         }
         Err(e) => {
@@ -414,7 +412,7 @@ pub fn remove_pending_deposit<T: Trait>(input_address: &BtcAddress, who: &T::Acc
             who, r.balance, r.txid,
         );
 
-        Module::<T>::deposit_event(RawEvent::DepositPending(
+        Module::<T>::deposit_event(Event::<T>::PendingDepositRemoved(
             who.clone(),
             r.balance.saturated_into(),
             r.txid,
@@ -442,7 +440,7 @@ fn insert_pending_deposit<T: Trait>(input_address: &Address, txid: &H256, balanc
             );
             list.push(cache);
 
-            Module::<T>::deposit_event(RawEvent::UnclaimedDeposit(*txid));
+            Module::<T>::deposit_event(Event::<T>::UnclaimedDeposit(*txid));
         }
     });
 }
@@ -482,7 +480,7 @@ fn withdraw<T: Trait>(tx: Transaction) -> BtcTxResult {
             // real withdraw value would reduce withdraw_fee
             total -=
                 (proposal.withdrawal_id_list.len() as u64 * btc_withdrawal_fee).saturated_into();
-            Module::<T>::deposit_event(RawEvent::WithdrawToken(
+            Module::<T>::deposit_event(Event::<T>::Withdrawn(
                 tx_hash,
                 proposal.withdrawal_id_list,
                 total,
@@ -494,14 +492,17 @@ fn withdraw<T: Trait>(tx: Transaction) -> BtcTxResult {
             // re-store proposal into storage.
             WithdrawalProposal::<T>::put(proposal);
 
-            Module::<T>::deposit_event(RawEvent::WithdrawalFatalErr(proposal_hash, tx_hash));
+            Module::<T>::deposit_event(Event::<T>::WithdrawalFatalErr(proposal_hash, tx_hash));
             BtcTxResult::Failed
         }
     } else {
         error!("[withdraw]|Withdrawal failed, the proposal is EMPTY, but receive a withdrawal tx, please use root to fix it|tx hash:{:}", tx.hash());
 
         // no proposal, but find a withdraw tx, it's a fatal error in withdrawal
-        Module::<T>::deposit_event(RawEvent::WithdrawalFatalErr(tx.hash(), Default::default()));
+        Module::<T>::deposit_event(Event::<T>::WithdrawalFatalErr(
+            tx.hash(),
+            Default::default(),
+        ));
 
         BtcTxResult::Failed
     }
diff --git a/xpallets/gateway/common/src/brenchmarks/benchmarking.rs b/xpallets/gateway/common/src/benchmarks/benchmarking.rs
similarity index 99%
rename from xpallets/gateway/common/src/brenchmarks/benchmarking.rs
rename to xpallets/gateway/common/src/benchmarks/benchmarking.rs
index d42256ebb..4f72d4b56 100644
--- a/xpallets/gateway/common/src/brenchmarks/benchmarking.rs
+++ b/xpallets/gateway/common/src/benchmarks/benchmarking.rs
@@ -210,7 +210,7 @@ fn deposit_and_withdraw<T: Trait>(who: T::AccountId, amount: BalanceOf<T>) {
 #[cfg(test)]
 mod tests {
     use super::*;
-    use crate::brenchmarks::{ExtBuilder, Test};
+    use crate::benchmarks::{ExtBuilder, Test};
     use frame_support::assert_ok;
 
     #[test]
diff --git a/xpallets/gateway/common/src/brenchmarks/mock.rs b/xpallets/gateway/common/src/benchmarks/mock.rs
similarity index 100%
rename from xpallets/gateway/common/src/brenchmarks/mock.rs
rename to xpallets/gateway/common/src/benchmarks/mock.rs
diff --git a/xpallets/gateway/common/src/brenchmarks/mock_impls.rs b/xpallets/gateway/common/src/benchmarks/mock_impls.rs
similarity index 100%
rename from xpallets/gateway/common/src/brenchmarks/mock_impls.rs
rename to xpallets/gateway/common/src/benchmarks/mock_impls.rs
diff --git a/xpallets/gateway/common/src/brenchmarks/mod.rs b/xpallets/gateway/common/src/benchmarks/mod.rs
similarity index 95%
rename from xpallets/gateway/common/src/brenchmarks/mod.rs
rename to xpallets/gateway/common/src/benchmarks/mod.rs
index b9f091eee..7f9ad8233 100644
--- a/xpallets/gateway/common/src/brenchmarks/mod.rs
+++ b/xpallets/gateway/common/src/benchmarks/mod.rs
@@ -22,7 +22,7 @@ use mock::*;
 // for compile
 #[cfg(test)]
 mod tests {
-    use crate::brenchmarks::mock::ExtBuilder;
+    use crate::benchmarks::mock::ExtBuilder;
 
     #[test]
     fn base() {
diff --git a/xpallets/gateway/common/src/binding.rs b/xpallets/gateway/common/src/binding.rs
index 689f00c6e..ea4d4038e 100644
--- a/xpallets/gateway/common/src/binding.rs
+++ b/xpallets/gateway/common/src/binding.rs
@@ -28,7 +28,7 @@ impl<T: Trait> ChannelBinding<T::AccountId> for Module<T> {
                 match Self::channel_binding_of(who, chain) {
                     None => {
                         // set to storage
-                        Self::set_binding(chain, who.clone(), channel);
+                        Self::set_referral_binding(chain, who.clone(), channel);
                     }
                     Some(_channel) => {
                         debug!("[update_binding]|already has binding, do nothing|assert_id:{:}|chain:{:?}|who:{:?}|channel:{:?}", assert_id, chain, who, _channel);
diff --git a/xpallets/gateway/common/src/lib.rs b/xpallets/gateway/common/src/lib.rs
index 3d2fc3741..bd33af6b0 100644
--- a/xpallets/gateway/common/src/lib.rs
+++ b/xpallets/gateway/common/src/lib.rs
@@ -7,7 +7,7 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 #![allow(clippy::new_without_default, clippy::type_complexity)]
 
-mod brenchmarks;
+mod benchmarks;
 
 mod binding;
 pub mod extractor;
@@ -49,28 +49,35 @@ pub type BalanceOf<T> = <<T as xpallet_assets::Trait>::Currency as Currency<
     <T as frame_system::Trait>::AccountId,
 >>::Balance;
 
-pub trait Trait: frame_system::Trait + xpallet_gateway_records::Trait {
+pub trait Trait: xpallet_gateway_records::Trait {
     type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
     type Validator: Validator<Self::AccountId>;
+
     type DetermineMultisigAddress: MultisigAddressFor<Self::AccountId>;
+
     // for chain
     type Bitcoin: ChainT<BalanceOf<Self>>;
+
     type BitcoinTrustee: TrusteeForChain<
         Self::AccountId,
         trustees::bitcoin::BtcTrusteeType,
         trustees::bitcoin::BtcTrusteeAddrInfo,
     >;
+
     type WeightInfo: WeightInfo;
 }
 
 decl_event!(
     pub enum Event<T> where
         <T as frame_system::Trait>::AccountId,
-        GenericTrusteeSessionInfo = GenericTrusteeSessionInfo<<T as frame_system::Trait>::AccountId> {
+    {
+        /// A (potential) trustee set the required properties. [who, chain, trustee_props]
         SetTrusteeProps(AccountId, Chain, GenericTrusteeIntentionProps),
-        NewTrustees(Chain, u32, GenericTrusteeSessionInfo),
-        ChannelBinding(Chain, AccountId, AccountId),
+        /// An account set its referral_account of some chain. [who, chain, referral_account]
+        ReferralBinded(AccountId, Chain, AccountId),
+        /// The trustee set of a chain was changed. [chain, session_number, session_info]
+        TrusteeSetChanged(Chain, u32, GenericTrusteeSessionInfo<AccountId>),
     }
 );
 
@@ -103,6 +110,9 @@ decl_module! {
         type Error = Error<T>;
         fn deposit_event() = default;
 
+        /// Withdraws some balances of `asset_id` to address `addr` of target chain.
+        ///
+        /// NOTE: `ext` is for the compatiblity purpose, e.g., EOS requires a memo when doing the transfer.
         #[weight = <T as Trait>::WeightInfo::withdraw()]
         pub fn withdraw(
             origin,
@@ -112,7 +122,15 @@ decl_module! {
             ext: Memo
         ) -> DispatchResult {
             let who = ensure_signed(origin)?;
-            Self::apply_withdraw(who, asset_id, value, addr, ext)
+
+            ensure!(
+                xpallet_assets::Module::<T>::can_do(&asset_id, AssetRestrictions::WITHDRAW),
+                xpallet_assets::Error::<T>::ActionNotAllowed,
+            );
+            Self::verify_withdrawal(asset_id, value, &addr, &ext)?;
+
+            xpallet_gateway_records::Module::<T>::withdraw(&who, asset_id, value, addr, ext)?;
+            Ok(())
         }
 
         #[weight = <T as Trait>::WeightInfo::withdraw()]
@@ -190,12 +208,12 @@ decl_module! {
             origin,
             chain: Chain,
             who: <T::Lookup as StaticLookup>::Source,
-            binded: <T::Lookup as StaticLookup>::Source
+            referral: <T::Lookup as StaticLookup>::Source
         ) -> DispatchResult {
             ensure_root(origin)?;
             let who = T::Lookup::lookup(who)?;
-            let binded = T::Lookup::lookup(binded)?;
-            Self::set_binding(chain, who, binded);
+            let referral = T::Lookup::lookup(referral)?;
+            Self::set_referral_binding(chain, who, referral);
             Ok(())
         }
     }
@@ -258,24 +276,6 @@ decl_storage! {
 
 // withdraw
 impl<T: Trait> Module<T> {
-    fn apply_withdraw(
-        who: T::AccountId,
-        asset_id: AssetId,
-        value: BalanceOf<T>,
-        addr: AddrStr,
-        ext: Memo,
-    ) -> DispatchResult {
-        ensure!(
-            xpallet_assets::Module::<T>::can_do(&asset_id, AssetRestrictions::WITHDRAW),
-            xpallet_assets::Error::<T>::ActionNotAllowed,
-        );
-
-        Self::verify_withdrawal(asset_id, value, &addr, &ext)?;
-
-        xpallet_gateway_records::Module::<T>::withdraw(&who, asset_id, value, addr, ext)?;
-        Ok(())
-    }
-
     pub fn withdrawal_limit(
         asset_id: &AssetId,
     ) -> result::Result<WithdrawalLimit<BalanceOf<T>>, DispatchError> {
@@ -349,7 +349,7 @@ impl<T: Trait> Module<T> {
         });
 
         TrusteeIntentionPropertiesOf::<T>::insert(&who, chain, props.clone());
-        Self::deposit_event(RawEvent::SetTrusteeProps(who, chain, props));
+        Self::deposit_event(Event::<T>::SetTrusteeProps(who, chain, props));
         Ok(())
     }
 
@@ -404,15 +404,14 @@ impl<T: Trait> Module<T> {
         let multi_addr = Self::generate_multisig_addr(chain, &info)?;
 
         let session_number = Self::trustee_session_info_len(chain);
-        let next_number = match session_number.checked_add(1) {
-            Some(n) => n,
-            None => 0_u32,
-        };
+        // FIXME: rethink about the overflow case.
+        let next_number = session_number.checked_add(1).unwrap_or(0u32);
 
         TrusteeSessionInfoLen::insert(chain, next_number);
-        TrusteeSessionInfoOf::<T>::insert(chain, session_number, info);
-
+        TrusteeSessionInfoOf::<T>::insert(chain, session_number, info.clone());
         TrusteeMultiSigAddr::<T>::insert(chain, multi_addr);
+
+        Self::deposit_event(Event::<T>::TrusteeSetChanged(chain, session_number, info));
         Ok(())
     }
 
@@ -434,10 +433,9 @@ impl<T: Trait> Module<T> {
         Ok(multi_addr)
     }
 
-    fn set_binding(chain: Chain, who: T::AccountId, binded: T::AccountId) {
-        ChannelBindingOf::<T>::insert(&who, &chain, binded.clone());
-
-        Self::deposit_event(RawEvent::ChannelBinding(chain, who, binded))
+    fn set_referral_binding(chain: Chain, who: T::AccountId, referral: T::AccountId) {
+        ChannelBindingOf::<T>::insert(&who, &chain, referral.clone());
+        Self::deposit_event(Event::<T>::ReferralBinded(who, chain, referral))
     }
 }
 
diff --git a/xpallets/gateway/records/src/lib.rs b/xpallets/gateway/records/src/lib.rs
index 84d3ffa1c..1ea38fa40 100644
--- a/xpallets/gateway/records/src/lib.rs
+++ b/xpallets/gateway/records/src/lib.rs
@@ -41,7 +41,7 @@ pub type WithdrawalRecordOf<T> = WithdrawalRecord<
 /// The module's config trait.
 ///
 /// `frame_system::Trait` should always be included in our implied traits.
-pub trait Trait: frame_system::Trait + xpallet_assets::Trait {
+pub trait Trait: xpallet_assets::Trait {
     /// The overarching event type.
     type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
@@ -75,11 +75,17 @@ decl_event!(
         Balance = BalanceOf<T>,
         WithdrawalRecord = WithdrawalRecordOf<T>
     {
+        /// An account deposited some asset. [who, asset_id, amount]
         Deposited(AccountId, AssetId, Balance),
-        WithdrawalApplied(WithdrawalRecordId, WithdrawalRecord),
+        /// A withdrawal application was created. [withdrawal_id, record_info]
+        WithdrawalCreated(WithdrawalRecordId, WithdrawalRecord),
+        /// A withdrawal proposal was processed. [withdrawal_id]
         WithdrawalProcessed(WithdrawalRecordId),
+        /// A withdrawal proposal was recovered. [withdrawal_id]
         WithdrawalRecovered(WithdrawalRecordId),
+        /// A withdrawal proposal was canceled. [withdrawal_id, withdrawal_state]
         WithdrawalCanceled(WithdrawalRecordId, WithdrawalState),
+        /// A withdrawal proposal was finished successfully. [withdrawal_id, withdrawal_state]
         WithdrawalFinished(WithdrawalRecordId, WithdrawalState),
     }
 );
@@ -199,7 +205,7 @@ impl<T: Trait> Module<T> {
 impl<T: Trait> Module<T> {
     /// Deposit asset.
     ///
-    /// Note: this func has include deposit_init and deposit_finish (not wait for block confirm process)
+    /// NOTE: this function has included deposit_init and deposit_finish (not wait for block confirm)
     pub fn deposit(who: &T::AccountId, asset_id: AssetId, balance: BalanceOf<T>) -> DispatchResult {
         xpallet_assets::Module::<T>::ensure_not_native_asset(&asset_id)?;
 
@@ -217,7 +223,7 @@ impl<T: Trait> Module<T> {
     ///
     /// WithdrawalRecord State: `Applying`
     ///
-    /// Note: this func has include withdrawal_init and withdrawal_locking
+    /// NOTE: this function has included withdrawal_init and withdrawal_locking.
     pub fn withdraw(
         who: &T::AccountId,
         asset_id: AssetId,
@@ -251,7 +257,7 @@ impl<T: Trait> Module<T> {
         let next_id = id.checked_add(1_u32).unwrap_or(0);
         NextWithdrawalRecordId::put(next_id);
 
-        Self::deposit_event(Event::<T>::WithdrawalApplied(id, record));
+        Self::deposit_event(Event::<T>::WithdrawalCreated(id, record));
         Ok(())
     }
 
@@ -361,7 +367,7 @@ impl<T: Trait> Module<T> {
     ///
     /// WithdrawalRecord State: `Processing` ==> `NormalFinish`
     ///
-    /// Note:
+    /// NOTE:
     /// when the withdrawal id is passed by runtime self logic, just pass `None`,
     /// when the withdrawal id is passed by the parameter from call(which means the id is from outside),
     /// should pass `Some(chain)` to verify whether the withdrawal is related to this chain.
diff --git a/xpallets/mining/asset/src/impls.rs b/xpallets/mining/asset/src/impls.rs
index b340e9617..ca68c1bcb 100644
--- a/xpallets/mining/asset/src/impls.rs
+++ b/xpallets/mining/asset/src/impls.rs
@@ -224,7 +224,7 @@ impl<T: Trait> Claim<T::AccountId> for Module<T> {
             miner_ledger.last_claim = Some(current_block);
         });
 
-        Self::deposit_event(RawEvent::Claim(claimer.clone(), *claimee, dividend));
+        Self::deposit_event(Event::<T>::Claimed(claimer.clone(), *claimee, dividend));
 
         Ok(())
     }
diff --git a/xpallets/mining/asset/src/lib.rs b/xpallets/mining/asset/src/lib.rs
index c191e0d56..531fced69 100644
--- a/xpallets/mining/asset/src/lib.rs
+++ b/xpallets/mining/asset/src/lib.rs
@@ -143,8 +143,8 @@ decl_event!(
         Balance = BalanceOf<T>,
         <T as frame_system::Trait>::AccountId,
     {
-        /// Claimed the asset mining rewards. [claimer, asset_id, amount]
-        Claim(AccountId, AssetId, Balance),
+        /// An asset miner claimed the mining reward. [claimer, asset_id, amount]
+        Claimed(AccountId, AssetId, Balance),
     }
 );
 
diff --git a/xpallets/mining/staking/src/impls.rs b/xpallets/mining/staking/src/impls.rs
index 823ff0da6..7840e4661 100644
--- a/xpallets/mining/staking/src/impls.rs
+++ b/xpallets/mining/staking/src/impls.rs
@@ -201,7 +201,11 @@ impl<T: Trait> Claim<T::AccountId> for Module<T> {
 
         Self::allocate_dividend(claimer, &claimee_pot, dividend)?;
 
-        Self::deposit_event(RawEvent::Claim(claimer.clone(), claimee.clone(), dividend));
+        Self::deposit_event(Event::<T>::Claimed(
+            claimer.clone(),
+            claimee.clone(),
+            dividend,
+        ));
 
         let new_target_weight = target_weight - source_weight;
 
@@ -223,7 +227,7 @@ impl<T: Trait> Module<T> {
             let force_chilled = Self::slash_offenders_in_session(offenders, validator_rewards);
             if !force_chilled.is_empty() {
                 debug!("Force chilled: {:?}", force_chilled);
-                Self::deposit_event(RawEvent::ForceChilled(session_index, force_chilled));
+                Self::deposit_event(Event::<T>::ForceChilled(session_index, force_chilled));
                 // Force a new era if some offender's reward pot has been wholly slashed.
                 Self::ensure_new_era();
             }
diff --git a/xpallets/mining/staking/src/lib.rs b/xpallets/mining/staking/src/lib.rs
index 9381a3242..98b121cc6 100644
--- a/xpallets/mining/staking/src/lib.rs
+++ b/xpallets/mining/staking/src/lib.rs
@@ -232,20 +232,20 @@ decl_event!(
         <T as frame_system::Trait>::AccountId
     {
         /// Issue new balance to this account. [account, reward_amount]
-        Mint(AccountId, Balance),
-        /// One validator (and its reward pot) has been slashed by the given amount. [validator, slashed_amount]
-        Slash(AccountId, Balance),
-        /// Nominator has bonded to the validator this amount. [nominator, validator, amount]
-        Bond(AccountId, AccountId, Balance),
-        /// Nominator switched the vote from one validator to another. [nominator, from, to, amount]
-        Rebond(AccountId, AccountId, AccountId, Balance),
-        /// An account has unbonded this amount. [nominator, validator, amount]
-        Unbond(AccountId, AccountId, Balance),
-        /// Claim the staking dividend. [nominator, validator, dividend]
-        Claim(AccountId, AccountId, Balance),
-        /// The nominator has withdrawn the locked balance due to the unbond operation. [nominator, amount]
-        UnlockUnbondedWithdrawal(AccountId, Balance),
-        /// Offenders are forcibly to be chilled due to insufficient reward pot balance. [session_index, chilled_validators]
+        Minted(AccountId, Balance),
+        /// A validator (and its reward pot) was slashed. [validator, slashed_amount]
+        Slashed(AccountId, Balance),
+        /// A nominator bonded to the validator this amount. [nominator, validator, amount]
+        Bonded(AccountId, AccountId, Balance),
+        /// A nominator switched the vote from one validator to another. [nominator, from, to, amount]
+        Rebonded(AccountId, AccountId, AccountId, Balance),
+        /// A nominator unbonded this amount. [nominator, validator, amount]
+        Unbonded(AccountId, AccountId, Balance),
+        /// A nominator claimed the staking dividend. [nominator, validator, dividend]
+        Claimed(AccountId, AccountId, Balance),
+        /// The nominator withdrew the locked balance from the unlocking queue. [nominator, amount]
+        Withdrawn(AccountId, Balance),
+        /// Offenders were forcibly to be chilled due to insufficient reward pot balance. [session_index, chilled_validators]
         ForceChilled(SessionIndex, Vec<AccountId>),
     }
 );
@@ -394,7 +394,7 @@ decl_module! {
                 nominator.unbonded_chunks = unbonded_chunks;
             });
 
-            Self::deposit_event(RawEvent::UnlockUnbondedWithdrawal(sender, value));
+            Self::deposit_event(Event::<T>::Withdrawn(sender, value));
         }
 
         /// Claim the staking reward given the `target` validator.
@@ -906,7 +906,11 @@ impl<T: Trait> Module<T> {
     ) -> DispatchResult {
         Self::bond_reserve(nominator, value)?;
         Self::update_vote_weight(nominator, nominee, Delta::Add(value));
-        Self::deposit_event(RawEvent::Bond(nominator.clone(), nominee.clone(), value));
+        Self::deposit_event(Event::<T>::Bonded(
+            nominator.clone(),
+            nominee.clone(),
+            value,
+        ));
         Ok(())
     }
 
@@ -922,7 +926,7 @@ impl<T: Trait> Module<T> {
         LastRebondOf::<T>::mutate(who, |last_rebond| {
             *last_rebond = Some(current_block);
         });
-        Self::deposit_event(RawEvent::Rebond(
+        Self::deposit_event(Event::<T>::Rebonded(
             who.clone(),
             from.clone(),
             to.clone(),
@@ -977,7 +981,7 @@ impl<T: Trait> Module<T> {
 
         Self::update_vote_weight(who, target, Delta::Sub(value));
 
-        Self::deposit_event(RawEvent::Unbond(who.clone(), target.clone(), value));
+        Self::deposit_event(Event::<T>::Unbonded(who.clone(), target.clone(), value));
 
         Ok(())
     }
diff --git a/xpallets/mining/staking/src/reward/mod.rs b/xpallets/mining/staking/src/reward/mod.rs
index f477b1c2b..ee007f324 100644
--- a/xpallets/mining/staking/src/reward/mod.rs
+++ b/xpallets/mining/staking/src/reward/mod.rs
@@ -34,7 +34,7 @@ impl<T: Trait> Module<T> {
     #[inline]
     pub(crate) fn mint(receiver: &T::AccountId, value: BalanceOf<T>) {
         T::Currency::deposit_creating(receiver, value);
-        Self::deposit_event(RawEvent::Mint(receiver.clone(), value));
+        Self::deposit_event(Event::<T>::Minted(receiver.clone(), value));
     }
 
     /// Reward a (potential) validator by a specific amount.
diff --git a/xpallets/system/src/lib.rs b/xpallets/system/src/lib.rs
index 4b3e700c6..051f75077 100644
--- a/xpallets/system/src/lib.rs
+++ b/xpallets/system/src/lib.rs
@@ -4,6 +4,8 @@
 
 use sp_std::{collections::btree_map::BTreeMap, prelude::*};
 
+use sp_runtime::traits::StaticLookup;
+
 use frame_support::{
     decl_error, decl_event, decl_module, decl_storage,
     dispatch::{CallMetadata, DispatchResult},
@@ -11,7 +13,6 @@ use frame_support::{
     IterableStorageMap,
 };
 use frame_system::ensure_root;
-use sp_runtime::traits::StaticLookup;
 
 use xpallet_protocol::NetworkType;
 
@@ -44,11 +45,11 @@ decl_event!(
         Balance = BalanceOf<T>,
         <T as frame_system::Trait>::AccountId,
     {
-        /// An account is blocked.
-        BlockAccount(AccountId),
-        /// The blocked status of an account is revoked.
-        RevokeBlockedAccount(AccountId),
-        /// Transaction fee is paid to the block author and its reward pot in 10:90.
+        /// An account was added to the blacklist. [who]
+        Blacklisted(AccountId),
+        /// An account was removed from the blacklist. [who]
+        Unblacklisted(AccountId),
+        /// Transaction fee was paid to the block author and its reward pot in 10:90.
         /// [author, author_fee, reward_pot, reward_pot_fee]
         TransactionFeePaid(AccountId, Balance, AccountId, Balance),
     }
@@ -62,8 +63,8 @@ decl_storage! {
         /// Paused pallet call.
         pub Paused get(fn paused): map hasher(twox_64_concat) Vec<u8> => BTreeMap<Vec<u8>, ()>;
 
-        /// Blocked account ids.
-        pub BlockedAccounts get(fn blocked_accounts): map hasher(blake2_128_concat) T::AccountId => bool;
+        /// The accounts that are blocked.
+        pub Blacklist get(fn blacklist): map hasher(blake2_128_concat) T::AccountId => bool;
     }
 }
 
@@ -108,20 +109,20 @@ decl_module! {
             Ok(())
         }
 
-        /// Modify the blocked status of the given account id.
+        /// Toggle the blacklist status of the given account id.
         ///
         /// This is a root-only operation.
         #[weight = 0]
-        fn modify_blocked_list(origin, who: <T::Lookup as StaticLookup>::Source, should_block: bool) -> DispatchResult {
+        fn toggle_blacklist(origin, who: <T::Lookup as StaticLookup>::Source, should_blacklist: bool) -> DispatchResult {
             ensure_root(origin)?;
 
             let who = T::Lookup::lookup(who)?;
-            if should_block {
-                BlockedAccounts::<T>::insert(who.clone(), true);
-                Self::deposit_event(Event::<T>::BlockAccount(who))
+            if should_blacklist {
+                Blacklist::<T>::insert(who.clone(), true);
+                Self::deposit_event(Event::<T>::Blacklisted(who))
             } else {
-                BlockedAccounts::<T>::remove(&who);
-                Self::deposit_event(Event::<T>::RevokeBlockedAccount(who));
+                Blacklist::<T>::remove(&who);
+                Self::deposit_event(Event::<T>::Unblacklisted(who));
             }
             Ok(())
         }
@@ -149,9 +150,9 @@ impl<T: Trait> Module<T> {
     }
 
     /// Returns the blocked account id list.
-    pub fn blocked_list() -> Vec<T::AccountId> {
-        BlockedAccounts::<T>::iter()
-            .filter_map(|(a, blocked)| if blocked { Some(a) } else { None })
+    pub fn get_blacklist() -> Vec<T::AccountId> {
+        Blacklist::<T>::iter()
+            .filter_map(|(account, blocked)| if blocked { Some(account) } else { None })
             .collect()
     }
 }


Test patch:
diff --git a/xpallets/assets/src/tests.rs b/xpallets/assets/src/tests.rs
index c5283e76f..fc8189437 100644
--- a/xpallets/assets/src/tests.rs
+++ b/xpallets/assets/src/tests.rs
@@ -371,7 +371,7 @@ fn test_balance_btree_map() {
             &a,
             AssetType::Usable,
             &a,
-            AssetType::ReservedXRC20,
+            AssetType::ReservedWithdrawal,
             30,
         );
         assert_eq!(AssetBalance::<Test>::get(&a, &btc_id).len(), 2);
@@ -380,7 +380,7 @@ fn test_balance_btree_map() {
         let _ = XAssets::move_balance(
             &X_BTC,
             &a,
-            AssetType::ReservedXRC20,
+            AssetType::ReservedWithdrawal,
             &a,
             AssetType::Usable,
             10,
@@ -388,7 +388,7 @@ fn test_balance_btree_map() {
         let _ = XAssets::move_balance(
             &X_BTC,
             &a,
-            AssetType::ReservedXRC20,
+            AssetType::ReservedWithdrawal,
             &b,
             AssetType::Usable,
             20,
diff --git a/xpallets/assets/src/tests_multicurrency.rs b/xpallets/assets/src/tests_multicurrency.rs
index 7ed4e2e51..bdcc52e61 100644
--- a/xpallets/assets/src/tests_multicurrency.rs
+++ b/xpallets/assets/src/tests_multicurrency.rs
@@ -217,7 +217,7 @@ fn transfer_should_work() {
         assert_eq!(XAssets::free_balance(X_BTC, &BOB), 150);
         assert_eq!(XAssets::total_issuance(&X_BTC), 200 + 800);
 
-        let transferred_event = MetaEvent::assets(RawEvent::Move(
+        let transferred_event = MetaEvent::assets(RawEvent::Moved(
             X_BTC,
             ALICE,
             AssetType::Usable,