Skip to content

Commit

Permalink
Update erc20 pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
MRamanenkau committed Jul 5, 2023
1 parent 6fd2610 commit 3ec2224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pallets/erc20/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;

pub trait Config: system::Config + bridge::Config + erc721::Config {
type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;
type RuntimeEvent: From<Event<Self>> + Into<<Self as frame_system::Config>::RuntimeEvent>;
/// Specifies the origin check provided by the bridge for calls that can only be called by the bridge pallet
type BridgeOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>;
type BridgeOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::AccountId>;

/// The currency mechanism.
type Currency: Currency<Self::AccountId>;
Expand Down Expand Up @@ -63,7 +63,7 @@ decl_event!(
);

decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
pub struct Module<T: Config> for enum Call where origin: T::RuntimeOrigin {
const HashId: ResourceId = T::HashId::get();
const NativeTokenId: ResourceId = T::NativeTokenId::get();
const Erc721Id: ResourceId = T::Erc721Id::get();
Expand Down
10 changes: 5 additions & 5 deletions pallets/erc721/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

use sp_std::marker::PhantomData;
use frame_support::{
dispatch::{DispatchResult}, decl_module, decl_storage, decl_event, decl_error,
ensure,
dispatch::{DispatchResult, DispatchClass, ClassifyDispatch, WeighData, PaysFee, Pays},
decl_module, decl_storage, decl_event, decl_error, ensure,
traits::Get,
weights::{DispatchClass, ClassifyDispatch, WeighData, Weight, PaysFee, Pays},
weights::{Weight},
};
use sp_std::prelude::*;
use frame_system::{self as system, ensure_signed, ensure_root};
Expand Down Expand Up @@ -34,7 +34,7 @@ pub struct Erc721Token {
}

pub trait Config: system::Config {
type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;
type RuntimeEvent: From<Event<Self>> + Into<<Self as system::Config>::RuntimeEvent>;

/// Some identifier for this token type, possibly the originating ethereum address.
/// This is not explicitly used for anything, but may reflect the bridge's notion of resource ID.
Expand Down Expand Up @@ -78,7 +78,7 @@ decl_event!(
);

decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
pub struct Module<T: Config> for enum Call where origin: T::RuntimeOrigin {
type Error = Error<T>;
fn deposit_event() = default;

Expand Down

0 comments on commit 3ec2224

Please sign in to comment.