diff --git a/contracts/axone-cognitarium/Cargo.toml b/contracts/axone-cognitarium/Cargo.toml index 5b0e9e2a..ec9b1bdb 100644 --- a/contracts/axone-cognitarium/Cargo.toml +++ b/contracts/axone-cognitarium/Cargo.toml @@ -17,6 +17,7 @@ exclude = [ crate-type = ["cdylib", "rlib"] [dependencies] +axone-rdf.workspace = true blake3 = "1.5.1" cosmwasm-schema.workspace = true cosmwasm-std.workspace = true @@ -25,7 +26,6 @@ cw-storage-plus.workspace = true cw2.workspace = true derive_builder = "0.20.0" either = "1.10.0" -axone-rdf.workspace = true rio_api.workspace = true rio_turtle.workspace = true rio_xml.workspace = true diff --git a/contracts/axone-cognitarium/src/contract.rs b/contracts/axone-cognitarium/src/contract.rs index 2e1e20a4..21caec98 100644 --- a/contracts/axone-cognitarium/src/contract.rs +++ b/contracts/axone-cognitarium/src/contract.rs @@ -57,8 +57,8 @@ pub mod execute { use crate::rdf::PrefixMap; use crate::state::{HasCachedNamespaces, Triple}; use crate::storer::StoreEngine; - use either::{Left, Right}; use axone_rdf::serde::TripleReader; + use either::{Left, Right}; use std::io::BufReader; pub fn verify_owner(deps: &DepsMut<'_>, info: &MessageInfo) -> Result<(), ContractError> { @@ -339,9 +339,9 @@ pub mod util { use crate::querier::{PlanBuilder, QueryEngine, SelectResults}; use crate::rdf::{Atom, PrefixMap}; use crate::state::{HasCachedNamespaces, Namespace, NamespaceResolver}; - use cosmwasm_std::Storage; use axone_rdf::normalize::IdentifierIssuer; use axone_rdf::serde::TripleWriter; + use cosmwasm_std::Storage; use std::collections::BTreeMap; pub fn map_select_solutions( diff --git a/contracts/axone-cognitarium/src/querier/engine.rs b/contracts/axone-cognitarium/src/querier/engine.rs index ff62e3f3..fd98d45a 100644 --- a/contracts/axone-cognitarium/src/querier/engine.rs +++ b/contracts/axone-cognitarium/src/querier/engine.rs @@ -7,9 +7,9 @@ use crate::querier::variable::{ResolvedVariable, ResolvedVariables}; use crate::rdf::Atom; use crate::state::{triples, Namespace, NamespaceResolver, Object, Predicate, Subject, Triple}; use crate::{rdf, state}; +use axone_rdf::normalize::IdentifierIssuer; use cosmwasm_std::{Order, StdError, StdResult, Storage}; use either::{Either, Left, Right}; -use axone_rdf::normalize::IdentifierIssuer; use std::collections::{BTreeMap, HashMap, VecDeque}; use std::iter; use std::rc::Rc; @@ -1001,9 +1001,9 @@ mod test { Node, Store, StoreStat, BLANK_NODE_IDENTIFIER_COUNTER, NAMESPACE_KEY_INCREMENT, STORE, }; use crate::storer::StoreEngine; + use axone_rdf::serde::TripleReader; use cosmwasm_std::testing::mock_dependencies; use cosmwasm_std::{Addr, Uint128}; - use axone_rdf::serde::TripleReader; use std::env; use std::fs::File; use std::io::{BufReader, Read}; diff --git a/contracts/axone-cognitarium/src/querier/mapper.rs b/contracts/axone-cognitarium/src/querier/mapper.rs index ed9f26d6..ac353dbc 100644 --- a/contracts/axone-cognitarium/src/querier/mapper.rs +++ b/contracts/axone-cognitarium/src/querier/mapper.rs @@ -1,8 +1,8 @@ use crate::msg::{Literal, IRI}; use crate::state; use crate::state::{NamespaceResolver, Object}; -use cosmwasm_std::{StdResult, Storage}; use axone_rdf::uri::{expand_uri, explode_iri}; +use cosmwasm_std::{StdResult, Storage}; use std::collections::HashMap; pub fn literal_as_object( diff --git a/contracts/axone-cognitarium/src/querier/variable.rs b/contracts/axone-cognitarium/src/querier/variable.rs index 28819070..af90d28c 100644 --- a/contracts/axone-cognitarium/src/querier/variable.rs +++ b/contracts/axone-cognitarium/src/querier/variable.rs @@ -1,7 +1,7 @@ use crate::msg::{Value, IRI}; use crate::state::{Literal, Object, Predicate, Subject}; -use cosmwasm_std::StdResult; use axone_rdf::normalize::IdentifierIssuer; +use cosmwasm_std::StdResult; #[derive(Eq, PartialEq, Debug, Clone)] pub enum ResolvedVariable { diff --git a/contracts/axone-cognitarium/src/rdf/mapper.rs b/contracts/axone-cognitarium/src/rdf/mapper.rs index 4a3b2364..678c14a2 100644 --- a/contracts/axone-cognitarium/src/rdf/mapper.rs +++ b/contracts/axone-cognitarium/src/rdf/mapper.rs @@ -1,7 +1,7 @@ use crate::msg; use crate::rdf::{Property, Subject, Value}; -use cosmwasm_std::StdError; use axone_rdf::uri::expand_uri; +use cosmwasm_std::StdError; use std::collections::HashMap; impl TryFrom<(msg::Node, &HashMap)> for Subject { diff --git a/contracts/axone-cognitarium/src/storer/engine.rs b/contracts/axone-cognitarium/src/storer/engine.rs index b8590f04..105989b6 100644 --- a/contracts/axone-cognitarium/src/storer/engine.rs +++ b/contracts/axone-cognitarium/src/storer/engine.rs @@ -4,10 +4,10 @@ use crate::state::{ BLANK_NODE_IDENTIFIER_COUNTER, BLANK_NODE_SIZE, STORE, }; use crate::ContractError; -use cosmwasm_std::{StdError, StdResult, Storage, Uint128}; use axone_rdf::normalize::IdentifierIssuer; use axone_rdf::serde::TripleReader; use axone_rdf::uri::explode_iri; +use cosmwasm_std::{StdError, StdResult, Storage, Uint128}; use rio_api::model; use rio_api::model::Term; use std::io::BufRead; diff --git a/contracts/axone-dataverse/Cargo.toml b/contracts/axone-dataverse/Cargo.toml index 26f40ef0..5fa651ba 100644 --- a/contracts/axone-dataverse/Cargo.toml +++ b/contracts/axone-dataverse/Cargo.toml @@ -17,6 +17,9 @@ exclude = [ crate-type = ["cdylib", "rlib"] [dependencies] +axone-cognitarium-client.workspace = true +axone-cognitarium.workspace = true +axone-rdf.workspace = true base64 = "0.22.0" bs58 = "0.5.1" cosmwasm-schema.workspace = true @@ -27,9 +30,6 @@ cw-utils.workspace = true cw2.workspace = true itertools = "0.12.1" multibase = "0.9.1" -axone-cognitarium-client.workspace = true -axone-cognitarium.workspace = true -axone-rdf.workspace = true rio_api.workspace = true rio_turtle.workspace = true schemars.workspace = true diff --git a/contracts/axone-dataverse/src/contract.rs b/contracts/axone-dataverse/src/contract.rs index 7ce1eb7b..87954afb 100644 --- a/contracts/axone-dataverse/src/contract.rs +++ b/contracts/axone-dataverse/src/contract.rs @@ -137,16 +137,16 @@ mod tests { use super::*; use crate::msg::{DataverseResponse, RdfFormat, TripleStoreConfig, TripleStoreLimitsInput}; use crate::testutil::testutil::read_test_data; - use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; - use cosmwasm_std::{ - from_json, Addr, Attribute, ContractResult, CosmosMsg, HexBinary, SubMsg, SystemError, - SystemResult, Uint128, Uint64, WasmQuery, - }; use axone_cognitarium::msg::{ DataFormat, Head, Node, Results, SelectItem, SelectQuery, SelectResponse, SimpleWhereCondition, TriplePattern, Value, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral, WhereCondition, IRI, }; + use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; + use cosmwasm_std::{ + from_json, Addr, Attribute, ContractResult, CosmosMsg, HexBinary, SubMsg, SystemError, + SystemResult, Uint128, Uint64, WasmQuery, + }; use std::collections::BTreeMap; #[test] diff --git a/contracts/axone-dataverse/src/credential/crypto.rs b/contracts/axone-dataverse/src/credential/crypto.rs index 29371a13..8dde39a4 100644 --- a/contracts/axone-dataverse/src/credential/crypto.rs +++ b/contracts/axone-dataverse/src/credential/crypto.rs @@ -1,9 +1,9 @@ use crate::credential::error::VerificationError; use crate::credential::proof::ProofMaterial; +use axone_rdf::normalize::Normalizer; use base64::prelude::BASE64_URL_SAFE_NO_PAD; use base64::Engine; use cosmwasm_std::DepsMut; -use axone_rdf::normalize::Normalizer; use rio_api::model::Quad; use sha2::Digest; diff --git a/contracts/axone-dataverse/src/credential/proof.rs b/contracts/axone-dataverse/src/credential/proof.rs index 759d1750..a8df34e9 100644 --- a/contracts/axone-dataverse/src/credential/proof.rs +++ b/contracts/axone-dataverse/src/credential/proof.rs @@ -5,8 +5,8 @@ use crate::credential::rdf_marker::{ PROOF_RDF_PROOF_VALUE_TYPE, PROOF_RDF_VERIFICATION_METHOD, RDF_CREATED, RDF_DATE_TYPE, RDF_TYPE, }; -use itertools::Itertools; use axone_rdf::dataset::{Dataset, QuadIterator}; +use itertools::Itertools; use rio_api::model::{GraphName, Literal, NamedNode, Quad, Term}; #[derive(Debug, PartialEq)] diff --git a/contracts/axone-dataverse/src/credential/vc.rs b/contracts/axone-dataverse/src/credential/vc.rs index f8be1ce4..ab10f92a 100644 --- a/contracts/axone-dataverse/src/credential/vc.rs +++ b/contracts/axone-dataverse/src/credential/vc.rs @@ -1,10 +1,10 @@ use crate::credential::error::{InvalidCredentialError, InvalidProofError, VerificationError}; use crate::credential::proof::{Proof, ProofPurpose}; use crate::credential::rdf_marker::*; -use cosmwasm_std::DepsMut; -use itertools::Itertools; use axone_rdf::dataset::QuadIterator; use axone_rdf::dataset::{Dataset, QuadPattern}; +use cosmwasm_std::DepsMut; +use itertools::Itertools; use rio_api::model::{BlankNode, Literal, NamedNode, Subject, Term}; #[derive(Debug, PartialEq)] diff --git a/contracts/axone-dataverse/src/error.rs b/contracts/axone-dataverse/src/error.rs index 963f12ea..f08effe0 100644 --- a/contracts/axone-dataverse/src/error.rs +++ b/contracts/axone-dataverse/src/error.rs @@ -1,6 +1,6 @@ use crate::credential::error::{InvalidCredentialError, VerificationError}; -use cosmwasm_std::{Instantiate2AddressError, StdError}; use axone_rdf::serde::NQuadsReadError; +use cosmwasm_std::{Instantiate2AddressError, StdError}; use thiserror::Error; #[derive(Error, Debug)] diff --git a/contracts/axone-dataverse/src/registrar/rdf.rs b/contracts/axone-dataverse/src/registrar/rdf.rs index 2b17a9a9..c3cdfbd7 100644 --- a/contracts/axone-dataverse/src/registrar/rdf.rs +++ b/contracts/axone-dataverse/src/registrar/rdf.rs @@ -1,10 +1,10 @@ use crate::credential::rdf_marker::RDF_DATE_TYPE; use crate::registrar::credential::DataverseCredential; use crate::ContractError; -use cosmwasm_std::{Binary, StdError}; use axone_rdf::dataset::QuadIterator; use axone_rdf::normalize::IdentifierIssuer; use axone_rdf::serde::{DataFormat, TripleWriter}; +use cosmwasm_std::{Binary, StdError}; use rio_api::model::{BlankNode, Literal, NamedNode, Subject, Term, Triple}; pub const VC_RESERVED_PREDICATES: &[NamedNode<'_>] = &[ @@ -240,8 +240,8 @@ mod test { use super::*; use crate::credential::vc::VerifiableCredential; use crate::testutil::testutil; - use cosmwasm_std::Addr; use axone_rdf::dataset::Dataset; + use cosmwasm_std::Addr; #[test] fn proper_serialization() { diff --git a/contracts/axone-dataverse/src/registrar/registry.rs b/contracts/axone-dataverse/src/registrar/registry.rs index 46f29409..ad500bd4 100644 --- a/contracts/axone-dataverse/src/registrar/registry.rs +++ b/contracts/axone-dataverse/src/registrar/registry.rs @@ -1,12 +1,12 @@ use crate::registrar::credential::DataverseCredential; use crate::state::DATAVERSE; use crate::ContractError; -use cosmwasm_std::{DepsMut, StdResult, Storage, WasmMsg}; use axone_cognitarium::msg::{ DataFormat, Node, SelectItem, SelectQuery, SimpleWhereCondition, TriplePattern, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral, WhereCondition, IRI, }; use axone_cognitarium_client::CognitariumClient; +use cosmwasm_std::{DepsMut, StdResult, Storage, WasmMsg}; /// ClaimRegistrar is the entity responsible to manage claims (i.e. submission and revocation) into /// the Dataverse, ensuring that any pre-condition criteria to an action is met, and any attached diff --git a/contracts/axone-law-stone/Cargo.toml b/contracts/axone-law-stone/Cargo.toml index 0b118e67..2f1f5f27 100644 --- a/contracts/axone-law-stone/Cargo.toml +++ b/contracts/axone-law-stone/Cargo.toml @@ -17,6 +17,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [dependencies] +axone-logic-bindings.workspace = true +axone-objectarium-client.workspace = true +axone-objectarium.workspace = true +axone-wasm.workspace = true cosmwasm-schema.workspace = true cosmwasm-std.workspace = true cosmwasm-storage.workspace = true @@ -24,10 +28,6 @@ cw-storage-plus.workspace = true cw-utils.workspace = true cw2.workspace = true itertools = "0.12.1" -axone-logic-bindings.workspace = true -axone-objectarium-client.workspace = true -axone-objectarium.workspace = true -axone-wasm.workspace = true schemars.workspace = true serde.workspace = true thiserror.workspace = true diff --git a/contracts/axone-law-stone/src/contract.rs b/contracts/axone-law-stone/src/contract.rs index 0d64de17..cc0083f2 100644 --- a/contracts/axone-law-stone/src/contract.rs +++ b/contracts/axone-law-stone/src/contract.rs @@ -1,3 +1,7 @@ +use axone_logic_bindings::LogicCustomQuery; +use axone_objectarium::msg::{ + ExecuteMsg as StorageMsg, ObjectPinsResponse, QueryMsg as StorageQuery, +}; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ @@ -5,10 +9,6 @@ use cosmwasm_std::{ WasmMsg, }; use cw2::set_contract_version; -use axone_logic_bindings::LogicCustomQuery; -use axone_objectarium::msg::{ - ExecuteMsg as StorageMsg, ObjectPinsResponse, QueryMsg as StorageQuery, -}; use crate::error::ContractError; use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; @@ -132,8 +132,8 @@ pub mod query { use crate::helper::object_ref_to_uri; use crate::msg::ProgramResponse; use crate::state::PROGRAM; - use cosmwasm_std::QueryRequest; use axone_logic_bindings::{Answer, AskResponse}; + use cosmwasm_std::QueryRequest; const ERR_STONE_BROKEN: &str = "system_error(broken_law_stone)"; @@ -276,6 +276,12 @@ mod tests { use super::*; use crate::msg::ProgramResponse; use crate::state::{LawStone, DEPENDENCIES, PROGRAM}; + use axone_logic_bindings::testing::mock::mock_dependencies_with_logic_handler; + use axone_logic_bindings::{ + Answer, AskResponse, LogicCustomQuery, Result as LogicResult, Substitution, + }; + use axone_objectarium::msg::PageInfo; + use axone_wasm::uri::CosmwasmUri; use cosmwasm_std::testing::{ mock_dependencies, mock_env, mock_info, MockApi, MockQuerier, MockQuerierCustomHandlerResult, MockStorage, @@ -285,12 +291,6 @@ mod tests { OwnedDeps, SubMsgResponse, SubMsgResult, SystemError, SystemResult, WasmQuery, }; use cw_utils::ParseReplyError::SubMsgFailure; - use axone_logic_bindings::testing::mock::mock_dependencies_with_logic_handler; - use axone_logic_bindings::{ - Answer, AskResponse, LogicCustomQuery, Result as LogicResult, Substitution, - }; - use axone_objectarium::msg::PageInfo; - use axone_wasm::uri::CosmwasmUri; use std::collections::VecDeque; use std::marker::PhantomData; diff --git a/contracts/axone-law-stone/src/error.rs b/contracts/axone-law-stone/src/error.rs index 5b899ab2..0245d446 100644 --- a/contracts/axone-law-stone/src/error.rs +++ b/contracts/axone-law-stone/src/error.rs @@ -1,7 +1,7 @@ -use cosmwasm_std::StdError; -use cw_utils::ParseReplyError; use axone_logic_bindings::error::TermParseError; use axone_wasm::error::CosmwasmUriError; +use cosmwasm_std::StdError; +use cw_utils::ParseReplyError; use thiserror::Error; #[derive(Error, Debug, PartialEq)] diff --git a/contracts/axone-law-stone/src/helper.rs b/contracts/axone-law-stone/src/helper.rs index d91ba797..097aeeb4 100644 --- a/contracts/axone-law-stone/src/helper.rs +++ b/contracts/axone-law-stone/src/helper.rs @@ -1,11 +1,11 @@ use crate::error::LogicAskResponseError; use crate::ContractError; -use cosmwasm_std::{Event, StdError, StdResult}; -use itertools::Itertools; use axone_logic_bindings::{AskResponse, TermValue}; use axone_objectarium_client::ObjectRef; use axone_wasm::error::CosmwasmUriError; use axone_wasm::uri::CosmwasmUri; +use cosmwasm_std::{Event, StdError, StdResult}; +use itertools::Itertools; use std::any::type_name; pub fn object_ref_to_uri(object: ObjectRef) -> StdResult { diff --git a/contracts/axone-law-stone/src/msg.rs b/contracts/axone-law-stone/src/msg.rs index 11a8c8f3..c61f1f20 100644 --- a/contracts/axone-law-stone/src/msg.rs +++ b/contracts/axone-law-stone/src/msg.rs @@ -1,7 +1,7 @@ -use cosmwasm_schema::{cw_serde, QueryResponses}; -use cosmwasm_std::Binary; #[allow(unused_imports)] use axone_logic_bindings::AskResponse; +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::Binary; /// Instantiate message #[cw_serde] diff --git a/contracts/axone-law-stone/src/state.rs b/contracts/axone-law-stone/src/state.rs index f08cd79d..6779ffb2 100644 --- a/contracts/axone-law-stone/src/state.rs +++ b/contracts/axone-law-stone/src/state.rs @@ -1,8 +1,8 @@ use serde::{Deserialize, Serialize}; use crate::msg::ProgramResponse; -use cw_storage_plus::{Item, Map}; use axone_objectarium_client::ObjectRef; +use cw_storage_plus::{Item, Map}; /// State to store context during contract instantiation pub const INSTANTIATE_CONTEXT: Item<'_, String> = Item::new("instantiate"); diff --git a/packages/axone-cognitarium-client/Cargo.toml b/packages/axone-cognitarium-client/Cargo.toml index 4e8ef2ed..519f8cd4 100644 --- a/packages/axone-cognitarium-client/Cargo.toml +++ b/packages/axone-cognitarium-client/Cargo.toml @@ -5,6 +5,6 @@ name = "axone-cognitarium-client" version = "5.0.0" [dependencies] -cosmwasm-std.workspace = true axone-cognitarium.workspace = true +cosmwasm-std.workspace = true serde.workspace = true diff --git a/packages/axone-cognitarium-client/src/client.rs b/packages/axone-cognitarium-client/src/client.rs index e1f71ccc..bcbf6cda 100644 --- a/packages/axone-cognitarium-client/src/client.rs +++ b/packages/axone-cognitarium-client/src/client.rs @@ -1,8 +1,8 @@ +use axone_cognitarium::msg::{DataFormat, ExecuteMsg, QueryMsg, SelectQuery, SelectResponse}; use cosmwasm_std::{ to_json_binary, Addr, Binary, Coin, CustomQuery, QuerierWrapper, QueryRequest, StdResult, WasmMsg, WasmQuery, }; -use axone_cognitarium::msg::{DataFormat, ExecuteMsg, QueryMsg, SelectQuery, SelectResponse}; use serde::de::DeserializeOwned; use serde::Serialize; diff --git a/packages/axone-logic-bindings/Cargo.toml b/packages/axone-logic-bindings/Cargo.toml index 625da85f..0d5d1e5d 100644 --- a/packages/axone-logic-bindings/Cargo.toml +++ b/packages/axone-logic-bindings/Cargo.toml @@ -5,9 +5,9 @@ name = "axone-logic-bindings" version = "5.0.0" [dependencies] +axone-wasm.workspace = true cosmwasm-std.workspace = true form_urlencoded = "1.2.1" -axone-wasm.workspace = true schemars.workspace = true serde.workspace = true serde-json-wasm.workspace = true diff --git a/packages/axone-objectarium-client/Cargo.toml b/packages/axone-objectarium-client/Cargo.toml index 6074090d..73a7788d 100644 --- a/packages/axone-objectarium-client/Cargo.toml +++ b/packages/axone-objectarium-client/Cargo.toml @@ -5,8 +5,8 @@ name = "axone-objectarium-client" version = "5.0.0" [dependencies] -cosmwasm-std.workspace = true axone-objectarium.workspace = true axone-wasm.workspace = true +cosmwasm-std.workspace = true schemars.workspace = true serde.workspace = true diff --git a/packages/axone-objectarium-client/src/object.rs b/packages/axone-objectarium-client/src/object.rs index 16681cfa..342a90c0 100644 --- a/packages/axone-objectarium-client/src/object.rs +++ b/packages/axone-objectarium-client/src/object.rs @@ -1,8 +1,8 @@ -use cosmwasm_std::{to_json_binary, Coin, StdResult, WasmMsg}; use axone_objectarium::msg::QueryMsg::ObjectData; use axone_objectarium::msg::{ExecuteMsg, QueryMsg}; use axone_wasm::error::CosmwasmUriError; use axone_wasm::uri::CosmwasmUri; +use cosmwasm_std::{to_json_binary, Coin, StdResult, WasmMsg}; use serde::{Deserialize, Serialize}; const CONTRACT_NAME: &str = "axone-objectarium"; diff --git a/templates/axone-smart-contract/{{ contract_name }}/Cargo.ffizer.hbs.toml b/templates/axone-smart-contract/{{ contract_name }}/Cargo.ffizer.hbs.toml index 51cf3ca3..54bf1416 100644 --- a/templates/axone-smart-contract/{{ contract_name }}/Cargo.ffizer.hbs.toml +++ b/templates/axone-smart-contract/{{ contract_name }}/Cargo.ffizer.hbs.toml @@ -28,15 +28,15 @@ panic = 'abort' rpath = false [dependencies] +axone-logic-bindings.workspace = true +axone-objectarium-client.workspace = true +axone-objectarium.workspace = true cosmwasm-schema.workspace = true cosmwasm-std.workspace = true cosmwasm-storage.workspace = true cw-storage-plus.workspace = true cw-utils.workspace = true cw2.workspace = true -axone-logic-bindings.workspace = true -axone-objectarium-client.workspace = true -axone-objectarium.workspace = true schemars.workspace = true serde.workspace = true thiserror.workspace = true