Skip to content

Commit

Permalink
fix(*): fix pallet hp-system
Browse files Browse the repository at this point in the history
  • Loading branch information
wd30130 committed Jul 25, 2024
1 parent e685d0b commit 88dc83d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions frame/hybrid-vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ pub mod pallet {
// Currency type for balance storage.
type Currency: Currency<Self::AccountId> + Inspect<Self::AccountId>;

type U256BalanceMapping: U256BalanceMapping<Self as frame_system::Config>;
type U256BalanceMapping: U256BalanceMapping<Self>;

type AccountIdMapping: AccountIdMapping<Self as frame_system::Config>;
type AccountIdMapping: AccountIdMapping<Self>;

type AccountId32Mapping: AccountId32Mapping<Self as frame_system::Config>;
type AccountId32Mapping: AccountId32Mapping<Self>;

#[pallet::constant]
type EnableCallEVM: Get<bool>;
Expand Down
10 changes: 5 additions & 5 deletions primitives/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#![cfg_attr(not(feature = "std"), no_std)]

use frame_system::pallet_prelude::*;
use frame_support::traits::fungible::Inspect;
use frame_support::traits::tokens::Balance;
use sp_std::vec::Vec;
use sp_core::H160;
use sp_core::{H160, U256};
use sp_runtime::AccountId32;

pub trait EvmHybridVMExtension<C: frame_system::Config> {
Expand All @@ -29,9 +29,9 @@ pub trait EvmHybridVMExtension<C: frame_system::Config> {
) -> Result<(Vec<u8>, u64), sp_runtime::DispatchError>;
}

pub trait U256BalanceMapping<T: frame_system::Config> {
type BalanceOf<T>: Inspect<T::AccountId>::Balance;
fn u256_to_balance(value: U256) -> Option(BalanceOf<T>);
pub trait U256BalanceMapping {
type Balance: Balance;
fn u256_to_balance(value: U256) -> Option<Self::Balance>;
}

pub trait AccountIdMapping<C: frame_system::Config> {
Expand Down

0 comments on commit 88dc83d

Please sign in to comment.