mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Ensure economic security on validator sets (#459)
* add price oracle * tidy up * add todo * bug fixes * fix pr comments * Use spot price, tweak some formulas Also cleans nits. --------- Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
This commit is contained in:
@@ -25,6 +25,16 @@ pub enum NetworkId {
|
||||
Ethereum,
|
||||
Monero,
|
||||
}
|
||||
impl NetworkId {
|
||||
pub fn coins(&self) -> &'static [Coin] {
|
||||
match self {
|
||||
Self::Serai => &[Coin::Serai],
|
||||
Self::Bitcoin => &[Coin::Bitcoin],
|
||||
Self::Ethereum => &[Coin::Ether, Coin::Dai],
|
||||
Self::Monero => &[Coin::Monero],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub const NETWORKS: [NetworkId; 4] =
|
||||
[NetworkId::Serai, NetworkId::Bitcoin, NetworkId::Ethereum, NetworkId::Monero];
|
||||
|
||||
Reference in New Issue
Block a user