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.
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.
Key
Type
Description
seilor_fund*
Addr
The address of fund
gov*
Addr
The address of the new governance contract
seilor_distribute*
Addr
The address of distribute
Mint
Only with the "mintable" extension. If authorized, creates amount new tokens and adds to the recipient balance.
Key
Type
Description
recipient
String
Recipient's address
amount
Uint128
Amount to be minted
Burn
Burn is a base message to destroy tokens forever
Key
Type
Description
amount
Uint128
Amount to be burned
Transfer
Transfer is a base message to move tokens to another account without triggering actions
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.
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.
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.
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.
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.
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.
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.
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
Key
Type
Description
project*
String
Project name
description*
String
Project description
marketing*
String
Marketing URL
* = optional
UploadLogo
If set as the "marketing" role on the contract, upload a new URL, SVG, or PNG for the token
Key
Type
Description
logo
String
Logo URL
QueryMsg
SeilorConfig
Gets the SEILOR contract configuration.
SeilorConfigResponse
Key
Valu
Description
max_supply
u128
SEILOR token max supply
fund
Addr
The address of fund
distribute
Addr
The address of distribute
gov
Addr
The address of the governance contract
Balance
Returns the current balance of the given address, 0 if unset. Return type: BalanceResponse.
Key
Type
Description
address
String
The user's address
BalanceResponse
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
TokenInfoResponse
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.
Key
Type
Description
owner
String
The owner's address
spender
String
The spender's address
AllowanceResponse
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.
MinterResponse
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.
MarketingInfoResponse
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
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.
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.
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.
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
Key
Type
Description
allowances
Vec<AllowanceInfo>
The list of allowances
AllowanceInfo
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 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 {},
}
#[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>,
}