Enum tg4_engagement::msg::ExecuteMsg
source · pub enum ExecuteMsg {
UpdateAdmin {
admin: Option<String>,
},
UpdateMembers {
remove: Vec<String>,
add: Vec<Member>,
},
AddPoints {
addr: String,
points: u64,
},
AddHook {
addr: String,
},
RemoveHook {
addr: String,
},
DistributeRewards {
sender: Option<String>,
},
WithdrawRewards {
owner: Option<String>,
receiver: Option<String>,
},
DelegateWithdrawal {
delegated: String,
},
AddSlasher {
addr: String,
},
RemoveSlasher {
addr: String,
},
Slash {
addr: String,
portion: Decimal,
},
}
Variants§
UpdateAdmin
Change the admin
UpdateMembers
apply a diff to the existing members. remove is applied after add, so if an address is in both, it is removed
AddPoints
Add points to member’s address
AddHook
Add a new hook to be informed of all membership changes. Must be called by Admin
RemoveHook
Remove a hook. Must be called by Admin
DistributeRewards
Fields
Distributes rewards sent with this message, and all rewards transferred since last call of this
to members, proportionally to their points. Rewards are not immediately send to members, but
assigned to them for later withdrawal (see: ExecuteMsg::WithdrawFunds
)
WithdrawRewards
Fields
Withdraws rewards which were previously distributed and assigned to sender.
DelegateWithdrawal
Fields
Sets given address as allowed for senders funds withdrawal. Funds still can be withdrawn by sender himself, but this additional account is allowed to perform it as well. There can be only one account delegated for withdrawal for any owner at any single time.
AddSlasher
Adds slasher for contract if there are enough slasher_preauths
left
RemoveSlasher
Removes slasher for contract
Slash
Slash engagement points from address
Trait Implementations§
source§impl Clone for ExecuteMsg
impl Clone for ExecuteMsg
source§fn clone(&self) -> ExecuteMsg
fn clone(&self) -> ExecuteMsg
1.0.0 · 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 json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq<ExecuteMsg> for ExecuteMsg
impl PartialEq<ExecuteMsg> 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 ==
.