Skip to content

Commit

Permalink
feat(dataverse): add triple store config to instantiate msg
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Nov 16, 2023
1 parent 9e1b882 commit 0a129c5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cw-utils = "1.0.2"
cw2 = "1.1.1"
okp4-logic-bindings = { path = "packages/okp4-logic-bindings" }
okp4-objectarium = { path = "contracts/okp4-objectarium" }
okp4-cognitarium = { path = "contracts/okp4-cognitarium" }
okp4-objectarium-client = { path = "packages/okp4-objectarium-client" }
schemars = "0.8.16"
serde = { version = "1.0.192", default-features = false, features = ["derive"] }
Expand Down
4 changes: 1 addition & 3 deletions contracts/okp4-dataverse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ cw-storage-plus.workspace = true
cw-utils.workspace = true
cw2.workspace = true
itertools = "0.12.0"
okp4-logic-bindings.workspace = true
okp4-objectarium-client.workspace = true
okp4-objectarium.workspace = true
okp4-cognitarium.workspace = true
schemars.workspace = true
serde.workspace = true
thiserror.workspace = true
Expand Down
18 changes: 17 additions & 1 deletion contracts/okp4-dataverse/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::Binary;
use cosmwasm_std::{Binary, Uint64};

/// `InstantiateMsg` is used to initialize a new instance of the dataverse.
#[cw_serde]
pub struct InstantiateMsg {
/// A unique name to identify the dataverse instance.
pub name: String,

/// The configuration used to instantiate the triple store.
pub triplestore_config: TripleStoreConfig,
}

/// `ExecuteMsg` defines the set of possible actions that can be performed on the dataverse.
Expand Down Expand Up @@ -120,6 +123,19 @@ pub enum ExecuteMsg {
},
}

/// # TripleStoreConfig
/// `TripleStoreConfig` represents the configuration related to the management of the triple store.
#[cw_serde]
pub struct TripleStoreConfig {
/// The code id that will be used to instantiate the triple store contract in which
/// to store dataverse semantic data. It must implement the cognitarium interface.
pub code_id: Uint64,

/// Limitations regarding triple store usage.
#[serde(default = "okp4_cognitarium::msg::StoreLimitsInput::default")]
pub limits: okp4_cognitarium::msg::StoreLimitsInput,
}

/// # RdfFormat
/// `RdfFormat` represents the various serialization formats for RDF (Resource Description Framework) data.
#[cw_serde]
Expand Down

0 comments on commit 0a129c5

Please sign in to comment.