Class BlockRewards
Fields relating to rewards,
Inheritance
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class BlockRewards : IEquatable<BlockRewards>, IValidatableObject
Constructors
| Improve this Doc View SourceBlockRewards(String, Nullable<Int64>, Nullable<Int64>, String, Nullable<Int64>, Nullable<Int64>)
Initializes a new instance of the BlockRewards class.
Declaration
public BlockRewards(string feeSink = null, long? rewardsCalculationRound = default(long? ), long? rewardsLevel = default(long? ), string rewardsPool = null, long? rewardsRate = default(long? ), long? rewardsResidue = default(long? ))
Parameters
Type | Name | Description |
---|---|---|
System.String | feeSink | \[fees\] accepts transaction fees, it can only spend to the incentive pool. (required). |
System.Nullable<System.Int64> | rewardsCalculationRound | \[rwcalr\] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round. (required). |
System.Nullable<System.Int64> | rewardsLevel | \[earn\] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis. (required). |
System.String | rewardsPool | \[rwd\] accepts periodic injections from the fee-sink and continually redistributes them as rewards. (required). |
System.Nullable<System.Int64> | rewardsRate | \[rate\] Number of new MicroAlgos added to the participation stake from rewards at the next round. (required). |
System.Nullable<System.Int64> | rewardsResidue | \[frac\] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round. (required). |
Properties
| Improve this Doc View SourceFeeSink
\[fees\] accepts transaction fees, it can only spend to the incentive pool.
Declaration
[DataMember(Name = "fee-sink", EmitDefaultValue = false)]
public string FeeSink { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[fees\] accepts transaction fees, it can only spend to the incentive pool. |
RewardsCalculationRound
\[rwcalr\] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round.
Declaration
[DataMember(Name = "rewards-calculation-round", EmitDefaultValue = false)]
public long? RewardsCalculationRound { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[rwcalr\] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round. |
RewardsLevel
\[earn\] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis.
Declaration
[DataMember(Name = "rewards-level", EmitDefaultValue = false)]
public long? RewardsLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[earn\] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis. |
RewardsPool
\[rwd\] accepts periodic injections from the fee-sink and continually redistributes them as rewards.
Declaration
[DataMember(Name = "rewards-pool", EmitDefaultValue = false)]
public string RewardsPool { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[rwd\] accepts periodic injections from the fee-sink and continually redistributes them as rewards. |
RewardsRate
\[rate\] Number of new MicroAlgos added to the participation stake from rewards at the next round.
Declaration
[DataMember(Name = "rewards-rate", EmitDefaultValue = false)]
public long? RewardsRate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[rate\] Number of new MicroAlgos added to the participation stake from rewards at the next round. |
RewardsResidue
\[frac\] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.
Declaration
[DataMember(Name = "rewards-residue", EmitDefaultValue = false)]
public long? RewardsResidue { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[frac\] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round. |
Methods
| Improve this Doc View SourceEquals(BlockRewards)
Returns true if BlockRewards instances are equal
Declaration
public bool Equals(BlockRewards input)
Parameters
Type | Name | Description |
---|---|---|
BlockRewards | input | Instance of BlockRewards to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Equals(Object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
System.Object | input | Object to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Overrides
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
ToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
System.String | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String presentation of the object |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIValidatableObject.Validate(ValidationContext)
To validate all properties of the instance
Declaration
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> | Validation Result |