# 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

```rust
#[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>,
}

```

<table><thead><tr><th width="163">Key</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>veSEILOR max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="broken-reference">fund</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>total_minted</td><td>Uint128</td><td>Total amount of veSEILOR that has been minted</td></tr><tr><td>new_gov</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

## InitMsg

```rust
#[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,
}
```

```json
{
  "cw20_init_msg": {
    "name": "seilor dev",
    "symbol": "seilor",
    "decimals": 6,
    "initial_balances": []
  },
  "max_supply": "650000000000000"
}
```

<table><thead><tr><th width="174">Key</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>cw20_init_msg</td><td>Cw20InstantiateMsg</td><td>The cw20 initialization message structure based on the cw20_base library</td></tr><tr><td>max_supply</td><td>u128</td><td>SEILOR max supply</td></tr><tr><td>gov*</td><td>Addr</td><td>Address of contract owner that can update config. If not filled in, it is the initialization call address</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr></tbody></table>

\* = optional

## ExecuteMsg

### UpdateConfig&#x20;

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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        max_minted: Option<Uint128>,
        fund: Option<Addr>,
        gov: Option<Addr>,
    }
}
```

```json
{
  "update_config": {
    "max_minted": "650000000000000",
    "fund": "sei1...",
    "gov": "sei1..."
  }
}
```

<table><thead><tr><th width="161">Key</th><th width="210">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_minted*</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>fund*</td><td>Addr</td><td>The address of contract <a href="broken-reference">fund</a></td></tr><tr><td>gov*</td><td>Addr</td><td>The address of the governance contract</td></tr></tbody></table>

### SetMinters&#x20;

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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SetMinters {
        contracts: Vec<Addr>,
        is_minter: Vec<bool>
    }
}
```

```json
{
  "set_minters": {
    "contracts": [
      "sei1..."
    ],
    "is_minter": [
      true
    ]
  }
}
```

<table><thead><tr><th width="162">Key</th><th width="181">Type</th><th>Description</th></tr></thead><tbody><tr><td>contracts</td><td>Vec&#x3C;Addr></td><td>List of contracts to be updated</td></tr><tr><td>is_minter</td><td>Vec&#x3C;bool></td><td>List of corresponding mint permissions</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Mint

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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Mint {
        recipient: String,
        amount: Uint128,
    }
}
```

```json
{
  "mint": {
    "recipient": "sei1...",
    "amount": "650000000000000"
  }
}
```

<table><thead><tr><th width="199">Key</th><th width="202">Type</th><th>Description</th></tr></thead><tbody><tr><td>recipient</td><td>String</td><td>Recipient's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount of veSEILOR to mint</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Burn

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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Burn {
        user: String,
        amount: Uint128,
    }
}
```

```json
{
  "burn": {
    "user": "sei1...",
    "amount": "650000000000000"
  }
}
```

<table><thead><tr><th width="186">Key</th><th width="184">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>String</td><td>The user address for veSEILOR to be burned</td></tr><tr><td>amount</td><td>Uint128</td><td>The amount of veSEILOR to be burned</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### 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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateMarketing {
        project: Option<String>,
        description: Option<String>,
        marketing: Option<String>,
    }
}
```

```json
{
  "update_marketing": {
    "project": null,
    "description": null,
    "marketing": null
  }
}
```

<table><thead><tr><th width="176">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>Project name</td></tr><tr><td>description*</td><td>String</td><td>Project description</td></tr><tr><td>marketing*</td><td>String</td><td>Marketing URL</td></tr></tbody></table>

### UploadLogo&#x20;

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

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UploadLogo {
        logo: String
    }
}
```

```json
{
  "upload_logo": {
    "logo": "https://..."
  }
}
```

<table><thead><tr><th width="168">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>logo</td><td>String</td><td>Logo URL</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### VoteConfig&#x20;

Returns the current configuration of the contract.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(VoteConfigResponse)]
    VoteConfig {},
}
```

```
{
  "vote_config": {}
}
```

### VoteConfigResponse&#x20;

```rust
#[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>,
}
```

```json
{
  "max_supply": "650000000000000",
  "fund": "sei1...",
  "gov": "sei1...",
  "max_minted": "650000000000000",
  "total_minted": "650000000000000"
}
```

<table><thead><tr><th width="163">Key</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>veSEILOR max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="broken-reference">fund</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>total_minted</td><td>Uint128</td><td>Total amount of veSEILOR that has been minted</td></tr><tr><td>new_gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

\* = optional

### IsMinter&#x20;

Returns whether the given address is a minter.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(IsMinterResponse)]
    IsMinter { address: String },
}
```

```json
{
  "is_minter": {
    "address": "sei1..."
  }
}
```

### IsMinterResponse&#x20;

```rust
#[cw_serde]
pub struct IsMinterResponse {
    pub is_minter: bool,
}
```

```json
{
  "is_minter": true
}
```

<table><thead><tr><th width="189">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>is_minter</td><td>bool</td><td>Return whether the user is a minter</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Checkpoints&#x20;

Returns the checkpoints of the given address and points.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(CheckpointResponse)]
    Checkpoints { account: Addr, pos: u32 },
}
```

```json
{
  "checkpoints": {
    "account": "sei1...",
    "pos": 0
  }
}
```

<table><thead><tr><th width="187">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>the user's address</td></tr><tr><td>pos</td><td>u32</td><td>Voting index</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### CheckpointResponse&#x20;

```rust
#[cw_serde]
pub struct CheckpointResponse {
    pub from_block: u64,
    pub votes: u128,
}
```

```
{
  "from_block": 0,
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="188">Key</th><th width="170">Type</th><th>Description</th></tr></thead><tbody><tr><td>from_block</td><td>u64</td><td>Starting block height</td></tr><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### NumCheckpoints

Returns the number of checkpoints for the given address.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(NumCheckpointsResponse)]
    NumCheckpoints { account: Addr },
}
```

```
{
  "num_checkpoints": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="169">Key</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### NumCheckpointsResponse&#x20;

```rust
#[cw_serde]
pub struct NumCheckpointsResponse {
    pub num: usize,
}
```

```
{
  "num": 1
}
```

| Key | Type | Description  |
| --- | ---- | ------------ |
| num | u128 | Voting index |
|     |      |              |

### GetVotes&#x20;

Returns the amount of votes the given address has.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetVotesResponse)]
    GetVotes { account: Addr },
}
```

```json
{
  "get_votes": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="193">Key</th><th width="153">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetVotesResponse&#x20;

```rust
#[cw_serde]
pub struct GetVotesResponse {
    pub votes: u128,
}
```

```
{
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="174">Key</th><th width="207">Type</th><th>Description</th></tr></thead><tbody><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastVotes&#x20;

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

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetPastVotesResponse)]
    GetPastVotes { account: Addr, block_number: u64 },
}
```

```json
{
  "get_past_votes": {
    "account": "sei1...",
    "block_number": 0
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td>block_number</td><td>u64</td><td>The given block height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastVotesResponse&#x20;

```rust
#[cw_serde]
pub struct GetPastVotesResponse {
    pub votes: u128,
}
```

```
{
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="182">Key</th><th width="209">Type</th><th>Description</th></tr></thead><tbody><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastTotalSupply&#x20;

Returns the amount of total supply  at the given block.

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

```json
{
  "get_past_total_supply": {
    "block_number": 0
  }
}
```

<table><thead><tr><th width="192">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>block_number</td><td>u64</td><td>The given block height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastTotalSupplyResponse&#x20;

```rust
#[cw_serde]
pub struct GetPastTotalSupplyResponse {
    pub total_supply: u128,
}
```

```
{
  "total_supply": "650000000000000"
}
```

<table><thead><tr><th width="198">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_supply</td><td>u128</td><td>The total number of tokens participating in the vote at the given height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Balance

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

```rust
#[cw_serde]
pub enum QueryMsg {
    Balance {
        address: String
    }
}
```

```json
{
  "balance": {
    "address": "sei..."
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### BalanceResponse

```rust
#[cw_serde]
pub struct BalanceResponse {
    pub balance: Uint128,
}
```

```json
{
  "balance": "100000000000000000000000000"
}
```

<table><thead><tr><th width="186">Key</th><th width="242">Type</th><th>Description</th></tr></thead><tbody><tr><td>balance</td><td>Uint128</td><td>The balance of SEILOR tokens for the queried user's address.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### TokenInfo

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

```rust
#[cw_serde]
pub enum QueryMsg {
    TokenInfo {}
}
```

```json
{
  "token_info": {}
}
```

### TokenInfoResponse

```rust
#[cw_serde]
pub struct TokenInfoResponse {
    pub name: String,
    pub symbol: String,
    pub decimals: u8,
    pub total_supply: Uint128,
}
```

```json
{
  "name": "SEILOR",
  "symbol": "SEILOR",
  "decimals": 18,
  "total_supply": "100000000000000000000000000"
}
```

### Minter&#x20;

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

```rust
#[cw_serde]
pub enum QueryMsg {
    Minter {}
}
```

```json
{
  "minter": {}
}
```

### MinterResponse

```rust
#[cw_serde]
pub struct MinterResponse {
    pub minter: Addr,
    pub cap: Option<Uint128>,
}
```

```json
{
  "minter": "sei...",
  "cap": "100000000000000000000000000"
}
```

<table><thead><tr><th width="161">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter</td><td>Addr</td><td>the minter's address</td></tr><tr><td>cap*</td><td>Uint128</td><td>cap is a hard cap on total supply that can be achieved by minting. Note that this refers to total_supply. If None, there is unlimited cap.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllAccounts

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

```rust
#[cw_serde]
pub enum QueryMsg {
    AllAccounts {
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
```

```json
{
  "all_accounts": {
    "start_after": "sei...",
    "limit": 10
  }
}
```

<table><thead><tr><th width="177">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_after*</td><td>String</td><td>The address to start after, used for pagination</td></tr><tr><td>limit*</td><td>u32</td><td>The number of accounts to limit the query to</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### MarketingInfo&#x20;

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

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

```rust
#[cw_serde]
pub enum QueryMsg {
    MarketingInfo {}
}
```

```json
{
  "marketing_info": {}
}
```

### MarketingInfoResponse&#x20;

```rust
#[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>,
}
```

```json
{
  "project": "https://...",
  "description": "Ku...",
  "logo": {
    "url": "logo",
    "embedded": "iVBORw0KGgoAAAANSUhEUgAA..."
  },
  "marketing": "sei..."
}
```

<table><thead><tr><th width="174">Key</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>A URL pointing to the project behind this token.</td></tr><tr><td>description*</td><td>String</td><td>A longer description of the token and it's utility. Designed for tooltips or such</td></tr><tr><td>logo*</td><td>String</td><td>A link to the logo, or a comment there is an on-chain logo stored</td></tr><tr><td>marketing*</td><td>Addr</td><td>The address (if any) who can update this data structure</td></tr></tbody></table>

### DownLoadLogo

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.

```rust
#[cw_serde]
pub enum QueryMsg {
    DownloadLogo {}
}
```

```json
{
  "download_logo": {}
}
```

### DownloadLogoResponse&#x20;

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.

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

```json
{
  "mime_type": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAA..."
}
```

<table><thead><tr><th width="187">Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td>mime_type</td><td>String</td><td>The mime type of the image</td></tr><tr><td>data</td><td>Binary</td><td>The raw bytes of the image</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>
