Cluster Factory
note
The Cluster Factory contract is responsible for distributing NEB token rewards.
InstantiateMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct InstantiateMsg { pub token_code_id: u64, // code ID to create new cluster token pub cluster_code_id: u64, // code ID to create new clusters pub base_denom: String, // TerraUSD pub protocol_fee_rate: String, // has to FPDecimal pub distribution_schedule: Vec<(u64, u64, Uint128)>, // [[start_time, end_time, distribution_amount], [], ...]}| Key | Type | Description |
|---|---|---|
| token_code_id | u64 | (address) owner of the contract |
| cluster_code_id | u64 | (address) Nebula factory contract |
| base_denom | String | cluster name / title |
| protocol_fee_rate | String | short explanation of cluster strategy |
| distribution_schedule | Vec\<(u64, u64, Uint128)> | NEB token inflation rewards distribution schedule |
ExecuteMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg { /////////////////// /// Owner Operations /////////////////// PostInitialize { // called after initialize to C&E prob owner: String, terraswap_factory: String, nebula_token: String, staking_contract: String, commission_collector: String, }, UpdateConfig { owner: Option<String>, token_code_id: Option<u64>, cluster_code_id: Option<u64>, distribution_schedule: Option<Vec<(u64, u64, Uint128)>>, }, UpdateRewardWeight { asset_token: String, weight: u32, }, CreateCluster { /// used to create all necessary contract or register asset params: Params, }, DecommissionCluster { cluster_contract: String, cluster_token: String, }, PassCommand { contract_addr: String, msg: Binary, }, DistributeReward {},}PostInitialize#
| Key | Type | Description |
|---|---|---|
| owner | String | (address) owner of the contract |
| terraswap_factory | String | (address) Nebula factory contract |
| nebula_token | String | cluster name / title |
| staking_contract | String | cluster name / title |
| commission_collector | String | short explanation of cluster strategy |
UpdateConfig#
| Key | Type | Description |
|---|---|---|
| token_code_id | u64 | (address) owner of the contract |
| cluster_code_id | u64 | (address) Nebula factory contract |
| base_denom | String | cluster name / title |
| protocol_fee_rate | String | short explanation of cluster strategy |
| distribution_schedule | Vec\<(u64, u64, Uint128)> | NEB token inflation rewards distribution schedule |
UpdateRewardWeight#
| Key | Type | Description |
|---|---|---|
| asset_token | String | (address) owner of the contract |
| weight | u32 | (address) Nebula factory contract |
CreateCluster#
| Key | Type | Description |
|---|---|---|
| params | Params | cluster creation parameters |
DecommissionCluster#
| Key | Type | Description |
|---|---|---|
| cluster_contract | String | (address) cluster contract |
| cluster_token | u32 | (address) cluster token contract |
PassCommand#
| Key | Type | Description |
|---|---|---|
| contract_addr | String | (address) contract to call |
| msg | Binary | message to execute on contract_addr |
DistributeReward#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
QueryMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg { Config {}, ClusterExists { contract_addr: String }, ClusterList {}, DistributionInfo {},}Config#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
ClusterExists#
Request#
| Key | Type | Description |
|---|---|---|
| contract_addr | String | (address) contract to check if cluster |
Response#
ClusterList#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
DistributionInfo#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||