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>,
}
max_supply
u128
veSEILOR max supply
fund
Addr
The address of contract fund
gov
Addr
The address of the governance contract
max_minted
Uint128
Maximum amount of veSEILOR that can be minted
total_minted
Uint128
Total amount of veSEILOR that has been minted
new_gov
Addr
The address of the new governance contract
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"
}
cw20_init_msg
Cw20InstantiateMsg
The cw20 initialization message structure based on the cw20_base library
max_supply
u128
SEILOR max supply
gov*
Addr
Address of contract owner that can update config. If not filled in, it is the initialization call address
max_minted
Uint128
Maximum amount of veSEILOR that can be minted
* = 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..."
}
}
max_minted*
Uint128
Maximum amount of veSEILOR that can be minted
fund*
Addr
The address of contract fund
gov*
Addr
The address of the governance contract
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
]
}
}
contracts
Vec<Addr>
List of contracts to be updated
is_minter
Vec<bool>
List of corresponding mint permissions
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"
}
}
recipient
String
Recipient's address
amount
Uint128
Amount of veSEILOR to mint
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"
}
}
user
String
The user address for veSEILOR to be burned
amount
Uint128
The amount of veSEILOR to be burned
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
}
}
project*
String
Project name
description*
String
Project description
marketing*
String
Marketing URL
UploadLogo
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://..."
}
}
logo
String
Logo URL
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"
}
max_supply
u128
veSEILOR max supply
fund
Addr
The address of contract fund
gov
Addr
The address of the governance contract
max_minted
Uint128
Maximum amount of veSEILOR that can be minted
total_minted
Uint128
Total amount of veSEILOR that has been minted
new_gov*
Addr
The address of the new governance contract
* = 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
}
is_minter
bool
Return whether the user is a minter
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
}
}
account
Addr
the user's address
pos
u32
Voting index
CheckpointResponse
#[cw_serde]
pub struct CheckpointResponse {
pub from_block: u64,
pub votes: u128,
}
{
"from_block": 0,
"votes": "650000000000000"
}
from_block
u64
Starting block height
votes
u128
The amount of votes received
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..."
}
}
account
Addr
The address of the queried user
NumCheckpointsResponse
#[cw_serde]
pub struct NumCheckpointsResponse {
pub num: usize,
}
{
"num": 1
}
num
u128
Voting index
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..."
}
}
account
Addr
The address of the queried user
GetVotesResponse
#[cw_serde]
pub struct GetVotesResponse {
pub votes: u128,
}
{
"votes": "650000000000000"
}
votes
u128
The amount of votes received
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
}
}
account
Addr
The address of the queried user
block_number
u64
The given block height
GetPastVotesResponse
#[cw_serde]
pub struct GetPastVotesResponse {
pub votes: u128,
}
{
"votes": "650000000000000"
}
votes
u128
The amount of votes received
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
}
}
block_number
u64
The given block height
GetPastTotalSupplyResponse
#[cw_serde]
pub struct GetPastTotalSupplyResponse {
pub total_supply: u128,
}
{
"total_supply": "650000000000000"
}
total_supply
u128
The total number of tokens participating in the vote at the given height
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..."
}
}
address
String
The user's address
BalanceResponse
#[cw_serde]
pub struct BalanceResponse {
pub balance: Uint128,
}
{
"balance": "100000000000000000000000000"
}
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"
}
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"
}
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.
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
}
}
start_after*
String
The address to start after, used for pagination
limit*
u32
The number of accounts to limit the query to
* = 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..."
}
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.
#[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..."
}
mime_type
String
The mime type of the image
data
Binary
The raw bytes of the image
Last updated