Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Companion for #155 (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest authored and jiguantong committed Sep 29, 2022
1 parent 795245e commit 8265a7d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions primitives/message-dispatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,16 @@ pub trait CallValidate<AccountId, Origin, Call> {
call: &Call,
) -> Result<(), TransactionValidityError>;
}

/// CallValidate's default implementation, no additional validation
pub enum Everything {}

impl<AccountId, Origin, Call> CallValidate<AccountId, Origin, Call> for Everything {
fn check_receiving_before_dispatch(_: &AccountId, _: &Call) -> Result<(), &'static str> {
Ok(())
}

fn call_validate(_: &AccountId, _: &Origin, _: &Call) -> Result<(), TransactionValidityError> {
Ok(())
}
}

0 comments on commit 8265a7d

Please sign in to comment.