pub enum ExecuteMsg {
UpdateAdmin {
admin: Option<String>,
},
UpdateConfig {
min_points: Option<u64>,
max_validators: Option<u32>,
scaling: Option<u32>,
epoch_reward: Option<Coin>,
fee_percentage: Option<Decimal>,
auto_unjail: Option<bool>,
double_sign_slash_ratio: Option<Decimal>,
distribution_contracts: Option<Vec<DistributionContract>>,
verify_validators: Option<bool>,
offline_jail_duration: Option<Duration>,
},
RegisterValidatorKey {
pubkey: Pubkey,
metadata: ValidatorMetadata,
},
UpdateMetadata(ValidatorMetadata),
Jail {
operator: String,
duration: JailingDuration,
},
Unjail {
operator: Option<String>,
},
Slash {
addr: String,
portion: Decimal,
},
SimulateValidatorSet {
validators: Vec<ValidatorInfo>,
},
}Variants§
UpdateAdmin
Change the admin
UpdateConfig
Alter config values
Fields
min_points: Option<u64>minimum points needed by an address in membership to be considered for the validator set.
0-point members are always filtered out.
max_validators: Option<u32>The maximum number of validators that can be included in the Tendermint validator set. If there are more validators than slots, we select the top N by membership points descending.
scaling: Option<u32>A scaling factor to multiply tg4-engagement points to produce the tendermint validator power
epoch_reward: Option<Coin>Total reward paid out each epoch. This will be split among all validators during the last epoch. (epoch_reward.amount * 86_400 * 30 / epoch_length) is reward tokens to mint each month. Ensure this is sensible in relation to the total token supply.
fee_percentage: Option<Decimal>Percentage of total accumulated fees which is subtracted from tokens minted as a rewards. 50% as default. To disable this feature just set it to 0 (which effectively means that fees doesn’t affect the per epoch reward).
auto_unjail: Option<bool>Flag determining if validators should be automatically unjailed after jailing period, false by default.
double_sign_slash_ratio: Option<Decimal>Validators who are caught double signing are jailed forever and their bonded tokens are slashed based on this value.
distribution_contracts: Option<Vec<DistributionContract>>Addresses where part of the reward for non-validators is sent for further distribution. These are
required to handle the Distribute {} message (eg. tg4-engagement contract) which would
distribute the funds sent with this message.
The sum of ratios here has to be in the [0, 1] range. The remainder is sent to validators via the
rewards contract.
RegisterValidatorKey
Links info.sender (operator) to this Tendermint consensus key. The operator cannot re-register another key. No two operators may have the same consensus_key.
UpdateMetadata(ValidatorMetadata)
Jail
Jails validator. Can be executed only by the admin.
Fields
duration: JailingDurationDuration for how long validator is jailed
Unjail
Unjails validator. Admin can unjail anyone anytime, others can unjail only themselves and only if the jail period passed.
Fields
Slash
To be called by admin only. Slashes a given address (by forwarding slash to both rewards contract and engagement contract)
SimulateValidatorSet
This will update the validator set with the passed list. Used for testing validators storage.
Fields
validators: Vec<ValidatorInfo>Trait Implementations§
Source§impl Clone for ExecuteMsg
impl Clone for ExecuteMsg
Source§fn clone(&self) -> ExecuteMsg
fn clone(&self) -> ExecuteMsg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecuteMsg
impl Debug for ExecuteMsg
Source§impl<'de> Deserialize<'de> for ExecuteMsg
impl<'de> Deserialize<'de> for ExecuteMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ExecuteMsg
impl JsonSchema for ExecuteMsg
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for ExecuteMsg
impl PartialEq for ExecuteMsg
Source§fn eq(&self, other: &ExecuteMsg) -> bool
fn eq(&self, other: &ExecuteMsg) -> bool
self and other values to be equal, and is used by ==.