Skip to content

Commit

Permalink
fix(renaming): format import
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed May 14, 2024
1 parent 5fc33dc commit 08f7b01
Show file tree
Hide file tree
Showing 27 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-cognitarium/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-cognitarium/src/querier/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/querier/mapper.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/querier/variable.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/rdf/mapper.rs
Original file line number Diff line number Diff line change
@@ -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<String, String>)> for Subject {
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/storer/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions contracts/axone-dataverse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions contracts/axone-dataverse/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-dataverse/src/credential/crypto.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-dataverse/src/credential/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-dataverse/src/credential/vc.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-dataverse/src/error.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-dataverse/src/registrar/rdf.rs
Original file line number Diff line number Diff line change
@@ -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<'_>] = &[
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-dataverse/src/registrar/registry.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions contracts/axone-law-stone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ 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
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
Expand Down
22 changes: 11 additions & 11 deletions contracts/axone-law-stone/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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::{
to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdResult, SubMsg,
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};
Expand Down Expand Up @@ -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)";

Expand Down Expand Up @@ -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,
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-law-stone/src/error.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-law-stone/src/helper.rs
Original file line number Diff line number Diff line change
@@ -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<CosmwasmUri> {
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-law-stone/src/msg.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-law-stone/src/state.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
2 changes: 1 addition & 1 deletion packages/axone-cognitarium-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/axone-cognitarium-client/src/client.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion packages/axone-logic-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/axone-objectarium-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/axone-objectarium-client/src/object.rs
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Loading

0 comments on commit 08f7b01

Please sign in to comment.