Add TierLimits unit tests (#12)

* Add TierLimits unit tests
This commit is contained in:
Sydhds
2025-07-01 10:11:08 +02:00
committed by GitHub
parent 9f4027ed2b
commit cac235dbcc
3 changed files with 472 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
use std::collections::BTreeMap;
use std::ops::Add;
// third-party
use alloy::{
primitives::{Address, U256},
@@ -67,6 +68,14 @@ impl From<&TierIndex> for u8 {
}
}
impl Add<u8> for TierIndex {
type Output = TierIndex;
fn add(self, rhs: u8) -> Self::Output {
Self(self.0 + rhs)
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct Tier {
pub min_karma: U256,