Cluster
Implements the core logic of an individual Clusters.
InstantiateMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct InstantiateMsg { /// Cluster's permissioned owner pub owner: String,
/// Factory address pub factory: String,
/// Cluster name (title) pub name: String,
/// Cluster description (title) pub description: String,
/// Cluster token CW20 address pub cluster_token: Option<String>,
/// Pricing oracle address pub pricing_oracle: String,
/// Target composition oracle address pub target_oracle: String,
/// Asset addresses and target weights pub target: Vec<Asset>,
/// Penalty function address pub penalty: String,}| Key | Type | Description |
|---|---|---|
| owner | String | (address) owner of the contract |
| factory | String | (address) Nebula factory contract |
| name | String | cluster name / title |
| description | String | short explanation of cluster strategy |
| cluster_token | Option\<String> | (address) cluster token contract |
| pricing_oracle | String | (address) pricing oracle contract |
| target_oracle | String | (address) target oracle contract |
| target | Vec\<Asset> | cluster target asset allocation |
| penalty | String | (address) penalty function contract |
ExecuteMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg { /// OWNER-CALLABLE UpdateConfig { owner: Option<String>, name: Option<String>, description: Option<String>, cluster_token: Option<String>, pricing_oracle: Option<String>, composition_oracle: Option<String>, target: Option<Vec<Asset>>, // recomp oracle penalty: Option<String>, }, /// Called by recomposition oracle UpdateTarget { target: Vec<Asset> },
/// Called by factory only and sets active to false Decommission {},
/// USER-CALLABLE RebalanceCreate { /// Asset amounts deposited for minting (cluster must be granted allowance or /// sent native assets within the MsgExecuteContract) asset_amounts: Vec<Asset>, /// Minimum tokens to receive min_tokens: Option<Uint128>, }, /// Burns assets RebalanceRedeem { /// optional proposed set of weights to use max_tokens: Uint128, asset_amounts: Option<Vec<Asset>>, },}UpdateConfig#
| Key | Type | Description |
|---|---|---|
| owner | Option\<String> | (address) owner of the contract |
| name | Option\<String> | cluster name / title |
| description | Option<String> | short explanation of cluster strategy |
| cluster_token | Option\<String> | (address) cluster token contract |
| pricing_oracle | Option\<String> | (address) pricing oracle contract |
| target_oracle | Option\<String> | (address) target oracle contract |
| target | Option\<Vec\<Asset>> | cluster target asset allocation |
| penalty | Option\<String> | (address) penalty function contract |
UpdateTarget#
| Key | Type | Description |
|---|---|---|
| target | Option\<String> | (address) owner of the contract |
Decommission#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
RebalanceCreate#
| Key | Type | Description |
|---|---|---|
| asset_amounts | Vec\<Asset> | asset amounts to spend in CREATE operation |
| min_tokens | Option\<Uint128> | minimum amount of cluster tokens to receive |
RebalanceRedeem#
| Key | Type | Description |
|---|---|---|
| max_tokens | Uint128 | maximum cluster tokens to spend in REDEEM operation |
| asset_amounts | Option\<Vec\<Asset>> | asset amounts to withdraw in REDEEM operation |
QueryMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg { Config {}, Target {}, ClusterState {}, ClusterInfo {},}Config#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
Target#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
ClusterState#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
ClusterInfo#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||