Dispatcher

This contract mainly releases Seilor tokens of SHO on a monthly basis. (Lock the locked Seilor tokens in this contract)

Config

pub struct GlobalConfig {
    pub gov: Addr,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}
KeyTypeDescription

gov

Addr

The address of the governance contract

claim_token

Addr

The address of the token contract to be claimed

end_regret_time

u64

The end time of the regret period

total_lock_amount

Uint256

The total amount of tokens to be locked

start_lock_period_time

u64

The start time of the lock period

duration_per_period

u64

The duration of each lock period

periods

u64

The number of lock periods

InitMsg

#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}
{
  "gov": "sei1...",
  "claim_token": "sei1...",
  "total_lock_amount": "80_000_000_000_000",
  "start_lock_period_time": "1688828677",
  "duration_per_period": "2592000",
  "periods": "25"
}
KeyTypeDescription

gov

Addr

The address of the governance contract

claim_token

Addr

The address of the token contract to be claimed

total_lock_amount

Uint256

The total amount of tokens to be locked

start_lock_period_time

u64

The start time of the lock period

duration_per_period

u64

The duration of each lock period

periods

u64

The number of lock periods

ExecuteMsg

UpdateConfig

#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig(UpdateGlobalConfigMsg),
}
#[cw_serde]
pub struct UpdateGlobalConfigMsg {
    pub gov: Option<Addr>,
    pub claim_token: Option<Addr>,
    pub start_lock_period_time: Option<u64>,
    pub total_lock_amount: Option<Uint256>,
}
{
  "update_config": {
      {
          "gov": "sei1...",
          "claim_token": "sei1...",
          "start_lock_period_time": "1688828677",
          "total_lock_amount": "80_000_000_000_000"
      }
}
KeyTypeDescription

gov*

Addr

The address of the governance contract

claim_token*

Addr

The address of the token contract to be claimed

start_lock_period_time

u64

The start time of the lock period

total_lock_amount*

Uint256

The total amount of tokens to be locked

'* = optional

AddUser

#[cw_serde]
pub enum ExecuteMsg {
    AddUser(Vec<AddUserMsg>),
}
#[cw_serde]
pub struct AddUserMsg {
    pub user: Addr,
    pub lock_amount: Uint256,
    pub replace: bool,
}
{
  "add_user": [ 
      {
         "user": "sei1...",
         "lock_amount": "20_000_000_000_000",
         "replace": false
      }
   ]
}
KeyTypeDescription

add_user

Vec<AddUserMsg>

List of AddUserMsg

KeyTypeDescription

user

Addr

The address of the user to be added

lock_amount

Uint256

The amount of tokens to be locked

replace

bool

Whether to replace the existing user with the same address (default: false)

UserRegret

#[cw_serde]
pub enum ExecuteMsg {
    UserRegret {},
}
{
  "user_regret": {}
}

UserClaim

#[cw_serde]
pub enum ExecuteMsg {
    UserClaim {},
}
{
  "user_claim": {}
}

RegretClaim

#[cw_serde]
pub enum ExecuteMsg {
    RegretClaim {},
}
{
  "regret_claim": {}
}

QueryMsg

QueryGlobalConfig

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GlobalInfosResponse)]
    QueryGlobalConfig {},
}
{
  "query_global_config": {}
}

GlobalInfosResponse

#[cw_serde]
pub struct GlobalInfosResponse {
    pub config: GlobalConfig,
    pub state: GlobalState,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GlobalConfig {
    pub gov: Addr,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GlobalState {
    pub total_user_lock_amount: Uint256,
    pub total_user_claimed_lock_amount: Uint256,
}
{
  "config": {},
  "state": {}
}
KeyTypeDescription

config

GlobalConfig

Configuration in the GlobalConfig struct

state

GlobalState

Station in the GlobalState struct

KeyTypeDescription

gov

Addr

The address of the governance contract

claim_token

Addr

The address of the token contract to be claimed

total_lock_amount

Uint256

The total amount of tokens to be locked

start_lock_period_time

u64

The start time of the lock period

duration_per_period

u64

The duration of each lock period

periods

u64

The number of lock periods

KeyTypeDescription

total_user_lock_amount

Uint256

The total amount of tokens to be locked by all users

total_user_claimed_lock_amount

Uint256

The total amount of tokens to be locked by all users that have been claimed

QueryUserInfo

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserInfoResponse)]
    QueryUserInfo { user: Addr },
}
{
  "query_user_info": {
    "user": "sei1..."
  }
}

UserInfoResponse

#[cw_serde]
pub struct UserInfoResponse {
    pub state: UserState,
    pub current_period: u64,
    pub claimable_lock_amount: Uint256,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct UserState {
    pub user: Addr,
    pub total_user_lock_amount: Uint256,

    pub claimed_lock_amount: Uint256,

    pub last_claimed_period: u64,
    pub user_per_lock_amount: Uint256,

}
{
  "state": {
      "user": "sei1...",
      "total_user_lock_amount": "20_000_000_000_000",
      "claimed_lock_amount": "0",
      "last_claimed_period": "0",
      "user_per_lock_amount": "0"
   },
  "current_period": "0",
  "claimable_lock_amount": "0"
}
KeyTypeDescription

state

UserState

The user state

current_period

u64

The current lock period

claimable_lock_amount

Uint256

The amount of tokens that can be claimed by the user in the current period

KeyTypeDescription

user

Addr

The address of the user

total_user_lock_amount

Uint256

The total amount of tokens to be locked by the user

claimed_lock_amount

Uint256

The total amount of tokens to be locked by the user that have been claimed

last_claimed_period

u64

The last claimed lock period

user_per_lock_amount

Uint256

The amount of tokens to be locked by the user per lock period

QueryUserInfos

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(Vec < UserInfoResponse >)]
    QueryUserInfos {
        start_after: Option<Addr>,
        limit: Option<u32>,
    },
}
{
  "query_user_infos": {
    "start_after": "sei1...",
    "limit": 10
  }
}
KeyTypeDescription

start_after*

Addr

The address of the user to start after

limit*

u32

The maximum number of users to return

* = optional

Last updated