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

upgrade cw-std for dlmalloc issue #26

Merged
merged 4 commits into from
Jul 2, 2024
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
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
40 changes: 20 additions & 20 deletions contracts/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion contracts/account/src/auth/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions contracts/account/src/contract.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -69,9 +69,9 @@ pub fn execute(
#[entry_point]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
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)?)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/account/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn authenticator_ids(store: &dyn Storage) -> StdResult<Vec<u8>> {
pub fn authenticator_by_id(store: &dyn Storage, id: u8) -> StdResult<String> {
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(),
Expand Down
6 changes: 3 additions & 3 deletions contracts/treasury/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -43,11 +43,11 @@ pub fn execute(
#[entry_point]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
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)?)
}
}
}
Loading