Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Sylvia 1.3.0 #8

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
Loading