From de83ad3a0054eef9c0f70f14cf0ad3dc8d0f2b8f Mon Sep 17 00:00:00 2001 From: DrPresident Date: Mon, 17 Jan 2022 10:42:35 -0600 Subject: [PATCH 1/5] fixed --- contracts/oracle/src/query.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From cd5e74d7ca855d5fa056a171d0e63179488d6fbd Mon Sep 17 00:00:00 2001 From: DrPresident Date: Mon, 17 Jan 2022 13:51:55 -0600 Subject: [PATCH 2/5] enigmampc -> scrtlabs --- contracts/airdrop/Cargo.toml | 10 +++++----- contracts/governance/Cargo.toml | 9 ++++----- contracts/initializer/Cargo.toml | 8 ++++---- contracts/micro_mint/Cargo.toml | 8 ++++---- contracts/mint/Cargo.toml | 8 ++++---- contracts/mock_band/Cargo.toml | 8 ++++---- contracts/oracle/Cargo.toml | 8 ++++---- contracts/scrt_staking/Cargo.toml | 8 ++++---- contracts/staking/Cargo.toml | 8 ++++---- contracts/treasury/Cargo.toml | 8 ++++---- 10 files changed, 41 insertions(+), 42 deletions(-) diff --git a/contracts/airdrop/Cargo.toml b/contracts/airdrop/Cargo.toml index fa92c9048..3c325a305 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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.0"} diff --git a/contracts/governance/Cargo.toml b/contracts/governance/Cargo.toml index b4fcf6fcd..dd778e95d 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print" } 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/initializer/Cargo.toml b/contracts/initializer/Cargo.toml index e14fa5e67..8f3040610 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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..9c5c24132 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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/Cargo.toml b/contracts/mint/Cargo.toml index 0d79653bf..32164ac91 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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/mock_band/Cargo.toml b/contracts/mock_band/Cargo.toml index 9e3799086..12434da97 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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..a6aff694b 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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/scrt_staking/Cargo.toml b/contracts/scrt_staking/Cargo.toml index 3b1c9a90c..09c9b5855 100644 --- a/contracts/scrt_staking/Cargo.toml +++ b/contracts/scrt_staking/Cargo.toml @@ -23,11 +23,11 @@ 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/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-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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..d42a3bd07 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} 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/treasury/Cargo.toml b/contracts/treasury/Cargo.toml index fb105c5e3..543020cab 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-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } +secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } From 55dcac59e6be0c6bea985cfef4ce809f4b400ff6 Mon Sep 17 00:00:00 2001 From: DrPresident Date: Mon, 17 Jan 2022 13:57:52 -0600 Subject: [PATCH 3/5] switched dependencies for secret stuff --- contracts/airdrop/Cargo.toml | 8 ++++---- contracts/governance/Cargo.toml | 8 ++++---- contracts/initializer/Cargo.toml | 8 ++++---- contracts/micro_mint/Cargo.toml | 8 ++++---- contracts/mint/Cargo.toml | 8 ++++---- contracts/mock_band/Cargo.toml | 8 ++++---- contracts/oracle/Cargo.toml | 8 ++++---- contracts/scrt_staking/Cargo.toml | 9 ++++----- contracts/staking/Cargo.toml | 8 ++++---- contracts/treasury/Cargo.toml | 8 ++++---- 10 files changed, 40 insertions(+), 41 deletions(-) diff --git a/contracts/airdrop/Cargo.toml b/contracts/airdrop/Cargo.toml index 3c325a305..a88f697a3 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/Cargo.toml b/contracts/governance/Cargo.toml index dd778e95d..1e5632037 100644 --- a/contracts/governance/Cargo.toml +++ b/contracts/governance/Cargo.toml @@ -23,10 +23,10 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print" } +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/initializer/Cargo.toml b/contracts/initializer/Cargo.toml index 8f3040610..e7ab07ccf 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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 9c5c24132..78762ecb4 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/Cargo.toml b/contracts/mint/Cargo.toml index 32164ac91..52f9ff817 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/mock_band/Cargo.toml b/contracts/mock_band/Cargo.toml index 12434da97..36cc2b8ec 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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 a6aff694b..069de0563 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/scrt_staking/Cargo.toml b/contracts/scrt_staking/Cargo.toml index 09c9b5855..109371d59 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print", features = ["staking"] } - -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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 d42a3bd07..5ba47e2a1 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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/treasury/Cargo.toml b/contracts/treasury/Cargo.toml index 543020cab..89ba3db80 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/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-std = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -cosmwasm-storage = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } -secret-toolkit = { git = "https://github.com/scrtlabs/secret-toolkit", branch = "debug-print"} +cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } +cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } +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"] } From fb5ff9c90a5d215ec4707d8ba20330454dca8938 Mon Sep 17 00:00:00 2001 From: DrPresident Date: Mon, 17 Jan 2022 14:03:31 -0600 Subject: [PATCH 4/5] reverted cosmwasm-schema --- contracts/airdrop/Cargo.toml | 2 +- contracts/governance/Cargo.toml | 2 +- contracts/initializer/Cargo.toml | 2 +- contracts/micro_mint/Cargo.toml | 2 +- contracts/mint/Cargo.toml | 2 +- contracts/mock_band/Cargo.toml | 2 +- contracts/oracle/Cargo.toml | 2 +- contracts/scrt_staking/Cargo.toml | 2 +- contracts/staking/Cargo.toml | 2 +- contracts/treasury/Cargo.toml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contracts/airdrop/Cargo.toml b/contracts/airdrop/Cargo.toml index a88f697a3..a24ba3986 100644 --- a/contracts/airdrop/Cargo.toml +++ b/contracts/airdrop/Cargo.toml @@ -26,7 +26,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/governance/Cargo.toml b/contracts/governance/Cargo.toml index 1e5632037..7712e9486 100644 --- a/contracts/governance/Cargo.toml +++ b/contracts/governance/Cargo.toml @@ -24,7 +24,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/initializer/Cargo.toml b/contracts/initializer/Cargo.toml index e7ab07ccf..987aa4bcf 100644 --- a/contracts/initializer/Cargo.toml +++ b/contracts/initializer/Cargo.toml @@ -24,7 +24,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/micro_mint/Cargo.toml b/contracts/micro_mint/Cargo.toml index 78762ecb4..5ea3f86ce 100644 --- a/contracts/micro_mint/Cargo.toml +++ b/contracts/micro_mint/Cargo.toml @@ -27,7 +27,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/mint/Cargo.toml b/contracts/mint/Cargo.toml index 52f9ff817..6daad67d6 100644 --- a/contracts/mint/Cargo.toml +++ b/contracts/mint/Cargo.toml @@ -24,7 +24,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/mock_band/Cargo.toml b/contracts/mock_band/Cargo.toml index 36cc2b8ec..b12dc6ea4 100644 --- a/contracts/mock_band/Cargo.toml +++ b/contracts/mock_band/Cargo.toml @@ -25,7 +25,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/oracle/Cargo.toml b/contracts/oracle/Cargo.toml index 069de0563..15dd8f01b 100644 --- a/contracts/oracle/Cargo.toml +++ b/contracts/oracle/Cargo.toml @@ -28,7 +28,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/scrt_staking/Cargo.toml b/contracts/scrt_staking/Cargo.toml index 109371d59..a9ec9197d 100644 --- a/contracts/scrt_staking/Cargo.toml +++ b/contracts/scrt_staking/Cargo.toml @@ -24,7 +24,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index 5ba47e2a1..84a6babd6 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -24,7 +24,7 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } diff --git a/contracts/treasury/Cargo.toml b/contracts/treasury/Cargo.toml index 89ba3db80..572553d64 100644 --- a/contracts/treasury/Cargo.toml +++ b/contracts/treasury/Cargo.toml @@ -23,8 +23,8 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] +cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { version = "0.10", package = "secret-cosmwasm-schema" } cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } secret-toolkit = { version = "0.2" } shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol" } From 1dd88cdaaf15771ea5df8d76c14dc889205feea2 Mon Sep 17 00:00:00 2001 From: Jack Swenson Date: Mon, 17 Jan 2022 16:23:22 -0600 Subject: [PATCH 5/5] Update dependencies (#166) * added padding * updated tests * fixed privacy leak * updated documentation * updated dependencies * fixed dep update conflicts Co-authored-by: Guy Garcia Co-authored-by: Guy S Garcia <34169809+FloppyDisck@users.noreply.github.com> Co-authored-by: Guy --- contracts/airdrop/Cargo.toml | 4 +- contracts/airdrop/README.md | 50 ++++++++++++++++--- contracts/airdrop/src/contract.rs | 25 ++++++---- contracts/airdrop/src/handle.rs | 4 ++ contracts/airdrop/src/query.rs | 1 - contracts/airdrop/src/test.rs | 13 ++--- contracts/governance/Cargo.toml | 2 +- contracts/governance/src/handle.rs | 3 +- contracts/initializer/Cargo.toml | 2 +- contracts/micro_mint/Cargo.toml | 2 +- contracts/micro_mint/src/handle.rs | 5 ++ contracts/mint/Cargo.toml | 2 +- contracts/mint/src/contract.rs | 2 + contracts/mock_band/Cargo.toml | 2 +- contracts/oracle/Cargo.toml | 2 +- contracts/scrt_staking/Cargo.toml | 4 +- contracts/staking/Cargo.toml | 2 +- contracts/staking/src/handle.rs | 2 + contracts/treasury/Cargo.toml | 2 +- packages/network_integration/Cargo.toml | 4 +- .../tests/testnet_integration.rs | 9 +++- packages/shade_protocol/Cargo.toml | 10 ++-- packages/shade_protocol/src/airdrop/mod.rs | 15 ++++-- 23 files changed, 117 insertions(+), 50 deletions(-) diff --git a/contracts/airdrop/Cargo.toml b/contracts/airdrop/Cargo.toml index a24ba3986..e2a72726c 100644 --- a/contracts/airdrop/Cargo.toml +++ b/contracts/airdrop/Cargo.toml @@ -26,8 +26,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" @@ -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"} +flexible-permits = {git = "https://github.com/securesecrets/flexible-permits", tag = "v1.0.1"} diff --git a/contracts/airdrop/README.md b/contracts/airdrop/README.md index a6e0ad301..619b0784c 100644 --- a/contracts/airdrop/README.md +++ b/contracts/airdrop/README.md @@ -15,11 +15,13 @@ * Messages * [CreateAccount](#CreateAccount) * [UpdateAccount](#UpdateAccount) + * [DisablePermitKey](#DisablePermitKey) * [Claim](#Claim) * Queries - * [GetConfig](#GetConfig) - * [GetDates](#GetDates) - * [GetAccount](#GetAccount) + * [Config](#Config) + * [Dates](#Dates) + * [TotalClaimed](#TotalClaimed) + * [Account](#Account) # Introduction Contract responsible to handle snip20 airdrop @@ -42,6 +44,7 @@ Contract responsible to handle snip20 airdrop |max_amount | String | Used to limit the user permit amounts (lowers exploit possibility) | no| |default_claim | String | The default amount to be gifted regardless of tasks | no | |task_claim | RequiredTasks | The amounts per tasks to gift | no | +|query_rounding | string | To prevent leaking information, total claimed is rounded off to this value | no ##Admin @@ -57,13 +60,15 @@ Updates the given values |start_date | u64 | When the airdrop starts in UNIX time | yes | |end_date | u64 | When the airdrop ends in UNIX time | yes | |decay_start | u64 | When the airdrop decay starts in UNIX time | yes | +|padding | string | Allows for enforcing constant length messages | yes | #### AddTasks Adds more tasks to complete ##### Request |Name |Type |Description | optional | |------|-------|---------------------------|----------| -|Tasks | Tasks | The new tasks to be added | no | +|tasks | Tasks | The new tasks to be added | no | +|padding | string | Allows for enforcing constant length messages | yes | ##### Response ```json @@ -96,6 +101,7 @@ Complete that address' tasks for a given user |Name |Type |Description | optional | |--------|--------|-------------------------------------|----------| |address | String | The address that completed the task | no | +|padding | string | Allows for enforcing constant length messages | yes | ##### Response ```json @@ -117,6 +123,7 @@ Creates an account from which the user will claim all of his given addresses' re |-----------|----------------------------------|------------------------------------------|----------| | addresses | Array of [AddressProofPermit](#AddressProofPermit) | Proof that the user owns those addresses | no | | partial_tree | Array of string | An array of nodes that serve as a proof for the addresses | no | +|padding | string | Allows for enforcing constant length messages | yes | ##### Response ```json @@ -134,6 +141,7 @@ Updates a users accounts with more addresses |-----------|-----------------------------|------------------------------------------|----------| | addresses | Array of [AddressProofPermit](#AddressProofPermit) | Proof that the user owns those addresses | no | | partial_tree | Array of string | An array of nodes that serve as a proof for the addresses | no | +|padding | string | Allows for enforcing constant length messages | yes | ##### Response ```json @@ -144,6 +152,23 @@ Updates a users accounts with more addresses } ``` +### DisablePermitKey +Disables that permit's key. Any permit that has that key for that address will be declined. +##### Request +| Name | Type | Description | optional | +|-----------|-----------------------------|------------------------------------------|----------| +| key | string | Permit key | no | +|padding | string | Allows for enforcing constant length messages | yes | + +##### Response +```json +{ + "disable_permit_key": { + "status": "success" + } +} +``` + #### Claim Claim the user's available claimable amount @@ -169,7 +194,7 @@ Gets the contract's config } ``` -## GetDates +## Dates Get the contracts airdrop timeframe, can calculate the decay factor if a time is given ##### Request |Name |Type |Description | optional | @@ -186,7 +211,18 @@ Get the contracts airdrop timeframe, can calculate the decay factor if a time is } ``` -## GetAccount +## TotalClaimed +Shows the total amount of the token that has been claimed. If airdrop hasn't ended then it'll just show an estimation. +##### Request +```json +{ + "total_claimed": { + "claimed": "Claimed amount" + } +} +``` + +## Account Get the account's information ##### Request |Name |Type |Description | optional | @@ -195,7 +231,7 @@ Get the account's information |current_date | u64 | Current time in UNIT format | yes | ```json { - "eligibility": { + "account": { "total": "Total airdrop amount", "claimed": "Claimed amount", "unclaimed": "Amount available to claim", diff --git a/contracts/airdrop/src/contract.rs b/contracts/airdrop/src/contract.rs index aa0c87672..78f2fb1f2 100644 --- a/contracts/airdrop/src/contract.rs +++ b/contracts/airdrop/src/contract.rs @@ -27,6 +27,10 @@ use cosmwasm_std::{ Uint128, }; use shade_protocol::airdrop::{claim_info::RequiredTask, Config, HandleMsg, InitMsg, QueryMsg}; +use secret_toolkit::utils::{pad_handle_result, pad_query_result}; + +// Used to pad up responses for better privacy. +pub const RESPONSE_BLOCK_SIZE: usize = 256; pub fn init( deps: &mut Extern, @@ -119,7 +123,7 @@ pub fn handle( env: Env, msg: HandleMsg, ) -> StdResult { - match msg { + pad_handle_result(match msg { HandleMsg::UpdateConfig { admin, dump_address, @@ -127,6 +131,7 @@ pub fn handle( start_date, end_date, decay_start: start_decay, + .. } => try_update_config( deps, env, @@ -137,27 +142,29 @@ pub fn handle( end_date, start_decay, ), - HandleMsg::AddTasks { tasks } => try_add_tasks(deps, &env, tasks), - HandleMsg::CompleteTask { address } => try_complete_task(deps, &env, address), + HandleMsg::AddTasks { tasks, .. } => try_add_tasks(deps, &env, tasks), + HandleMsg::CompleteTask { address, .. } => try_complete_task(deps, &env, address), HandleMsg::CreateAccount { addresses, partial_tree, + .. } => try_create_account(deps, &env, addresses, partial_tree), HandleMsg::UpdateAccount { addresses, partial_tree, + .. } => try_update_account(deps, &env, addresses, partial_tree), - HandleMsg::DisablePermitKey { key } => try_disable_permit_key(deps, &env, key), - HandleMsg::Claim {} => try_claim(deps, &env), - HandleMsg::ClaimDecay {} => try_claim_decay(deps, &env), - } + HandleMsg::DisablePermitKey { key, .. } => try_disable_permit_key(deps, &env, key), + HandleMsg::Claim { .. } => try_claim(deps, &env), + HandleMsg::ClaimDecay { .. } => try_claim_decay(deps, &env), + }, RESPONSE_BLOCK_SIZE) } pub fn query( deps: &Extern, msg: QueryMsg, ) -> StdResult { - match msg { + pad_query_result(match msg { QueryMsg::Config {} => to_binary(&query::config(deps)?), QueryMsg::Dates { current_date } => to_binary(&query::dates(deps, current_date)?), QueryMsg::TotalClaimed {} => to_binary(&query::total_claimed(deps)?), @@ -165,5 +172,5 @@ pub fn query( permit, current_date, } => to_binary(&query::account(deps, permit, current_date)?), - } + }, RESPONSE_BLOCK_SIZE) } 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/query.rs b/contracts/airdrop/src/query.rs index f372484ac..e81e19ba5 100644 --- a/contracts/airdrop/src/query.rs +++ b/contracts/airdrop/src/query.rs @@ -19,7 +19,6 @@ use shade_protocol::{ pub fn config(deps: &Extern) -> StdResult { Ok(QueryAnswer::Config { config: config_r(&deps.storage).load()?, - total_claimed: total_claimed_r(&deps.storage).load()?, }) } 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 7712e9486..fabc0d6c9 100644 --- a/contracts/governance/Cargo.toml +++ b/contracts/governance/Cargo.toml @@ -24,8 +24,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" 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 987aa4bcf..1fbda855d 100644 --- a/contracts/initializer/Cargo.toml +++ b/contracts/initializer/Cargo.toml @@ -24,8 +24,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" diff --git a/contracts/micro_mint/Cargo.toml b/contracts/micro_mint/Cargo.toml index 5ea3f86ce..2c8d43c3d 100644 --- a/contracts/micro_mint/Cargo.toml +++ b/contracts/micro_mint/Cargo.toml @@ -27,8 +27,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" 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 6daad67d6..1c84b2afb 100644 --- a/contracts/mint/Cargo.toml +++ b/contracts/mint/Cargo.toml @@ -24,8 +24,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" 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 b12dc6ea4..de88a8eac 100644 --- a/contracts/mock_band/Cargo.toml +++ b/contracts/mock_band/Cargo.toml @@ -25,8 +25,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" diff --git a/contracts/oracle/Cargo.toml b/contracts/oracle/Cargo.toml index 15dd8f01b..bf7a5e818 100644 --- a/contracts/oracle/Cargo.toml +++ b/contracts/oracle/Cargo.toml @@ -28,8 +28,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] bincode = "1.3.1" cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" diff --git a/contracts/scrt_staking/Cargo.toml b/contracts/scrt_staking/Cargo.toml index a9ec9197d..2d63199c7 100644 --- a/contracts/scrt_staking/Cargo.toml +++ b/contracts/scrt_staking/Cargo.toml @@ -23,9 +23,9 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-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" diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index 84a6babd6..65707cc80 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -24,8 +24,8 @@ debug-print = ["cosmwasm-std/debug-print"] [dependencies] cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std" } -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-debug-print" } 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" 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 572553d64..aaceef244 100644 --- a/contracts/treasury/Cargo.toml +++ b/contracts/treasury/Cargo.toml @@ -23,9 +23,9 @@ backtraces = ["cosmwasm-std/backtraces"] debug-print = ["cosmwasm-std/debug-print"] [dependencies] -cosmwasm-schema = { git = "https://github.com/scrtlabs/SecretNetwork", tag = "v1.0.4-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" 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/network_integration/tests/testnet_integration.rs b/packages/network_integration/tests/testnet_integration.rs index 42a1e9838..7cb0e2d98 100644 --- a/packages/network_integration/tests/testnet_integration.rs +++ b/packages/network_integration/tests/testnet_integration.rs @@ -287,6 +287,7 @@ fn run_airdrop() -> Result<()> { &airdrop::HandleMsg::CreateAccount { addresses: vec![b_permit, a_permit.clone()], partial_tree: initial_proof, + padding: None, }, &airdrop, ACCOUNT_KEY, @@ -330,6 +331,7 @@ fn run_airdrop() -> Result<()> { test_contract_handle( &airdrop::HandleMsg::CompleteTask { address: HumanAddr::from(account_a.clone()), + padding: None, }, &airdrop, ACCOUNT_KEY, @@ -389,6 +391,7 @@ fn run_airdrop() -> Result<()> { &airdrop::HandleMsg::UpdateAccount { addresses: vec![c_permit], partial_tree: other_proof, + padding: None, }, &airdrop, ACCOUNT_KEY, @@ -427,6 +430,7 @@ fn run_airdrop() -> Result<()> { test_contract_handle( &airdrop::HandleMsg::DisablePermitKey { key: "key".to_string(), + padding: None, }, &airdrop, ACCOUNT_KEY, @@ -499,6 +503,7 @@ fn run_airdrop() -> Result<()> { &airdrop::HandleMsg::UpdateAccount { addresses: vec![d_permit], partial_tree: d_proof, + padding: None, }, &airdrop, ACCOUNT_KEY, @@ -524,7 +529,9 @@ fn run_airdrop() -> Result<()> { } test_contract_handle( - &airdrop::HandleMsg::ClaimDecay {}, + &airdrop::HandleMsg::ClaimDecay { + padding: None, + }, &airdrop, ACCOUNT_KEY, Some(GAS), 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] diff --git a/packages/shade_protocol/src/airdrop/mod.rs b/packages/shade_protocol/src/airdrop/mod.rs index b56c9a639..77c297be7 100644 --- a/packages/shade_protocol/src/airdrop/mod.rs +++ b/packages/shade_protocol/src/airdrop/mod.rs @@ -85,27 +85,37 @@ pub enum HandleMsg { start_date: Option, end_date: Option, decay_start: Option, + padding: Option, }, AddTasks { tasks: Vec, + padding: Option, }, CompleteTask { address: HumanAddr, + padding: Option, }, CreateAccount { addresses: Vec, partial_tree: Vec, + padding: Option, }, /// Adds more addresses to accounts UpdateAccount { addresses: Vec, partial_tree: Vec, + padding: Option, }, DisablePermitKey { key: String, + padding: Option, + }, + Claim { + padding: Option, + }, + ClaimDecay { + padding: Option, }, - Claim {}, - ClaimDecay {}, } impl HandleCallback for HandleMsg { @@ -148,7 +158,6 @@ impl Query for QueryMsg { pub enum QueryAnswer { Config { config: Config, - total_claimed: Uint128, }, Dates { start: u64,