diff --git a/contracts/snip20_derivative/src/contract.rs b/contracts/snip20_derivative/src/contract.rs index 67a9bd94..43b1cfb7 100644 --- a/contracts/snip20_derivative/src/contract.rs +++ b/contracts/snip20_derivative/src/contract.rs @@ -39,7 +39,7 @@ use secret_toolkit::{ utils::{pad_handle_result, pad_query_result}, }; -use secret_toolkit_crypto::{sha_256, Prng}; +use secret_toolkit_crypto::{sha_256, ContractPrng}; use serde::de::DeserializeOwned; use shade_protocol::query_auth::QueryPermit; @@ -1172,13 +1172,15 @@ fn query_rewards( fn query_rewards(_: QuerierWrapper, _: &Addr, _: &Config) -> StdResult { use crate::staking_interface::RewardToken; - Ok(Rewards { rewards: vec![Reward{ - token: RewardToken { - address: Addr::unchecked("shade_contract_info_address"), - code_hash: String::from("shade_contract_info_code_hash"), - }, - amount: Uint128::from(100000000_u128) - }] }) + Ok(Rewards { + rewards: vec![Reward { + token: RewardToken { + address: Addr::unchecked("shade_contract_info_address"), + code_hash: String::from("shade_contract_info_code_hash"), + }, + amount: Uint128::from(100000000_u128), + }], + }) } #[cfg(test)] @@ -1477,7 +1479,7 @@ pub fn new_viewing_key( rng_entropy.extend_from_slice(sender.as_bytes()); rng_entropy.extend_from_slice(entropy); - let mut rng = Prng::new(seed, &rng_entropy); + let mut rng = ContractPrng::new(seed, &rng_entropy); let rand_slice = rng.rand_bytes(); diff --git a/packages/shade_protocol/Cargo.toml b/packages/shade_protocol/Cargo.toml index 57d957a0..d1a29e11 100644 --- a/packages/shade_protocol/Cargo.toml +++ b/packages/shade_protocol/Cargo.toml @@ -130,7 +130,7 @@ schemars = "0.8.16" serde = { version = "1.0.193", default-features = false, features = ["derive", "alloc"] } thiserror = "1.0.50" -secret-storage-plus = { git = "https://github.com/securesecrets/secret-plus-utils", version = "0.13.4", optional = true } +secret-storage-plus = { git = "https://github.com/securesecrets/secret-plus-utils", tag = "v0.1.1", optional = true, features = [] } # Testing anyhow = { version = "1", optional = true } diff --git a/packages/shade_protocol/src/utils/callback.rs b/packages/shade_protocol/src/utils/callback.rs index 9192bc2a..6c0ebba6 100644 --- a/packages/shade_protocol/src/utils/callback.rs +++ b/packages/shade_protocol/src/utils/callback.rs @@ -7,17 +7,8 @@ use crate::multi_test::{App, AppResponse, Contract as MultiContract, Executor}; use crate::AnyResult; use crate::{ c_std::{ - to_binary, - Addr, - Coin, - ContractInfo, - CosmosMsg, - Empty, - QuerierWrapper, - QueryRequest, - StdResult, - WasmMsg, - WasmQuery, + to_binary, Addr, Coin, ContractInfo, CosmosMsg, Empty, QuerierWrapper, QueryRequest, + StdResult, WasmMsg, WasmQuery, }, serde::{de::DeserializeOwned, Serialize}, Contract,