diff --git a/bridges/snowbridge/pallets/rewards/src/lib.rs b/bridges/snowbridge/pallets/rewards/src/lib.rs index 0f3bfb95c89c..691c175ca7ee 100644 --- a/bridges/snowbridge/pallets/rewards/src/lib.rs +++ b/bridges/snowbridge/pallets/rewards/src/lib.rs @@ -2,11 +2,10 @@ // SPDX-FileCopyrightText: 2023 Snowfork #![cfg_attr(not(feature = "std"), no_std)] -pub mod impls; pub mod weights; use frame_system::pallet_prelude::*; -use crate::impls::RewardLedger; +use snowbridge_core::rewards::RewardLedger; pub use weights::WeightInfo; pub use pallet::*; @@ -14,7 +13,6 @@ pub use pallet::*; pub type AccountIdOf = ::AccountId; #[frame_support::pallet] pub mod pallet { - use sp_core::U256; use frame_support::pallet_prelude::*; use super::*; @@ -41,7 +39,7 @@ pub mod pallet { #[pallet::storage] pub type RewardsMapping = - StorageMap<_, Identity, AccountIdOf, U256, ValueQuery>; + StorageMap<_, Identity, AccountIdOf, u128, ValueQuery>; #[pallet::call] impl Pallet { @@ -65,6 +63,6 @@ pub mod pallet { } impl RewardLedger for Pallet { - fn deposit(_account: AccountIdOf, _value: U256) {} + fn deposit(_account: AccountIdOf, _value: u128) {} } } diff --git a/bridges/snowbridge/primitives/core/src/lib.rs b/bridges/snowbridge/primitives/core/src/lib.rs index 7ad129a52542..94ef1c3ba900 100644 --- a/bridges/snowbridge/primitives/core/src/lib.rs +++ b/bridges/snowbridge/primitives/core/src/lib.rs @@ -13,6 +13,7 @@ pub mod location; pub mod operating_mode; pub mod outbound; pub mod pricing; +pub mod rewards; pub mod ringbuffer; pub use location::{AgentId, AgentIdOf, TokenId, TokenIdOf}; diff --git a/bridges/snowbridge/pallets/rewards/src/impls.rs b/bridges/snowbridge/primitives/core/src/rewards.rs similarity index 64% rename from bridges/snowbridge/pallets/rewards/src/impls.rs rename to bridges/snowbridge/primitives/core/src/rewards.rs index ba310fd8ba35..aaca6561bb82 100644 --- a/bridges/snowbridge/pallets/rewards/src/impls.rs +++ b/bridges/snowbridge/primitives/core/src/rewards.rs @@ -1,9 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: 2023 Snowfork -use crate::AccountIdOf; -use sp_core::U256; +pub type AccountIdOf = ::AccountId; pub trait RewardLedger { // Deposit reward which can later be claimed by `account` - fn deposit(account: AccountIdOf, value: U256); + fn deposit(account: AccountIdOf, value: u128); }