Seilor

Kryptonite is an open-source Decentralized Autonomous Organization (DAO) project. It is governed by individuals worldwide who hold its governance token, SEILOR. Through a governance system that includes Executive Voting and Governance Polling, SEILOR holders can influence the protocol's direction. The SEILOR token is the native token of the kryptonite Protocol, providing essential functionalities such as staking, governance, minting, and liquidator rewards. SEILOR is an ERC-20 governance token with a maximum supply of 100,000,000. SEILOR holders manage the kryptonite Protocol and oversee the financial risks associated with kUSD to ensure stability, transparency, and efficiency. The voting weight of SEILOR is proportional to the amount staked by a voter in the voting contract. In other words, the more SEILOR tokens locked in the contract, the greater the voter's decision-making power.

Config

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct SeilorConfig {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub distribute: Addr,
    pub new_gov: Option<Addr>,
    pub cross_chain_swap_contract: Option<Addr>,
}
Key
Type
Description

max_supply

u128

SEILOR token max supply

fund

Addr

gov

Addr

The address of the governance contract

distribute

Addr

new_gov*

Addr

The address of the new governance contract

cross_chain_swap_contract*

Addr

The address of the cross chain swap contract

* = optional

InitMsg

InstantiateMsg

#[cw_serde]
pub struct InstantiateMsg {
    pub cw20_init_msg: Cw20InstantiateMsg,
    pub max_supply: u128,
    // default msg.sender
    pub gov: Option<Addr>,
}
{
  "cw20_init_msg": {
    "name": "Kryptonite",
    "symbol": "SEILOR",
    "decimals": 6,
    "initial_balances": [],
    "mint": null,
    "marketing": null
  },
  "max_supply": "1000000000000000",
  "gov": null
}
Key
Type
Description

cw20_init_msg

Cw20InstantiateMsg

The cw20 initialization message structure based on the cw20_base library

max_supply

u128

SEILOR token max supply

gov*

Addr

The address of the governance contract

* = optional

ExecuteMsg

UpdateConfig

Updates the configuration of the contract. Can only be issued by the owner.

#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        seilor_fund: Option<Addr>,
        gov: Option<Addr>,
        seilor_distribute: Option<Addr>,
    }
}
{
  "update_config": {
    "seilor_fund": null,
    "gov": null,
    "seilor_distribute": null
  }
}
Key
Type
Description

seilor_fund*

Addr

gov*

Addr

The address of the new governance contract

seilor_distribute*

Addr

Mint

Only with the "mintable" extension. If authorized, creates amount new tokens and adds to the recipient balance.

#[cw_serde]
pub enum ExecuteMsg {
    Mint {
        recipient: String,
        amount: Uint128
    }
}
{
  "mint": {
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
Key
Type
Description

recipient

String

Recipient's address

amount

Uint128

Amount to be minted

Burn

Burn is a base message to destroy tokens forever

#[cw_serde]
pub enum ExecuteMsg {
    Burn {
        amount: Uint128
    }
}
{
  "burn": {
    "amount": "100000000000000000000000000"
  }
}
Key
Type
Description

amount

Uint128

Amount to be burned

Transfer

Transfer is a base message to move tokens to another account without triggering actions

#[cw_serde]
pub enum ExecuteMsg {
    Transfer {
        recipient: String,
        amount: Uint128
    }
}
{
  "transfer": {
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
Key
Type
Description

recipient

String

Recipient's address

amount

Uint128

Amount to be transfered

Send

Send is a base message to transfer tokens to a contract and trigger an action on the receiving contract.

#[cw_serde]
pub enum ExecuteMsg {
    Send {
        contract: String,
        amount: Uint128,
        msg: Binary
    }
}
{
  "send": {
    "contract": "sei...",
    "amount": "100000000000000000000000000",
    "msg": "eyJh..."
  }
}
Key
Type
Description

contract

String

The contract to be trigger on action

amount

Uint128

Amount to be transfered

msg

Binary

Message to be sent

IncreaseAllowance

Only with "approval" extension. Allows spender to access an additional amount tokens from the owner's (env.sender) account. If expires is Some(), overwrites current allowance expiration with this one.

#[cw_serde]
pub enum ExecuteMsg {
    IncreaseAllowance {
        spender: String,
        amount: Uint128,
        expires: Option<Expiration>
    }
}
{
  "increase_allowance": {
    "spender": "sei...",
    "amount": "100000000000000000000000000",
    "expires": null
  }
}
Key
Type
Description

spender

String

The spender's address

amount

Uint128

Amount to increase for allowance

expires*

Expiration

Expiration time

* = optional

DecreaseAllowance

Only with "approval" extension. Lowers the spender's access of tokens from the owner's (env.sender) account by amount. If expires is Some(), overwrites current allowance expiration with this one.

#[cw_serde]
pub enum ExecuteMsg {
    DecreaseAllowance {
        spender: String,
        amount: Uint128,
        expires: Option<Expiration>
    }
}
{
  "decrease_allowance": {
    "spender": "sei...",
    "amount": "100000000000000000000000000",
    "expires": null
  }
}
Key
Type
Description

spender

The spender's address

amount

Amount to decrease for allowance

expires*

Expiration time

* = optional

TransferFrom

Only with "approval" extension. Transfers amount tokens from owner -> recipient if env.sender has sufficient pre-approval.

#[cw_serde]
pub enum ExecuteMsg {
    TransferFrom {
        owner: String,
        recipient: String,
        amount: Uint128
    }
}
{
  "transfer_from": {
    "owner": "sei...",
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
Key
Type
Description

owner

String

The owner's address

recipient

String

The address of recipient

amount

Uint128

Amount to be transfered

SendFrom

Only with "approval" extension. Sends amount tokens from owner -> contract if env.sender has sufficient pre-approval.

#[cw_serde]
pub enum ExecuteMsg {
    SendFrom {
        owner: String,
        contract: String,
        amount: Uint128,
        msg: Binary
    }
}
{
  "send_from": {
    "owner": "sei...",
    "contract": "sei...",
    "amount": "100000000000000000000000000",
    "msg": "eyJh..."
  }
}
Key
Type
Description

owner

String

The owner's address

contract

String

The contract to be trigger on action

amount

Uint128

Amount to be sent

msg

Binary

Message to be sent

BurnFrom

Only with "approval" extension. Destroys tokens forever.

#[cw_serde]
pub enum ExecuteMsg {
    BurnFrom {
        owner: String,
        amount: Uint128
    }
}
{
  "burn_from": {
    "owner": "sei...",
    "amount": "100000000000000000000000000"
  }
}
Key
Type
Description

owner

String

The owner's address

amount

Uint128

Amount to be burned

UpdateMinter

Only with the "mintable" extension. The current minter may set a new minter. Setting the minter to None will remove the token's minter forever.

#[cw_serde]
pub enum ExecuteMsg {
    UpdateMinter {
        minter: Option<String>
    }
}
{
  "update_minter": {
    "minter": null
  }
}
Key
Type
Description

minter*

String

The new miner's address

* = optional

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
  }
}
Key
Type
Description

project*

String

Project name

description*

String

Project description

marketing*

String

Marketing URL

* = optional

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://..."
  }
}
Key
Type
Description

logo

String

Logo URL

QueryMsg

SeilorConfig

Gets the SEILOR contract configuration.

#[cw_serde]
pub enum QueryMsg {
    SeilorConfig {}
}
{
  "seilor_config": {}
}

SeilorConfigResponse

#[cw_serde]
pub struct SeilorConfigResponse {
    pub max_supply: u128,
    pub fund: Addr,
    pub distribute: Addr,
    pub gov: Addr,
}
{
  "max_supply": "1000000000000000000000000000",
  "seilor_fund": "sei...",
  "seilor_distribute": "sei...",
  "gov": "sei..."
}
Key
Valu
Description

max_supply

u128

SEILOR token max supply

fund

Addr

distribute

Addr

gov

Addr

The address of the governance contract

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..."
  }
}
Key
Type
Description

address

String

The user's address

BalanceResponse

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

balance

Uint128

The balance of SEILOR tokens for the queried user's address.

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"
}
Key
Type
Description

name

String

Name

symbol

String

Symbol

decimals

u8

Decimals

total_supply

Uint128

Total supply

Allowance

Only with "allowance" extension. Returns how much spender can use from owner account, 0 if unset. Return type: AllowanceResponse.

#[cw_serde]
pub enum QueryMsg {
    Allowance {
        owner: String,
        spender: String
    }
}
{
  "allowance": {
    "owner": "sei...",
    "spender": "sei..."
  }
}
Key
Type
Description

owner

String

The owner's address

spender

String

The spender's address

AllowanceResponse

#[cw_serde]
pub struct AllowanceResponse {
    pub allowance: Uint128,
    pub expires: Expiration,
}

#[cw_serde]
#[derive(Copy)]
pub enum Expiration {
    /// AtHeight will expire when `env.block.height` >= height
    AtHeight(u64),
    /// AtTime will expire when `env.block.time` >= time
    AtTime(Timestamp),
    /// Never will never expire. Used to express the empty variant
    Never {},
}
{
  "allowance": "100000000000000000000000000",
  "expires": {
    "at_height": "0",
    "at_time": "0",
    "never": {}
  }
}
Key
Type
Description

allowance

Uint128

The amount allowed to be spent by spender

expires

Expiration

Expiration time

Key
Type
Description

at_height

u64

AtHeight will expire when env.block.height >= height

at_time

Timestamp

AtTime will expire when env.block.time >= time

never

Never will never expire. Used to express the empty variant

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"
}
Key
Type
Description

minter

Addr

the minter's address

cap*

Uint128

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.

* = 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..."
}
Key
Type
Description

project*

String

A URL pointing to the project behind this token.

description*

String

A longer description of the token and it's utility. Designed for tooltips or such

logo*

String

A link to the logo, or a comment there is an on-chain logo stored

marketing*

Addr

The address (if any) who can update this data structure

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..."
}
Key
Type
Description

mime_type

String

The mime type of the image

data

Binary

The raw bytes of the image

AllAllowances

Only with "enumerable" extension (and "allowances") Returns all allowances this owner has approved. Supports pagination. Return type: AllAllowancesResponse.

#[cw_serde]
pub enum QueryMsg {
    AllAllowances {
        owner: String,
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
{
  "all_allowances": {
    "owner": "sei...",
    "start_after": "sei...",
    "limit": 10
  }
}
Key
Type
Description

owner

String

The owner of the allowances

start_after*

String

The address to start after, used for pagination

limit*

u32

The number of allowances to limit the query to

AllAllowancesResponse

#[cw_serde]
pub struct AllAllowancesResponse {
    pub allowances: Vec<AllowanceInfo>,
}
{
  "allowances": [
    {
      "spender": "sei...",
      "allowance": "100000000000000000000000000",
      "expires": {
        "at_height": "0",
        "at_time": "0",
        "never": {}
      }
    }
  ]
}
Key
Type
Description

allowances

Vec<AllowanceInfo>

The list of allowances

AllowanceInfo

#[cw_serde]
pub struct AllowanceInfo {
    pub spender: Addr,
    pub allowance: Uint128,
    pub expires: Expiration,
}
{
  "spender": "sei...",
  "allowance": "100000000000000000000000000",
  "expires": {
    "at_height": "0",
    "at_time": "0",
    "never": {}
  }
}
Key
Type
Description

spender

Addr

The address of the spender

allowance

Uint128

The amount of tokens the spender is allowed to spend

expires

Expiration

When the allowance expires

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
  }
}
Key
Type
Description

start_after*

String

The address to start after, used for pagination

limit*

u32

The number of accounts to limit the query to

* = optional

Last updated