diff --git a/Cargo.toml b/Cargo.toml index 076572e..ee86fdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,11 @@ overflow-checks = true # Disable integer overflow checks. [workspace.dependencies] -cosmwasm-schema = "=1.4.1" -cosmwasm-std = { version = "=1.4.1", features = ["stargate"] } -cw2 = "1.1.1" -cw-storage-plus = "1.1.0" -cw-utils = "1.0.2" +cosmwasm-schema = "=1.5.5" +cosmwasm-std = { version = "=1.5.5", features = ["stargate"] } +cw2 = "1.1.2" +cw-storage-plus = "1.2.0" +cw-utils = "1.0.3" hex = "0.4" sha2 = { version = "0.10.8", features = ["oid"]} thiserror = "1" diff --git a/README.md b/README.md index c4e1df3..75e0ac4 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,5 @@ docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/optimizer:0.15.1 + cosmwasm/optimizer:0.16.0 ``` \ No newline at end of file diff --git a/contracts/account/Cargo.toml b/contracts/account/Cargo.toml index 4f934f2..21b73bb 100644 --- a/contracts/account/Cargo.toml +++ b/contracts/account/Cargo.toml @@ -8,24 +8,24 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -absacc = { git = "https://github.com/larry0x/abstract-account.git" } -cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true } -cw2 = { workspace = true } -cw-storage-plus = { workspace = true } -sha2 = { workspace = true } -thiserror = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -tiny-keccak = { workspace = true } -schemars = { workspace = true } -hex = { workspace = true } -ripemd = { workspace = true } -bech32 = { workspace = true } -base64 = { workspace = true } -phf = { workspace = true } -rsa = { workspace = true } -getrandom = { workspace = true } -p256 = { workspace = true } -prost = { workspace = true } +absacc = { git = "https://github.com/larry0x/abstract-account.git" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw2 = { workspace = true } +cw-storage-plus = { workspace = true } +sha2 = { workspace = true } +thiserror = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +tiny-keccak = { workspace = true } +schemars = { workspace = true } +hex = { workspace = true } +ripemd = { workspace = true } +bech32 = { workspace = true } +base64 = { workspace = true } +phf = { workspace = true } +rsa = { workspace = true } +getrandom = { workspace = true } +p256 = { workspace = true } +prost = { workspace = true } osmosis-std-derive = { workspace = true } diff --git a/contracts/account/src/auth/jwt.rs b/contracts/account/src/auth/jwt.rs index 8500f9b..a881176 100644 --- a/contracts/account/src/auth/jwt.rs +++ b/contracts/account/src/auth/jwt.rs @@ -55,7 +55,7 @@ pub fn verify( components.next().ok_or(InvalidToken)?; // ignore the header, it is not currently used let payload_bytes = components.next().ok_or(InvalidToken)?; let payload = URL_SAFE_NO_PAD.decode(payload_bytes)?; - let claims: Claims = cosmwasm_std::from_slice(payload.as_slice())?; + let claims: Claims = cosmwasm_std::from_json(payload.as_slice())?; // make sure the provided hash matches the one from the tx if tx_hash.eq(&claims.transaction_hash) { diff --git a/contracts/account/src/contract.rs b/contracts/account/src/contract.rs index 23d4e68..f570932 100644 --- a/contracts/account/src/contract.rs +++ b/contracts/account/src/contract.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - entry_point, to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, + entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, }; use absacc::AccountSudoMsg; @@ -69,9 +69,9 @@ pub fn execute( #[entry_point] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::AuthenticatorIDs {} => to_binary(&query::authenticator_ids(deps.storage)?), + QueryMsg::AuthenticatorIDs {} => to_json_binary(&query::authenticator_ids(deps.storage)?), QueryMsg::AuthenticatorByID { id } => { - to_binary(&query::authenticator_by_id(deps.storage, id)?) + to_json_binary(&query::authenticator_by_id(deps.storage, id)?) } } } diff --git a/contracts/account/src/query.rs b/contracts/account/src/query.rs index 95ce0de..7c1c3fc 100644 --- a/contracts/account/src/query.rs +++ b/contracts/account/src/query.rs @@ -12,7 +12,7 @@ pub fn authenticator_ids(store: &dyn Storage) -> StdResult> { pub fn authenticator_by_id(store: &dyn Storage, id: u8) -> StdResult { let auth = AUTHENTICATORS.load(store, id)?; - match cosmwasm_std::to_binary(&auth) { + match cosmwasm_std::to_json_binary(&auth) { Ok(auth_bz) => Ok(auth_bz.to_string()), Err(error) => Err(StdError::GenericErr { msg: error.to_string(), diff --git a/contracts/treasury/src/contract.rs b/contracts/treasury/src/contract.rs index 10b7090..82007a7 100644 --- a/contracts/treasury/src/contract.rs +++ b/contracts/treasury/src/contract.rs @@ -2,7 +2,7 @@ use crate::error::ContractResult; use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; use crate::{execute, query, CONTRACT_NAME, CONTRACT_VERSION}; use cosmwasm_std::{ - entry_point, to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, + entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, }; #[entry_point] @@ -43,11 +43,11 @@ pub fn execute( #[entry_point] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::GrantConfigByTypeUrl { msg_type_url } => to_binary( + QueryMsg::GrantConfigByTypeUrl { msg_type_url } => to_json_binary( &query::grant_config_by_type_url(deps.storage, msg_type_url)?, ), QueryMsg::GrantConfigTypeUrls {} => { - to_binary(&query::grant_config_type_urls(deps.storage)?) + to_json_binary(&query::grant_config_type_urls(deps.storage)?) } } }