diff --git a/contracts/airdrop/Cargo.toml b/contracts/airdrop/Cargo.toml index fa92c9048..e2a72726c 100644 --- a/contracts/airdrop/Cargo.toml +++ b/contracts/airdrop/Cargo.toml @@ -25,10 +25,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -38,4 +38,4 @@ mockall = "0.10.2" mockall_double = "0.2.0" [dev-dependencies] -flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.0"} \ No newline at end of file +flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.1"} diff --git a/contracts/airdrop/src/handle.rs b/contracts/airdrop/src/handle.rs index a03208615..6b1b822bf 100644 --- a/contracts/airdrop/src/handle.rs +++ b/contracts/airdrop/src/handle.rs @@ -235,6 +235,7 @@ pub fn try_create_account( redeem_amount, None, None, + None, 0, config.airdrop_snip20.code_hash, config.airdrop_snip20.address, @@ -323,6 +324,7 @@ pub fn try_update_account( redeem_amount, None, None, + None, 0, config.airdrop_snip20.code_hash, config.airdrop_snip20.address, @@ -426,6 +428,7 @@ pub fn try_claim( redeem_amount, None, None, + None, 0, config.airdrop_snip20.code_hash, config.airdrop_snip20.address, @@ -462,6 +465,7 @@ pub fn try_claim_decay( send_total, None, None, + None, 1, config.airdrop_snip20.code_hash, config.airdrop_snip20.address, diff --git a/contracts/airdrop/src/test.rs b/contracts/airdrop/src/test.rs index 5c3cda3cd..b1a44d35b 100644 --- a/contracts/airdrop/src/test.rs +++ b/contracts/airdrop/src/test.rs @@ -1,10 +1,8 @@ #[cfg(test)] pub mod tests { - use crate::{contract::init, handle::inverse_normalizer}; + use crate::handle::inverse_normalizer; use cosmwasm_std::{ - testing::{mock_dependencies, mock_env}, Binary, - CanonicalAddr, HumanAddr, Uint128, }; @@ -15,10 +13,7 @@ pub mod tests { use shade_protocol::{ airdrop::{ account::{AddressProofMsg, AddressProofPermit}, - claim_info::RequiredTask, - InitMsg, }, - asset::Contract, math::{div, mult}, }; @@ -59,7 +54,7 @@ pub mod tests { let permit_addr = permit.validate().expect("Signature validation failed"); assert_eq!( permit_addr.as_canonical(), - bech32_to_canonical(permit.params.address.clone().as_str()) + bech32_to_canonical(permit.params.address.as_str()) ); assert_ne!( permit_addr.as_canonical(), @@ -94,7 +89,7 @@ pub mod tests { let permit_addr = permit.validate().expect("Signature validation failed"); assert_eq!( permit_addr.as_canonical(), - bech32_to_canonical(permit.params.address.clone().as_str()) + bech32_to_canonical(permit.params.address.as_str()) ); assert_ne!( permit_addr.as_canonical(), @@ -129,7 +124,7 @@ pub mod tests { let permit_addr = permit.validate().expect("Signature validation failed"); assert_eq!( permit_addr.as_canonical(), - bech32_to_canonical(permit.params.address.clone().as_str()) + bech32_to_canonical(permit.params.address.as_str()) ); assert_ne!( permit_addr.as_canonical(), diff --git a/contracts/governance/Cargo.toml b/contracts/governance/Cargo.toml index b4fcf6fcd..fabc0d6c9 100644 --- a/contracts/governance/Cargo.toml +++ b/contracts/governance/Cargo.toml @@ -23,11 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -# TODO: Update when secret-toolkit accepts the branch -secret-toolkit = { git = "https://github.com/FloppyDisck/secret-toolkit", branch = "snip20-batch-transactions"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/governance/src/handle.rs b/contracts/governance/src/handle.rs index 05462b8e9..47b3f79c1 100644 --- a/contracts/governance/src/handle.rs +++ b/contracts/governance/src/handle.rs @@ -46,7 +46,7 @@ use cosmwasm_std::{ Uint128, WasmMsg, }; -use secret_toolkit::snip20::{batch_send_msg, send_msg, SendAction}; +use secret_toolkit::snip20::{batch_send_msg, send_msg, batch::SendAction}; use shade_protocol::{ asset::Contract, generic_response::{ @@ -213,6 +213,7 @@ pub fn try_fund_proposal( if let Some(mut amounts) = amounts { amounts.push(SendAction { recipient: sender.clone(), + recipient_code_hash: None, amount: adjusted_amount, msg: None, memo: None, diff --git a/contracts/initializer/Cargo.toml b/contracts/initializer/Cargo.toml index e14fa5e67..1fbda855d 100644 --- a/contracts/initializer/Cargo.toml +++ b/contracts/initializer/Cargo.toml @@ -23,10 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/micro_mint/Cargo.toml b/contracts/micro_mint/Cargo.toml index 3f7a1560f..2c8d43c3d 100644 --- a/contracts/micro_mint/Cargo.toml +++ b/contracts/micro_mint/Cargo.toml @@ -26,10 +26,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/micro_mint/src/handle.rs b/contracts/micro_mint/src/handle.rs index 01e473115..bfc57476d 100644 --- a/contracts/micro_mint/src/handle.rs +++ b/contracts/micro_mint/src/handle.rs @@ -137,6 +137,7 @@ pub fn try_burn( capture_amount, None, None, + None, 1, burn_asset.asset.contract.code_hash.clone(), burn_asset.asset.contract.address.clone(), @@ -152,6 +153,7 @@ pub fn try_burn( messages.push(burn_msg( burn_amount, None, + None, 256, burn_asset.asset.contract.code_hash.clone(), burn_asset.asset.contract.address.clone(), @@ -162,6 +164,7 @@ pub fn try_burn( burn_amount, None, None, + None, 1, burn_asset.asset.contract.code_hash.clone(), burn_asset.asset.contract.address.clone(), @@ -173,6 +176,7 @@ pub fn try_burn( burn_amount, None, None, + None, 1, burn_asset.asset.contract.code_hash.clone(), burn_asset.asset.contract.address.clone(), @@ -235,6 +239,7 @@ pub fn try_burn( from, amount_to_mint, None, + None, 256, mint_asset.contract.code_hash.clone(), mint_asset.contract.address, diff --git a/contracts/mint/Cargo.toml b/contracts/mint/Cargo.toml index 0d79653bf..1c84b2afb 100644 --- a/contracts/mint/Cargo.toml +++ b/contracts/mint/Cargo.toml @@ -23,10 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/mint/src/contract.rs b/contracts/mint/src/contract.rs index 1d5b4be9f..0639ea32c 100644 --- a/contracts/mint/src/contract.rs +++ b/contracts/mint/src/contract.rs @@ -311,6 +311,7 @@ pub fn try_burn( messages.push(burn_msg( amount, None, + None, 256, burning_asset.contract.code_hash, burning_asset.contract.address, @@ -330,6 +331,7 @@ pub fn try_burn( from, amount_to_mint, None, + None, 256, minting_asset.contract.code_hash, minting_asset.contract.address, diff --git a/contracts/mock_band/Cargo.toml b/contracts/mock_band/Cargo.toml index 9e3799086..de88a8eac 100644 --- a/contracts/mock_band/Cargo.toml +++ b/contracts/mock_band/Cargo.toml @@ -24,10 +24,10 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/oracle/Cargo.toml b/contracts/oracle/Cargo.toml index c7b394455..bf7a5e818 100644 --- a/contracts/oracle/Cargo.toml +++ b/contracts/oracle/Cargo.toml @@ -27,10 +27,10 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/oracle/src/query.rs b/contracts/oracle/src/query.rs index 83b4498a0..0cea79cca 100644 --- a/contracts/oracle/src/query.rs +++ b/contracts/oracle/src/query.rs @@ -66,7 +66,7 @@ pub fn prices( let result_index = symbols .iter() .enumerate() - .find(|&s| s.1.to_string() == sym.to_string()) + .find(|&s| *s.1 == *sym) .unwrap() .0; results[result_index] = data.rate; diff --git a/contracts/scrt_staking/Cargo.toml b/contracts/scrt_staking/Cargo.toml index 3b1c9a90c..2d63199c7 100644 --- a/contracts/scrt_staking/Cargo.toml +++ b/contracts/scrt_staking/Cargo.toml @@ -23,11 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = ["staking"] } - -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std", features = ["staking"] } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index f72a87084..65707cc80 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -23,10 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/staking/src/handle.rs b/contracts/staking/src/handle.rs index 2b879bf54..2820736a3 100644 --- a/contracts/staking/src/handle.rs +++ b/contracts/staking/src/handle.rs @@ -298,6 +298,7 @@ pub fn try_claim_unbond( total, None, None, + None, 1, config.staked_token.code_hash.clone(), config.staked_token.address.clone(), @@ -342,6 +343,7 @@ pub fn try_claim_rewards( rewards, None, None, + None, 1, config.staked_token.code_hash.clone(), config.staked_token.address.clone(), diff --git a/contracts/treasury/Cargo.toml b/contracts/treasury/Cargo.toml index fb105c5e3..aaceef244 100644 --- a/contracts/treasury/Cargo.toml +++ b/contracts/treasury/Cargo.toml @@ -23,10 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/network_integration/Cargo.toml b/packages/network_integration/Cargo.toml index 5c0e56065..1fea3764d 100644 --- a/packages/network_integration/Cargo.toml +++ b/packages/network_integration/Cargo.toml @@ -23,7 +23,7 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] } serde_json = { version = "1.0.67"} getrandom = { version = "0.2", features = ["js"] } # Prevents wasm from freaking out when running make rand = { version = "0.8.4"} -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } rs_merkle = { git = "https://github.com/FloppyDisck/rs-merkle", branch = "node_export" } -flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.0"} +flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.1"} diff --git a/packages/shade_protocol/Cargo.toml b/packages/shade_protocol/Cargo.toml index e687336e0..a22c994d8 100644 --- a/packages/shade_protocol/Cargo.toml +++ b/packages/shade_protocol/Cargo.toml @@ -18,17 +18,17 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/enigmampc/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +cosmwasm-schema = "0.10.1" +secret-toolkit = { version = "0.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } snafu = { version = "0.6.3" } # Needed for airdrop rs_merkle = { git = "https://github.com/FloppyDisck/rs-merkle", branch = "node_export" } # Needed for transactions -flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.0"} +flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.1"} remain = "0.2.2" [dev-dependencies]