Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
if: steps.changed-rust-cargo.outputs.any_changed == 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
if: steps.changed-rust-files.outputs.any_changed == 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand All @@ -158,7 +158,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
if: steps.changed-toml-files.outputs.any_changed == 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -304,7 +304,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75
toolchain: 1.81
default: true
override: true

Expand Down
2 changes: 2 additions & 0 deletions .sort-derives.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude = []
preserve = false
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://axone.xyz/"
keywords = ["cosmwasm", "blockchain"]
license = "BSD-3-Clause"
repository = "https://github.com/axone-protocol/contracts"
rust-version = "1.75"
rust-version = "1.81"
version = "7.0.0"

[profile.release]
Expand Down
15 changes: 8 additions & 7 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
[tasks.format-rust]
args = ["fmt"]
command = "cargo"
dependencies = ["install-rustfmt"]
dependencies = ["install-rustfmt", "install-cargo-sort-derives"]
description = "Format rust sources files."
script = ["cargo fmt", "cargo sort-derives"]

[tasks.lint-rust-format]
args = ["fmt", "--all", "--", "--check"]
command = "cargo"
dependencies = ["install-rustfmt"]
description = "Check format of sources files."
dependencies = ["install-rustfmt", "install-cargo-sort-derives"]
description = "Check formatting and derives order of rust source files."
script = ["cargo fmt --all -- --check", "cargo sort-derives --check"]

[tasks.lint-rust]
args = ["cranky"]
Expand Down Expand Up @@ -652,6 +650,9 @@ install_crate = { crate_name = "cargo-hack", min_version = "0.6.14" }
[tasks.install-cargo-machete]
install_crate = { crate_name = "cargo-machete", min_version = "0.7.0" }

[tasks.install-cargo-sort-derives]
install_crate = { crate_name = "cargo-sort-derives", min_version = "0.10.0" }

[tasks.publish-crates]
args = [
"workspaces",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ The project is structured around a set of Rust workspaces, each defining a Smart

Be sure you have the following tools installed:

- [Rust](https://www.rust-lang.org/tools/install) v1.75 or higher
- [Rust](https://www.rust-lang.org/tools/install) v1.81 or higher
- [cargo-make](https://github.com/sagiegurari/cargo-make) v0.36.3 or higher
- [Docker](https://docs.docker.com/get-docker/)
- [jq](https://stedolan.github.io/jq/download/) v1.6 or higher
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.75.0"
msrv = "1.81.0"
6 changes: 3 additions & 3 deletions contracts/axone-cognitarium/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rio_turtle::TurtleError;
use rio_xml::RdfXmlError;
use thiserror::Error;

#[derive(Error, Debug, PartialEq)]
#[derive(Debug, Error, PartialEq)]
pub enum ContractError {
#[error("{0}")]
Std(#[from] StdError),
Expand Down Expand Up @@ -37,7 +37,7 @@ impl From<TurtleError> for ContractError {
}
}

#[derive(Error, Debug, PartialEq, Eq)]
#[derive(Debug, Eq, Error, PartialEq)]
pub enum StoreError {
#[error("Maximum triples number exceeded: {0}")]
TripleCount(Uint128),
Expand All @@ -55,7 +55,7 @@ pub enum StoreError {
InsertDataTripleCount(Uint128),
}

#[derive(Error, Debug, PartialEq, Eq)]
#[derive(Debug, Eq, Error, PartialEq)]
pub enum RDFParseError {
#[error("Error parsing XML RDF: {0}")]
Xml(String),
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
/// # StoreLimits
/// Contains limitations regarding store usages.
#[cw_serde]
#[derive(Default, Builder)]
#[derive(Builder, Default)]

Check warning on line 264 in contracts/axone-cognitarium/src/msg.rs

View check run for this annotation

Codecov / codecov/patch

contracts/axone-cognitarium/src/msg.rs#L264

Added line #L264 was not covered by tests
#[builder(default, setter(into, strip_option))]
pub struct StoreLimits {
/// The maximum number of triples the store can contain.
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-cognitarium/src/querier/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cosmwasm_std::{StdError, StdResult};
use std::cmp::Ordering;
use std::collections::HashMap;

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Expression {
Constant(Term),
Variable(usize),
Expand Down Expand Up @@ -97,7 +97,7 @@ impl HasBoundVariables for Expression {
}
}

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Term {
String(String),
Boolean(bool),
Expand Down
8 changes: 4 additions & 4 deletions contracts/axone-cognitarium/src/querier/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::querier::variable::HasBoundVariables;
use crate::state::{Object, Predicate, Subject};

/// Represents a querying plan.
#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct QueryPlan {
/// References the ending node of the plan, when evaluated others nodes will be invoked in
/// cascade.
Expand All @@ -14,7 +14,7 @@ pub struct QueryPlan {
pub variables: Vec<PlanVariable>,
}

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PlanVariable {
Basic(String),
BlankNode(String),
Expand Down Expand Up @@ -45,7 +45,7 @@ impl QueryPlan {

/// Represents a single part of the query plan processing. Each node is intended to provide a
/// specific behavior given an evaluation context.
#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum QueryNode {
/// Match the triple pattern against the state. The triple elements can be either a variable or
/// a constant value, in the case of a variable it'll be either provided by the context of
Expand Down Expand Up @@ -123,7 +123,7 @@ impl HasBoundVariables for QueryNode {
}
}

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PatternValue<V> {
Constant(V),
Variable(usize),
Expand Down
4 changes: 2 additions & 2 deletions contracts/axone-cognitarium/src/querier/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axone_rdf::normalize::IdentifierIssuer;
use cosmwasm_std::StdResult;
use std::collections::BTreeSet;

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ResolvedVariable {
Subject(Subject),
Predicate(Predicate),
Expand Down Expand Up @@ -124,7 +124,7 @@ impl ResolvedVariable {
}
}

#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ResolvedVariables {
variables: Vec<Option<ResolvedVariable>>,
}
Expand Down
8 changes: 4 additions & 4 deletions contracts/axone-cognitarium/src/rdf/atom.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rio_api::model::{Literal, NamedNode, Triple};
use std::fmt;

#[derive(Eq, PartialEq, Debug, Clone, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub enum Subject {
NamedNode(String),
BlankNode(String),
Expand All @@ -15,7 +15,7 @@ impl fmt::Display for Subject {
}
}

#[derive(Eq, PartialEq, Debug, Clone, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Property(pub String);

impl fmt::Display for Property {
Expand All @@ -24,7 +24,7 @@ impl fmt::Display for Property {
}
}

#[derive(Eq, PartialEq, Debug, Clone, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub enum Value {
NamedNode(String),
BlankNode(String),
Expand All @@ -43,7 +43,7 @@ impl fmt::Display for Value {
}
}

#[derive(Eq, PartialEq, Debug, Clone, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Atom {
pub subject: Subject,
pub property: Property,
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-cognitarium/src/state/namespaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::rc::Rc;
/// there is no need to implement a garbage collector mechanism in case some namespaces are removed.
pub const NAMESPACE_KEY_INCREMENT: Item<u128> = Item::new("namespace_key");

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct Namespace {
/// The namespace value.
pub value: String,
Expand Down
6 changes: 3 additions & 3 deletions contracts/axone-cognitarium/src/state/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};

pub const STORE: Item<Store> = Item::new("store");

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct Store {
pub owner: Addr,
pub limits: StoreLimits,
Expand All @@ -33,7 +33,7 @@ impl From<Store> for StoreResponse {
}
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct StoreLimits {
pub max_triple_count: Uint128,
pub max_byte_size: Uint128,
Expand Down Expand Up @@ -72,7 +72,7 @@ impl From<StoreLimits> for msg::StoreLimits {
}
}

#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub struct StoreStat {
pub triple_count: Uint128,
pub namespace_count: Uint128,
Expand Down
Loading
Loading