Ve Seilor

veSEILOR is escrowed SEILOR. It has the same value as SEILOR and is subject to the total supply of SEILOR. veSEILOR cannot be traded or transferred but has voting rights and can share in protocol earnings. Mining rewards are the primary source of veSEILOR. veSEILOR holders can convert their veSEILOR to SEILOR through a vesting process. Once the process is started, veSEILOR will be linearly converted to SEILOR over a period of 30 days.

Config

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct VoteConfig {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub max_minted: Uint128,
    pub total_minted: Uint128,
    pub new_gov: Option<Addr>,
}

InitMsg

#[cw_serde]
pub struct InstantiateMsg {
    pub cw20_init_msg: Cw20InstantiateMsg,

    pub max_supply: u128,
    // default msg.sender
    pub gov: Option<Addr>,
    pub max_minted: u128,
}
{
  "cw20_init_msg": {
    "name": "seilor dev",
    "symbol": "seilor",
    "decimals": 6,
    "initial_balances": []
  },
  "max_supply": "650000000000000"
}

* = optional

ExecuteMsg

UpdateConfig

Updates the configuration of the contract. Can only be issued by the gov address.

#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        max_minted: Option<Uint128>,
        fund: Option<Addr>,
        gov: Option<Addr>,
    }
}
{
  "update_config": {
    "max_minted": "650000000000000",
    "fund": "sei1...",
    "gov": "sei1..."
  }
}

SetMinters

Updates the minters of the contract. Can only be issued by the gov address.

#[cw_serde]
pub enum ExecuteMsg {
    SetMinters {
        contracts: Vec<Addr>,
        is_minter: Vec<bool>
    }
}
{
  "set_minters": {
    "contracts": [
      "sei1..."
    ],
    "is_minter": [
      true
    ]
  }
}

Mint

Mints veSEILOR. Can only be issued by the mint permissions.

#[cw_serde]
pub enum ExecuteMsg {
    Mint {
        recipient: String,
        amount: Uint128,
    }
}
{
  "mint": {
    "recipient": "sei1...",
    "amount": "650000000000000"
  }
}

Burn

Burns veSEILOR. Can only be issued by the mint permissions.

#[cw_serde]
pub enum ExecuteMsg {
    Burn {
        user: String,
        amount: Uint128,
    }
}
{
  "burn": {
    "user": "sei1...",
    "amount": "650000000000000"
  }
}

UpdateMarketing

Only with the "marketing" extension. If authorized, updates marketing metadata. Setting None/null for any of these will leave it unchanged. Setting Some("") will clear this field on the contract storage

#[cw_serde]
pub enum ExecuteMsg {
    UpdateMarketing {
        project: Option<String>,
        description: Option<String>,
        marketing: Option<String>,
    }
}
{
  "update_marketing": {
    "project": null,
    "description": null,
    "marketing": null
  }
}

If set as the "marketing" role on the contract, upload a new URL, SVG, or PNG for the token

#[cw_serde]
pub enum ExecuteMsg {
    UploadLogo {
        logo: String
    }
}
{
  "upload_logo": {
    "logo": "https://..."
  }
}

QueryMsg

VoteConfig

Returns the current configuration of the contract.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(VoteConfigResponse)]
    VoteConfig {},
}
{
  "vote_config": {}
}

VoteConfigResponse

#[cw_serde]
pub struct VoteConfigResponse {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub max_minted: Uint128,
    pub total_minted: Uint128,
    pub new_gov: Option<Addr>,
}
{
  "max_supply": "650000000000000",
  "fund": "sei1...",
  "gov": "sei1...",
  "max_minted": "650000000000000",
  "total_minted": "650000000000000"
}

* = optional

IsMinter

Returns whether the given address is a minter.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(IsMinterResponse)]
    IsMinter { address: String },
}
{
  "is_minter": {
    "address": "sei1..."
  }
}

IsMinterResponse

#[cw_serde]
pub struct IsMinterResponse {
    pub is_minter: bool,
}
{
  "is_minter": true
}

Checkpoints

Returns the checkpoints of the given address and points.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(CheckpointResponse)]
    Checkpoints { account: Addr, pos: u32 },
}
{
  "checkpoints": {
    "account": "sei1...",
    "pos": 0
  }
}

CheckpointResponse

#[cw_serde]
pub struct CheckpointResponse {
    pub from_block: u64,
    pub votes: u128,
}
{
  "from_block": 0,
  "votes": "650000000000000"
}

NumCheckpoints

Returns the number of checkpoints for the given address.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(NumCheckpointsResponse)]
    NumCheckpoints { account: Addr },
}
{
  "num_checkpoints": {
    "account": "sei1..."
  }
}

NumCheckpointsResponse

#[cw_serde]
pub struct NumCheckpointsResponse {
    pub num: usize,
}
{
  "num": 1
}

GetVotes

Returns the amount of votes the given address has.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetVotesResponse)]
    GetVotes { account: Addr },
}
{
  "get_votes": {
    "account": "sei1..."
  }
}

GetVotesResponse

#[cw_serde]
pub struct GetVotesResponse {
    pub votes: u128,
}
{
  "votes": "650000000000000"
}

GetPastVotes

Returns the amount of votes the given address had at the given block.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetPastVotesResponse)]
    GetPastVotes { account: Addr, block_number: u64 },
}
{
  "get_past_votes": {
    "account": "sei1...",
    "block_number": 0
  }
}

GetPastVotesResponse

#[cw_serde]
pub struct GetPastVotesResponse {
    pub votes: u128,
}
{
  "votes": "650000000000000"
}

GetPastTotalSupply

Returns the amount of total supply at the given block.

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetPastTotalSupplyResponse)]
    GetPastTotalSupply { block_number: u64 },
}
{
  "get_past_total_supply": {
    "block_number": 0
  }
}

GetPastTotalSupplyResponse

#[cw_serde]
pub struct GetPastTotalSupplyResponse {
    pub total_supply: u128,
}
{
  "total_supply": "650000000000000"
}

Balance

Returns the current balance of the given address, 0 if unset. Return type: BalanceResponse.

#[cw_serde]
pub enum QueryMsg {
    Balance {
        address: String
    }
}
{
  "balance": {
    "address": "sei..."
  }
}

BalanceResponse

#[cw_serde]
pub struct BalanceResponse {
    pub balance: Uint128,
}
{
  "balance": "100000000000000000000000000"
}

TokenInfo

Returns metadata on the contract - name, decimals, supply, etc. Return type: TokenInfoResponse

#[cw_serde]
pub enum QueryMsg {
    TokenInfo {}
}
{
  "token_info": {}
}

TokenInfoResponse

#[cw_serde]
pub struct TokenInfoResponse {
    pub name: String,
    pub symbol: String,
    pub decimals: u8,
    pub total_supply: Uint128,
}
{
  "name": "SEILOR",
  "symbol": "SEILOR",
  "decimals": 18,
  "total_supply": "100000000000000000000000000"
}

Minter

Only with "mintable" extension. Returns who can mint and the hard cap on maximum tokens after minting. Return type: MinterResponse.

#[cw_serde]
pub enum QueryMsg {
    Minter {}
}
{
  "minter": {}
}

MinterResponse

#[cw_serde]
pub struct MinterResponse {
    pub minter: Addr,
    pub cap: Option<Uint128>,
}
{
  "minter": "sei...",
  "cap": "100000000000000000000000000"
}

AllAccounts

Only with "enumerable" extension Returns all accounts that have balances. Supports pagination. Return type: AllAccountsResponse.

#[cw_serde]
pub enum QueryMsg {
    AllAccounts {
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
{
  "all_accounts": {
    "start_after": "sei...",
    "limit": 10
  }
}

* = optional

MarketingInfo

Only with "marketing" extension Returns more metadata on the contract to display in the client:

description, logo, project url, etc. Return type: MarketingInfoResponse.

#[cw_serde]
pub enum QueryMsg {
    MarketingInfo {}
}
{
  "marketing_info": {}
}

MarketingInfoResponse

#[cw_serde]
pub struct MarketingInfoResponse {
    /// A URL pointing to the project behind this token.
    pub project: Option<String>,
    /// A longer description of the token and it's utility. Designed for tooltips or such
    pub description: Option<String>,
    /// A link to the logo, or a comment there is an on-chain logo stored
    pub logo: Option<LogoInfo>,
    /// The address (if any) who can update this data structure
    pub marketing: Option<Addr>,
}
{
  "project": "https://...",
  "description": "Ku...",
  "logo": {
    "url": "logo",
    "embedded": "iVBORw0KGgoAAAANSUhEUgAA..."
  },
  "marketing": "sei..."
}

Only with "marketing" extension Downloads the embedded logo data (if stored on chain). Errors if no logo data stored for this contract. Return type: DownloadLogoResponse.

#[cw_serde]
pub enum QueryMsg {
    DownloadLogo {}
}
{
  "download_logo": {}
}

DownloadLogoResponse

When we download an embedded logo, we get this response type. We expect a SPA to be able to accept this info and display it.

#[cw_serde]
pub struct DownloadLogoResponse {
    /// The mime type of the image
    pub mime_type: String,
    /// The raw bytes of the image
    pub data: Binary,
}
{
  "mime_type": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAA..."
}

Last updated