Skip to content

Commit

Permalink
Update Cargo.toml, .github for the new crates
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Aug 31, 2024
1 parent 9b85d44 commit 449a062
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
-p serai-dex-pallet \
-p serai-validator-sets-primitives \
-p serai-validator-sets-pallet \
-p serai-genesis-liquidity-primitives \
-p serai-genesis-liquidity-pallet \
-p serai-emissions-primitives \
-p serai-emissions-pallet \
-p serai-economic-security-pallet \
-p serai-in-instructions-primitives \
-p serai-in-instructions-pallet \
-p serai-signals-primitives \
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ members = [
"substrate/validator-sets/primitives",
"substrate/validator-sets/pallet",

"substrate/genesis-liquidity/primitives",
"substrate/genesis-liquidity/pallet",

"substrate/emissions/primitives",
"substrate/emissions/pallet",

"substrate/economic-security/pallet",

"substrate/in-instructions/primitives",
"substrate/in-instructions/pallet",

Expand Down
2 changes: 1 addition & 1 deletion substrate/abi/src/economic_security.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ use serai_primitives::NetworkId;
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Event {
EconomicSecurityBlock { network: NetworkId, block: u64 },
EconomicSecurityReached { network: NetworkId },
}
7 changes: 2 additions & 5 deletions substrate/economic-security/pallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub mod pallet {
#[pallet::event]
#[pallet::generate_deposit(fn deposit_event)]
pub enum Event<T: Config> {
EconomicSecurityBlock { network: NetworkId, block: u64 },
EconomicSecurityReached { network: NetworkId },
}

#[pallet::pallet]
Expand All @@ -41,10 +41,7 @@ pub mod pallet {
<T as CoinsConfig>::AllowMint::is_allowed(&Balance { coin, amount: Amount(1) })
{
EconomicSecurityBlock::<T>::set(coin.network(), Some(n));
Self::deposit_event(Event::EconomicSecurityBlock {
network: coin.network(),
block: n.saturated_into::<u64>(),
});
Self::deposit_event(Event::EconomicSecurityReached { network: coin.network() });
}
}

Expand Down

0 comments on commit 449a062

Please sign in to comment.