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

Fields

§admin: Option<String>

Change the admin

§

UpdateMembers

Fields

§remove: Vec<String>
§add: Vec<Member>

apply a diff to the existing members. remove is applied after add, so if an address is in both, it is removed

§

AddPoints

Fields

§addr: String
§points: u64

Add points to member’s address

§

AddHook

Fields

§addr: String

Add a new hook to be informed of all membership changes. Must be called by Admin

§

RemoveHook

Fields

§addr: String

Remove a hook. Must be called by Admin

§

DistributeRewards

Fields

§sender: Option<String>

Original source of rewards, informational. If present overwrites “sender” field on propagated event.

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

§owner: Option<String>

Account from which assigned rewards would be withdrawn; sender by default. sender has to be eligible for withdrawal from owner address to perform this call (owner has to call DelegateWithdrawal { delegated: sender } before)

§receiver: Option<String>

Address where to transfer funds. If not present, funds would be sent to sender.

Withdraws rewards which were previously distributed and assigned to sender.

§

DelegateWithdrawal

Fields

§delegated: String

Account delegated for withdrawal. To disallow current withdrawal, the best is to set it to own address.

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

Fields

§addr: String

Adds slasher for contract if there are enough slasher_preauths left

§

RemoveSlasher

Fields

§addr: String

Removes slasher for contract

§

Slash

Fields

§addr: String
§portion: Decimal

Slash engagement points from address

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
The name of the generated JSON Schema. Read more
Generates a JSON Schema for this type. Read more
Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.