1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Indexer
*
* Algorand ledger analytics API.
*
* The version of the OpenAPI document: 2.0
*
* Generated by: https://openapi-generator.tech
*/
/// BlockRewards : Fields relating to rewards,
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BlockRewards {
/// \\[fees\\] accepts transaction fees, it can only spend to the incentive pool.
#[serde(rename = "fee-sink")]
pub fee_sink: String,
/// \\[rwcalr\\] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round.
#[serde(rename = "rewards-calculation-round")]
pub rewards_calculation_round: u64,
/// \\[earn\\] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis.
#[serde(rename = "rewards-level")]
pub rewards_level: u64,
/// \\[rwd\\] accepts periodic injections from the fee-sink and continually redistributes them as rewards.
#[serde(rename = "rewards-pool")]
pub rewards_pool: String,
/// \\[rate\\] Number of new MicroAlgos added to the participation stake from rewards at the next round.
#[serde(rename = "rewards-rate")]
pub rewards_rate: u64,
/// \\[frac\\] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.
#[serde(rename = "rewards-residue")]
pub rewards_residue: u64,
}
impl BlockRewards {
/// Fields relating to rewards,
pub fn new(
fee_sink: String,
rewards_calculation_round: u64,
rewards_level: u64,
rewards_pool: String,
rewards_rate: u64,
rewards_residue: u64,
) -> BlockRewards {
BlockRewards {
fee_sink,
rewards_calculation_round,
rewards_level,
rewards_pool,
rewards_rate,
rewards_residue,
}
}
}