Skip to content

Commit

Permalink
Update to Sylvia 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jawoznia committed Nov 21, 2024
1 parent c416c0c commit c76460f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ library = []
crate-type = ["cdylib", "rlib"]

[dependencies]
sylvia = "1.2.1"
serde = "1.0.208"
schemars = "0.8.21"
cosmwasm-schema = "2.1.3"
cosmwasm-std = "2.1.3"
sylvia = "1.3.0"
cw-storage-plus = "2.0.0"

[dev-dependencies]
sylvia = { version = "1.2.1", features = ["mt"] }
sylvia = { version = "1.3.0", features = ["mt"] }
4 changes: 2 additions & 2 deletions src/bin/schema.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cosmwasm_schema::write_api;

use {{crate_name}}::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg};
use sylvia::cw_schema::write_api;
use sylvia::cw_std::Empty;

fn main() {
write_api! {
crate_name: sylvia::cw_schema,
instantiate: InstantiateMsg,
execute: ContractExecMsg<Empty, Empty>,
query: ContractQueryMsg<Empty, Empty>,
Expand Down
10 changes: 5 additions & 5 deletions src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use cosmwasm_schema::cw_serde;
use cw_storage_plus::Item;
use sylvia::contract;
use sylvia::ctx::{ExecCtx, InstantiateCtx, QueryCtx};
use sylvia::cw_schema::cw_serde;
#[cfg(not(feature = "library"))]
use sylvia::cw_std::Empty;
use sylvia::cw_std::{Response, StdResult};

use sylvia::contract;
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, InstantiateCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

pub struct CounterContract<E, Q> {
pub count: Item<u64>,
Expand Down Expand Up @@ -49,7 +49,7 @@ where
}
}

#[cw_serde]
#[cw_serde(crate = "sylvia")]
pub struct CountResponse {
pub count: u64,
}
Expand Down

0 comments on commit c76460f

Please sign in to comment.