This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address

Overview

Token Vesting

This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address.

Instantiate Contract

If master address is not given, the instantiator address will be used as master address

#[derive(Serialize, Deserialize, JsonSchema)]
pub struct InstantiateMsg {
    pub master_address: Option<String>,
}

Master Operations

All accounts can be registered and de-registered only from a master address.

  • UpdateMasterAddress - update master address to a new address
  • RegisterVestingAccount - register vesting account
    • When creating vesting account, the one can specify the master_address to enable deregister feature.
  • 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).
, left_vesting_token_recipient: Option , }, UpdateMasterAddress { master_address: String, }, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum Cw20HookMsg { /// Register vesting account with token transfer RegisterVestingAccount { address: String, vesting_schedule: VestingSchedule, }, }">
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    RegisterVestingAccount {
        address: String,
        vesting_schedule: VestingSchedule,
    },
    /// only available when master_address was set
    DeregisterVestingAccount {
        address: String,
        denom: Denom,
        vested_token_recipient: Option<String>,
        left_vesting_token_recipient: Option<String>,
    },
    UpdateMasterAddress {
        master_address: String,
    },
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum Cw20HookMsg {
    /// Register vesting account with token transfer
    RegisterVestingAccount {
        address: String,
        vesting_schedule: VestingSchedule,
    },
}

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.
, recipient: Option , }, }">
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    ////////////////////////
    /// VestingAccount Operations ///
    ////////////////////////
    Claim {
        denoms: Vec<Denom>,
        recipient: Option<String>,
    },
}

Deployed Contract Info

data bombay-12 columbus-5
code_id N/A N/A
contract_addr N/A N/A
You might also like...
This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time downloads and 60 reverse dependencies.

Unsoundness in owning_ref This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time down

Sampling profiler and tracer for Ruby (CRuby) which runs in BPF

rbperf rbperf is a low-overhead sampling profiler and tracer for Ruby (CRuby) which runs in BPF Build To build rbperf you would need a Linux machine w

A cross platform tool which instantly notifies about COVID vaccine availability.
A cross platform tool which instantly notifies about COVID vaccine availability.

💉 CoWIN Notifier đŸ˜· A cross-platform tool written in rust, which instantly notifies users about COVID-19 vaccine availability at their regions. Curre

Rust crate which provides direct access to files within a Debian archive

debarchive This Rust crate provides direct access to files within a Debian archive. This crate is used by our debrep utility to generate the Packages

🩀 Rust-based implementation of a Snowflake Generator which communicates using gRPC

Clawflake Clawflake is a Rust application which implements Twitter Snowflakes and communicates using gRPC. Snowflake ID numbers are 63 bits integers s

Postgres proxy which allows tools that don't natively supports IAM auth to connect to AWS RDS instances.

rds-iamauth-proxy rds-proxy lets you make use of IAM-based authentication to AWS RDS instances from tools that don't natively support that method of a

Spot coupling by finding out which files are always in the same commit

git moves-together This tells you when files in the repository frequently move together. This lets you identify where the coupling is in the system. C

A rust interval arithmetic library which provides flags that detect domain errors.

intervals-good A Rust interval arithmetic library which provides flags that detect domain errors, supports more functions than any other interval arit

Massayo is a small proof-of-concept Rust library which removes AV/EDR hooks in a given system DLL

Massayo Massayo is a small proof-of-concept Rust library based on UnhookingPOC, which removes AV/EDR hooks in a given system DLL. I tried to reduce fi

Owner
yys
yys
weggli-native a "native" C API for Google's weggli

weggli-native a "native" C API for Google's weggli

Trail of Bits 3 Jul 13, 2022
Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI

s3-utils Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI. This tool contains a small set of command line utilities for

Isaac Whitfield 47 Dec 15, 2022
UnTeX is both a library and an executable that allows you to manipulate and understand TeX files.

UnTeX UnTeX is both a library and an executable that allows you to manipulate and understand TeX files. Usage Executable If you wish to use the execut

JĂ©rome Eertmans 1 Apr 5, 2022
Extract tokens by simple condition expression.

Condex Extract tokens by simple condition expression. | Docs | Latest Note | [dependencies]

Doha Lee 2 Jun 1, 2022
A replit.com scraper, designed to grab discord tokens. Made in Rust.

Scraper A discord token scraper, designed to scrape forks from replit.com. This script uses the Graphql api on replit to essentially pull forks. Setup

Shell 18 Jan 2, 2023
Dr-dotnet - đŸ©ș One-click diagnosis of your dotnet applications. Works both locally or remotely as a web service

Dr-dotnet - ?? One-click diagnosis of your dotnet applications. Works both locally or remotely as a web service. Based on the lowest level dotnet profiling APIs and using the rust language ?? for a minimal runtime penalty.

Olivier Giniaux 25 Dec 17, 2022
The feature-rich, portable async channel library

The feature-rich, portable async channel library > crates.io > docs.rs Why use Postage? Includes a rich set of channels. | barrier | broadcast | dispa

Austin Jones 221 Dec 26, 2022
Free and open-source reimplementation of Native Mouse Lock (display_mouse_lock) in rust.

dml-rs display_mouse_lock in rust. Free, open-source reimplementation of display_mouse_lock (Native Mouse Lock) in Rust. Written because I felt like i

Tomat 4 Feb 12, 2023
Soufflé is a variant of Datalog for tool designers crafting analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program from a logic specification.

Welcome! This is the official repository for the Soufflé language project. The Soufflé language is similar to Datalog (but has terms known as records)

The Soufflé Project 672 Dec 29, 2022
Extracting react native app source code from apk file.

extract-myreact Extracting React Native app source code from apk file.

Aan 3 Oct 5, 2022