Skip to content

Commit

Permalink
Merge branch 'main' into toufeeq/fix-fee-payment
Browse files Browse the repository at this point in the history
  • Loading branch information
ToufeeqP committed Oct 3, 2024
2 parents 91d1f36 + 25ceee9 commit 2e87410
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ bounded-collections.workspace = true
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info.workspace = true

# Polkadot SDK
frame-support = { workspace = true, optional = true }
sp-arithmetic.workspace = true
sp-core.workspace = true
sp-io.workspace = true
sp-runtime = { workspace = true, optional = true }
sp-runtime-interface = { workspace = true, optional = true }
sp-std.workspace = true
sp-trie.workspace = true
sp-io.workspace = true

[dev-dependencies]
hex-literal.workspace = true
Expand Down Expand Up @@ -70,6 +69,7 @@ runtime = [
"sp-runtime",
"sp-runtime-interface",
]
disable_panic_handler = [ "sp-io/disable_panic_handler" ]

try-runtime = [ "runtime", "sp-runtime/try-runtime" ]
serde = [ "dep:serde", "hex/serde", "log/serde" ]
13 changes: 9 additions & 4 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(clippy::arithmetic_side_effects)]

use core::fmt::Debug;

use codec::{Decode, Encode, MaxEncodedLen};
use derive_more::{Add, Constructor, Deref, Display, Into, Mul};
use derive_more::{Add, Constructor, Deref, Into, Mul};
use scale_info::TypeInfo;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -88,11 +90,16 @@ pub enum InvalidTransactionCustomId {
Into,
MaxEncodedLen,
RuntimeDebug,
Display,
)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct AppId(#[codec(compact)] pub u32);

impl core::fmt::Display for AppId {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.0)
}
}

impl Zero for AppId {
fn zero() -> Self {
AppId(Zero::zero())
Expand All @@ -119,7 +126,6 @@ impl Zero for AppId {
Into,
Constructor,
MaxEncodedLen,
Display,
Default,
)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize, Debug))]
Expand All @@ -143,7 +149,6 @@ pub struct BlockLengthColumns(#[codec(compact)] pub u32);
Ord,
Into,
Constructor,
Display,
Default,
)]
#[mul(forward)]
Expand Down

0 comments on commit 2e87410

Please sign in to comment.