penumbra_sdk_distributions/component/
state_key.rs

1// The amount of staking tokens issued for this epoch.
2pub fn staking_token_issuance_for_epoch() -> &'static str {
3    "distributions/staking_token_issuance_for_epoch"
4}
5
6pub mod lqt {
7    pub mod v1 {
8        pub mod budget {
9            pub(crate) fn prefix(epoch_index: u64) -> String {
10                format!("distributions/lqt/v1/budget/{epoch_index:020}")
11            }
12
13            /// The amount of LQT rewards issued for this epoch.
14            pub fn for_epoch(epoch_index: u64) -> [u8; 48] {
15                let prefix_bytes = prefix(epoch_index);
16                let mut key = [0u8; 48];
17                key[0..48].copy_from_slice(prefix_bytes.as_bytes());
18                key
19            }
20        }
21    }
22}
23
24pub fn distributions_parameters() -> &'static str {
25    "distributions/parameters"
26}