diff --git a/contracts/airdrop-token-vesting/README.md b/contracts/airdrop-token-vesting/README.md index 82668a7..a98753c 100644 --- a/contracts/airdrop-token-vesting/README.md +++ b/contracts/airdrop-token-vesting/README.md @@ -4,27 +4,46 @@ This contract implements vesting accounts for the CW20 and native tokens. ### Master Operations +#### By admin and members + ```rust - RegisterVestingAccount { - master_address: Option, // if given, the vesting account can be unregistered - address: String, - vesting_schedule: VestingSchedule, + RewardUsers { + rewards: Vec, + master_address: Option, // if given, the vesting account can be unregistered + vesting_schedule: VestingSchedule, }, ``` -* RegisterVestingAccount - register vesting account - * When creating vesting account, the one can specify the `master_address` to enable deregister feature. + +This creates a set of vesting accounts for the given users. The `master_address` is used to enable the deregister feature. +If no `master_address` is given, the deregister feature is disabled. + +#### By admin only ```rust - DeregisterVestingAccount { - address: String, - denom: Denom, - vested_token_recipient: Option, - left_vesting_token_recipient: Option, - }, + Withdraw { + amount: Uint128, + recipient: String, + }, ``` + +This allows to get part or all of the unallocated amount from the contract and sends it to the `recipient`. Unallocated is equal to the +amount sent on instantiation minus the already rewarded to users. + +#### By master_address only + +```rust + DeregisterVestingAccount { + address: String, + denom: Denom, + vested_token_recipient: Option, + left_vesting_token_recipient: Option, + }, +``` + * DeregisterVestingAccount - deregister vesting account * This interface only executable from the `master_address` of a vesting account. - * It will compute `claimable_amount` and `left_vesting_amount`. Each amount respectively sent to (`vested_token_recipient` or `vesting_account`) and (`left_vesting_token_recipient` or `master_address`). + * It will compute `claimable_amount` and `left_vesting_amount`. Each amount respectively sent to (`vested_token_recipient` or `vesting_account`) + and (`left_vesting_token_recipient` or `master_address`). ```rust #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] @@ -41,8 +60,6 @@ pub enum Cw20HookMsg { ### Vesting Account Operations -* Claim - send newly vested token to the (`recipient` or `vesting_account`). The `claim_amount` is computed as (`vested_amount` - `claimed_amount`) and `claimed_amount` is updated to `vested_amount`. - ```rust #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] @@ -57,11 +74,15 @@ pub enum ExecuteMsg { } ``` +* Sends newly vested token to the (`recipient` or `vesting_account`). The `claim_amount` is computed + as (`vested_amount` - `claimed_amount`) and `claimed_amount` is updated to `vested_amount`. + + If everything is claimed, the vesting account is removed from the contract. + ### Deployed Contract Info TODO for mainnet/testnet - | Field | Value | | ------------- | ------ | | code_id | ... |