From 6263d7ec84f279ac36bbb890be7623860dd41eb0 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 7 Jun 2022 11:49:38 +0200 Subject: [PATCH 001/344] Upgrade crossbeam-utils to 0.8.8 --- contracts/burner/Cargo.lock | 4 ++-- contracts/crypto-verify/Cargo.lock | 4 ++-- contracts/floaty/Cargo.lock | 4 ++-- contracts/hackatom/Cargo.lock | 4 ++-- contracts/ibc-reflect-send/Cargo.lock | 4 ++-- contracts/ibc-reflect/Cargo.lock | 4 ++-- contracts/queue/Cargo.lock | 4 ++-- contracts/reflect/Cargo.lock | 4 ++-- contracts/staking/Cargo.lock | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 1483697b8..7756effc5 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index cc6ba2857..faaea5d2e 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -334,9 +334,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 14447bbd5..b987987d3 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 0c0ef23ff..7509af30d 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index f2cb138d0..b62ea7ff0 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 5385c885d..f19fcabd8 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index fbcb7239b..9a29b64c2 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -313,9 +313,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 95d7f4f14..a72f0582f 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 2d30056b3..50db35a7e 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", From dc805ae85746a3ae2ddac46e224c8441a1436ba9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 7 Jun 2022 11:56:10 +0200 Subject: [PATCH 002/344] Upgrade crossbeam-deque --- contracts/burner/Cargo.lock | 4 ++-- contracts/crypto-verify/Cargo.lock | 4 ++-- contracts/floaty/Cargo.lock | 4 ++-- contracts/hackatom/Cargo.lock | 4 ++-- contracts/ibc-reflect-send/Cargo.lock | 4 ++-- contracts/ibc-reflect/Cargo.lock | 4 ++-- contracts/queue/Cargo.lock | 4 ++-- contracts/reflect/Cargo.lock | 4 ++-- contracts/staking/Cargo.lock | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 7756effc5..d4438615c 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index faaea5d2e..92a7ec9fd 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -310,9 +310,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index b987987d3..c75a21ef3 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 7509af30d..26c6be6ec 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -326,9 +326,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index b62ea7ff0..f5ca0f881 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index f19fcabd8..112f8a50c 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 9a29b64c2..7b3e30b42 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -289,9 +289,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index a72f0582f..b6d03a514 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 50db35a7e..267db4a11 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if", "crossbeam-epoch", From e1fc05e007d2845562cbf73c287b12e8483b90fa Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 8 Jun 2022 10:20:48 +0200 Subject: [PATCH 003/344] schema: introduce CosmWasm IDL --- Cargo.lock | 1 + packages/schema/Cargo.toml | 1 + packages/schema/src/idl.rs | 55 ++++++++++++++++++++++++++++++++++++++ packages/schema/src/lib.rs | 1 + 4 files changed, 58 insertions(+) create mode 100644 packages/schema/src/idl.rs diff --git a/Cargo.lock b/Cargo.lock index 3b8156673..7333d5e7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,6 +287,7 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", ] diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 39757d8cf..6e4bb1bd9 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -9,4 +9,5 @@ license = "Apache-2.0" [dependencies] schemars = "0.8.1" +serde = "1.0" serde_json = "1.0" diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs new file mode 100644 index 000000000..b420317ca --- /dev/null +++ b/packages/schema/src/idl.rs @@ -0,0 +1,55 @@ +//! The Cosmwasm IDL (Interface Description Language) + +use schemars::schema::RootSchema; + +/// The version of the CosmWasm IDL. +/// +/// Follows Semantic Versioning 2.0.0: https://semver.org/ +/// +/// To determine if a change is breaking, assume consumers allow unknown fields. +pub const VERSION: &'static str = "0.1.0"; + +/// Rust representation of a contract's API. +pub struct Api { + instantiate: RootSchema, + execute: RootSchema, + query: RootSchema, + response: RootSchema, +} + +impl Api { + fn render(self) -> JsonApi<'static> { + let mut json_api = JsonApi { + version: VERSION, + instantiate: self.instantiate, + execute: self.execute, + query: self.query, + response: self.response, + }; + + if let Some(metadata) = &mut json_api.instantiate.schema.metadata { + metadata.title = Some("InstantiateMsg".to_string()); + } + if let Some(metadata) = &mut json_api.execute.schema.metadata { + metadata.title = Some("ExecuteMsg".to_string()); + } + if let Some(metadata) = &mut json_api.query.schema.metadata { + metadata.title = Some("QueryMsg".to_string()); + } + if let Some(metadata) = &mut json_api.response.schema.metadata { + metadata.title = Some("QueryResponse".to_string()); + } + + json_api + } +} + +/// A JSON representation of a contract's API. +#[derive(serde::Serialize, serde::Deserialize)] +struct JsonApi<'v> { + version: &'v str, + instantiate: RootSchema, + execute: RootSchema, + query: RootSchema, + response: RootSchema, +} diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index dea253a2f..65305769e 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -1,5 +1,6 @@ mod casing; mod export; +mod idl; mod remove; pub use export::{export_schema, export_schema_with_title}; From 06b1b1db3c7599aad54843534334052d171c7b3c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 10 Jun 2022 22:13:13 +0200 Subject: [PATCH 004/344] Add one constructor for Uint types --- CHANGELOG.md | 4 ++++ packages/std/src/math/uint128.rs | 21 ++++++++++++++++++++ packages/std/src/math/uint256.rs | 30 +++++++++++++++++++++++++++++ packages/std/src/math/uint512.rs | 33 ++++++++++++++++++++++++++++++++ packages/std/src/math/uint64.rs | 15 +++++++++++++++ 5 files changed, 103 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e30584dc..045d57213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to ## [Unreleased] +### Added + +- cosmwasm-std: Add `Uint{64,128,256,512}::one`. + ## [1.0.0] - 2022-05-14 ### Added diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 33723f9db..c896dbe51 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -49,6 +49,12 @@ impl Uint128 { Uint128(0) } + /// Creates a Uint128(1) + #[inline] + pub const fn one() -> Self { + Self(1) + } + /// Returns a copy of the internal data pub const fn u128(&self) -> u128 { self.0 @@ -502,6 +508,21 @@ mod tests { use super::*; use crate::{from_slice, to_vec}; + #[test] + fn uint128_zero_and_one_works() { + let zero = Uint128::zero(); + assert_eq!( + zero.to_be_bytes(), + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,] + ); + + let one = Uint128::one(); + assert_eq!( + one.to_be_bytes(), + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] + ); + } + #[test] fn uint128_convert_into() { let original = Uint128(12345); diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 0bb423826..af1c5abdb 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -66,6 +66,15 @@ impl Uint256 { Uint256(U256::zero()) } + /// Creates a Uint256(1) + #[inline] + pub const fn one() -> Self { + Self::from_be_bytes([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, + ]) + } + pub const fn from_be_bytes(data: [u8; 32]) -> Self { let words: [u64; 4] = [ u64::from_le_bytes([ @@ -611,6 +620,27 @@ mod tests { assert_eq!(be_bytes, resulting_bytes); } + #[test] + fn uint256_zero_and_one_works() { + let zero = Uint256::zero(); + assert_eq!( + zero.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 + ] + ); + + let one = Uint256::one(); + assert_eq!( + one.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1 + ] + ); + } + #[test] fn uint256_from_be_bytes() { let a = Uint256::from_be_bytes([ diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 6a1069aa9..f9c315570 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -66,6 +66,16 @@ impl Uint512 { Uint512(U512::zero()) } + /// Creates a Uint512(1) + #[inline] + pub const fn one() -> Self { + Self::from_be_bytes([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, + ]) + } + pub const fn from_be_bytes(data: [u8; 64]) -> Self { let words: [u64; 8] = [ u64::from_le_bytes([ @@ -573,6 +583,29 @@ mod tests { assert_eq!(be_bytes, resulting_bytes); } + #[test] + fn uint512_zero_and_one_works() { + let zero = Uint512::zero(); + assert_eq!( + zero.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + ] + ); + + let one = Uint512::one(); + assert_eq!( + one.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1 + ] + ); + } + #[test] fn uint512_endianness() { let be_bytes = [ diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 906e58f3c..a0456df4b 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -45,6 +45,12 @@ impl Uint64 { Uint64(0) } + /// Creates a Uint64(1) + #[inline] + pub const fn one() -> Self { + Self(1) + } + /// Returns a copy of the internal data pub const fn u64(&self) -> u64 { self.0 @@ -456,6 +462,15 @@ mod tests { use super::*; use crate::{from_slice, to_vec}; + #[test] + fn uint64_zero_and_one_works() { + let zero = Uint64::zero(); + assert_eq!(zero.to_be_bytes(), [0, 0, 0, 0, 0, 0, 0, 0,]); + + let one = Uint64::one(); + assert_eq!(one.to_be_bytes(), [0, 0, 0, 0, 0, 0, 0, 1]); + } + #[test] fn uint64_convert_into() { let original = Uint64(12345); From 81af6eef22daf87a2653b1c2f656d284c4abb859 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Sat, 11 Jun 2022 00:52:45 +0200 Subject: [PATCH 005/344] Add couple tests despite I shouldn't probablt add them --- packages/std/src/math/uint128.rs | 9 +++++++++ packages/std/src/math/uint256.rs | 12 ++++++++++++ packages/std/src/math/uint512.rs | 13 +++++++++++++ 3 files changed, 34 insertions(+) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index c896dbe51..b8942a446 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -508,6 +508,15 @@ mod tests { use super::*; use crate::{from_slice, to_vec}; + #[test] + fn uint128_one_works() { + let one = Uint128::one(); + assert_eq!( + one.to_be_bytes(), + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] + ); + } + #[test] fn uint128_zero_and_one_works() { let zero = Uint128::zero(); diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index af1c5abdb..9ee6bc584 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -605,6 +605,18 @@ mod tests { use super::*; use crate::{from_slice, to_vec}; + #[test] + fn uin256_one_works() { + let one = Uint256::one(); + assert_eq!( + one.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, + ] + ); + } + #[test] fn uint256_construct() { let num = Uint256::new([1; 32]); diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index f9c315570..5b7db397b 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -566,6 +566,19 @@ mod tests { use super::*; use crate::{from_slice, to_vec}; + #[test] + fn uin512_one_works() { + let one = Uint512::one(); + assert_eq!( + one.to_be_bytes(), + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1 + ] + ); + } + #[test] fn uint512_construct() { let num = Uint512::new([1; 64]); From 83965b2f34f93ed97bd1c807cdb674f7d04f181e Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 11 Jun 2022 11:11:14 +0200 Subject: [PATCH 006/344] Organize uint new/zero/one tests --- packages/std/src/math/uint128.rs | 16 +++++----------- packages/std/src/math/uint256.rs | 21 ++++++--------------- packages/std/src/math/uint512.rs | 20 +++++--------------- packages/std/src/math/uint64.rs | 7 +++++-- 4 files changed, 21 insertions(+), 43 deletions(-) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index b8942a446..11d214bdd 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -509,22 +509,16 @@ mod tests { use crate::{from_slice, to_vec}; #[test] - fn uint128_one_works() { - let one = Uint128::one(); - assert_eq!( - one.to_be_bytes(), - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] - ); - } - - #[test] - fn uint128_zero_and_one_works() { + fn uint128_zero_works() { let zero = Uint128::zero(); assert_eq!( zero.to_be_bytes(), - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,] + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ); + } + #[test] + fn uint128_one_works() { let one = Uint128::one(); assert_eq!( one.to_be_bytes(), diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 9ee6bc584..a4b7c4b00 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -606,19 +606,7 @@ mod tests { use crate::{from_slice, to_vec}; #[test] - fn uin256_one_works() { - let one = Uint256::one(); - assert_eq!( - one.to_be_bytes(), - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, - ] - ); - } - - #[test] - fn uint256_construct() { + fn uint256_new_works() { let num = Uint256::new([1; 32]); let a: [u8; 32] = num.to_be_bytes(); assert_eq!(a, [1; 32]); @@ -633,7 +621,7 @@ mod tests { } #[test] - fn uint256_zero_and_one_works() { + fn uint256_zero_works() { let zero = Uint256::zero(); assert_eq!( zero.to_be_bytes(), @@ -642,13 +630,16 @@ mod tests { 0, 0, 0, 0 ] ); + } + #[test] + fn uin256_one_works() { let one = Uint256::one(); assert_eq!( one.to_be_bytes(), [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1 + 0, 0, 0, 1, ] ); } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 5b7db397b..a8779b7c9 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -567,20 +567,7 @@ mod tests { use crate::{from_slice, to_vec}; #[test] - fn uin512_one_works() { - let one = Uint512::one(); - assert_eq!( - one.to_be_bytes(), - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1 - ] - ); - } - - #[test] - fn uint512_construct() { + fn uint512_new_works() { let num = Uint512::new([1; 64]); let a: [u8; 64] = num.to_be_bytes(); assert_eq!(a, [1; 64]); @@ -597,7 +584,7 @@ mod tests { } #[test] - fn uint512_zero_and_one_works() { + fn uint512_zero_works() { let zero = Uint512::zero(); assert_eq!( zero.to_be_bytes(), @@ -607,7 +594,10 @@ mod tests { 0, 0, 0, 0, 0, 0, 0, 0 ] ); + } + #[test] + fn uin512_one_works() { let one = Uint512::one(); assert_eq!( one.to_be_bytes(), diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index a0456df4b..cfe437f99 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -463,10 +463,13 @@ mod tests { use crate::{from_slice, to_vec}; #[test] - fn uint64_zero_and_one_works() { + fn uint64_zero_works() { let zero = Uint64::zero(); - assert_eq!(zero.to_be_bytes(), [0, 0, 0, 0, 0, 0, 0, 0,]); + assert_eq!(zero.to_be_bytes(), [0, 0, 0, 0, 0, 0, 0, 0]); + } + #[test] + fn uint64_one_works() { let one = Uint64::one(); assert_eq!(one.to_be_bytes(), [0, 0, 0, 0, 0, 0, 0, 1]); } From e17328e307b50e622ee3a0bfb4544ad6c929739b Mon Sep 17 00:00:00 2001 From: Pakorn Nathong Date: Sun, 12 Jun 2022 11:38:18 +0700 Subject: [PATCH 007/344] Add `abs_diff` function for math package --- packages/std/src/math/decimal.rs | 17 +++++++++++++++++ packages/std/src/math/decimal256.rs | 17 +++++++++++++++++ packages/std/src/math/uint128.rs | 13 +++++++++++++ packages/std/src/math/uint256.rs | 18 ++++++++++++++++++ packages/std/src/math/uint512.rs | 18 ++++++++++++++++++ packages/std/src/math/uint64.rs | 13 +++++++++++++ 6 files changed, 96 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index f42603071..c4744e6b1 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -258,6 +258,14 @@ impl Decimal { Decimal(inner.isqrt().checked_mul(Uint128::from(outer_mul)).unwrap()) }) } + + pub fn abs_diff(self, other: Self) -> Self { + if self < other { + other - self + } else { + self - other + } + } } impl Fraction for Decimal { @@ -1664,4 +1672,13 @@ mod tests { Decimal::percent(8765) ); } + + #[test] + fn decimal_abs_diff_works() { + let a = Decimal::percent(285); + let b = Decimal::percent(200); + let expected = Decimal::percent(85); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 67d216b3e..5b4804f5f 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -270,6 +270,14 @@ impl Decimal256 { Self(inner.isqrt().checked_mul(outer_mul).unwrap()) }) } + + pub fn abs_diff(self, other: Self) -> Self { + if self < other { + other - self + } else { + self - other + } + } } impl Fraction for Decimal256 { @@ -1783,4 +1791,13 @@ mod tests { Decimal256::percent(8765) ); } + + #[test] + fn decimal256_abs_diff_works() { + let a = Decimal256::percent(285); + let b = Decimal256::percent(200); + let expected = Decimal256::percent(85); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 11d214bdd..f051a97c7 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -208,6 +208,10 @@ impl Uint128 { pub fn saturating_pow(self, other: u32) -> Self { Self(self.0.saturating_pow(other)) } + + pub fn abs_diff(self, other: impl Into) -> Self { + Self(self.0.abs_diff(other.into())) + } } // `From` is implemented manually instead of @@ -965,4 +969,13 @@ mod tests { a %= &b; assert_eq!(a, Uint128::from(1u32)); } + + #[test] + fn uint128_abs_diff_works() { + let a = Uint128::from(42u32); + let b = Uint128::from(5u32); + let expected = Uint128::from(37u32); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index a4b7c4b00..020f97a84 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -283,6 +283,15 @@ impl Uint256 { pub fn saturating_mul(self, other: Self) -> Self { Self(self.0.saturating_mul(other.0)) } + + pub fn abs_diff(self, other: impl Into) -> Self { + let other = other.into(); + if self < other { + other - self + } else { + self - other + } + } } impl From for Uint256 { @@ -1516,4 +1525,13 @@ mod tests { a %= &b; assert_eq!(a, Uint256::from(1u32)); } + + #[test] + fn uint256_abs_diff_works() { + let a = Uint256::from(42u32); + let b = Uint256::from(5u32); + let expected = Uint256::from(37u32); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index a8779b7c9..a23fe34d7 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -258,6 +258,15 @@ impl Uint512 { pub fn saturating_mul(self, other: Self) -> Self { Self(self.0.saturating_mul(other.0)) } + + pub fn abs_diff(self, other: impl Into) -> Self { + let other = other.into(); + if self < other { + other - self + } else { + self - other + } + } } impl From for Uint512 { @@ -1151,4 +1160,13 @@ mod tests { a %= &b; assert_eq!(a, Uint512::from(1u32)); } + + #[test] + fn uint512_abs_diff_works() { + let a = Uint512::from(42u32); + let b = Uint512::from(5u32); + let expected = Uint512::from(37u32); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index cfe437f99..e75a5f9eb 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -204,6 +204,10 @@ impl Uint64 { pub fn saturating_pow(self, other: u32) -> Self { Self(self.0.saturating_pow(other)) } + + pub fn abs_diff(self, other: impl Into) -> Self { + Self(self.0.abs_diff(other.into())) + } } // `From` is implemented manually instead of @@ -878,4 +882,13 @@ mod tests { a %= &b; assert_eq!(a, Uint64::from(1u32)); } + + #[test] + fn uint64_abs_diff_works() { + let a = Uint64::from(42u32); + let b = Uint64::from(5u32); + let expected = Uint64::from(37u32); + assert_eq!(a.abs_diff(b), expected); + assert_eq!(b.abs_diff(a), expected); + } } From 705ae4970c8b242d984af54809ec54e312b470bb Mon Sep 17 00:00:00 2001 From: Pakorn Nathong Date: Mon, 13 Jun 2022 08:17:27 +0700 Subject: [PATCH 008/344] Add const ident for possible struct and remove Into --- packages/std/src/math/decimal.rs | 8 ++------ packages/std/src/math/uint128.rs | 4 ++-- packages/std/src/math/uint256.rs | 3 +-- packages/std/src/math/uint512.rs | 3 +-- packages/std/src/math/uint64.rs | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index c4744e6b1..497b29c92 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -259,12 +259,8 @@ impl Decimal { }) } - pub fn abs_diff(self, other: Self) -> Self { - if self < other { - other - self - } else { - self - other - } + pub const fn abs_diff(self, other: Self) -> Self { + Self(self.0.abs_diff(other.0)) } } diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index f051a97c7..5def248f6 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -209,8 +209,8 @@ impl Uint128 { Self(self.0.saturating_pow(other)) } - pub fn abs_diff(self, other: impl Into) -> Self { - Self(self.0.abs_diff(other.into())) + pub const fn abs_diff(self, other: Self) -> Self { + Self(self.0.abs_diff(other.0)) } } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 020f97a84..9150bed56 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -284,8 +284,7 @@ impl Uint256 { Self(self.0.saturating_mul(other.0)) } - pub fn abs_diff(self, other: impl Into) -> Self { - let other = other.into(); + pub fn abs_diff(self, other: Self) -> Self { if self < other { other - self } else { diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index a23fe34d7..ceeb7b869 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -259,8 +259,7 @@ impl Uint512 { Self(self.0.saturating_mul(other.0)) } - pub fn abs_diff(self, other: impl Into) -> Self { - let other = other.into(); + pub fn abs_diff(self, other: Self) -> Self { if self < other { other - self } else { diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index e75a5f9eb..bb56d9bc9 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -205,8 +205,8 @@ impl Uint64 { Self(self.0.saturating_pow(other)) } - pub fn abs_diff(self, other: impl Into) -> Self { - Self(self.0.abs_diff(other.into())) + pub const fn abs_diff(self, other: Self) -> Self { + Self(self.0.abs_diff(other.0)) } } From e5837a38c9c82586f00d3e0c6ed3d4b7f0e14da0 Mon Sep 17 00:00:00 2001 From: Pakorn Nathong Date: Mon, 13 Jun 2022 14:51:01 +0700 Subject: [PATCH 009/344] Use manual implementation of abs_diff instead of native --- packages/std/src/math/uint128.rs | 6 +++++- packages/std/src/math/uint64.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 5def248f6..5aee2fc8f 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -210,7 +210,11 @@ impl Uint128 { } pub const fn abs_diff(self, other: Self) -> Self { - Self(self.0.abs_diff(other.0)) + Self(if self.0 < other.0 { + other.0 - self.0 + } else { + self.0 - other.0 + }) } } diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index bb56d9bc9..6bf19b2c3 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -206,7 +206,11 @@ impl Uint64 { } pub const fn abs_diff(self, other: Self) -> Self { - Self(self.0.abs_diff(other.0)) + Self(if self.0 < other.0 { + other.0 - self.0 + } else { + self.0 - other.0 + }) } } From 158224f2c19907e038a6d82f0380186395f12df5 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 13 Jun 2022 10:18:25 +0200 Subject: [PATCH 010/344] Add CHANGELOG entry for abs_diff --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045d57213..9103aa0ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to ### Added - cosmwasm-std: Add `Uint{64,128,256,512}::one`. +- cosmwasm-std: Add `Uint{64,128,256,512}::abs_diff` and + `Decimal{,256}::abs_diff` ([#1334]). + +[#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 ## [1.0.0] - 2022-05-14 From 4ddc9b114fdcece27dbb711345fe118fdffa8d7d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 15 Jun 2022 08:32:46 +0200 Subject: [PATCH 011/344] Implement From for Decimal256 --- CHANGELOG.md | 1 + packages/std/src/math/decimal.rs | 2 ++ packages/std/src/math/decimal256.rs | 27 ++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9103aa0ae..a816c2075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to - cosmwasm-std: Add `Uint{64,128,256,512}::one`. - cosmwasm-std: Add `Uint{64,128,256,512}::abs_diff` and `Decimal{,256}::abs_diff` ([#1334]). +- cosmwasm-std: Implement `From for Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 497b29c92..47de1baf4 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -168,6 +168,7 @@ impl Decimal { /// assert_eq!(b.decimal_places(), 18); /// assert_eq!(b.atomics(), Uint128::new(1)); /// ``` + #[inline] pub const fn atomics(&self) -> Uint128 { self.0 } @@ -176,6 +177,7 @@ impl Decimal { /// but this could potentially change as the type evolves. /// /// See also [`Decimal::atomics()`]. + #[inline] pub const fn decimal_places(&self) -> u32 { Self::DECIMAL_PLACES as u32 } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 5b4804f5f..4b76f0721 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -8,7 +8,7 @@ use std::str::FromStr; use thiserror::Error; use crate::errors::{CheckedFromRatioError, CheckedMultiplyRatioError, StdError}; -use crate::{OverflowError, Uint512}; +use crate::{Decimal, OverflowError, Uint512}; use super::Fraction; use super::Isqrt; @@ -180,6 +180,7 @@ impl Decimal256 { /// assert_eq!(b.decimal_places(), 18); /// assert_eq!(b.atomics(), Uint256::from(1u128)); /// ``` + #[inline] pub const fn atomics(&self) -> Uint256 { self.0 } @@ -188,6 +189,7 @@ impl Decimal256 { /// but this could potentially change as the type evolves. /// /// See also [`Decimal256::atomics()`]. + #[inline] pub const fn decimal_places(&self) -> u32 { Self::DECIMAL_PLACES as u32 } @@ -306,6 +308,14 @@ impl Fraction for Decimal256 { } } +impl From for Decimal256 { + fn from(input: Decimal) -> Self { + // Unwrap is safe because Decimal256 and Decimal have the same decimal places. + // Every Decimal value can be stored in Decimal256. + Decimal256::from_atomics(input.atomics(), input.decimal_places()).unwrap() + } +} + impl FromStr for Decimal256 { type Err = StdError; @@ -774,6 +784,21 @@ mod tests { ); } + #[test] + fn decimal256_implements_from_decimal() { + let a = Decimal::from_str("123.456").unwrap(); + let b = Decimal256::from(a); + assert_eq!(b.to_string(), "123.456"); + + let a = Decimal::from_str("0").unwrap(); + let b = Decimal256::from(a); + assert_eq!(b.to_string(), "0"); + + let a = Decimal::MAX; + let b = Decimal256::from(a); + assert_eq!(b.to_string(), "340282366920938463463.374607431768211455"); + } + #[test] fn decimal256_from_str_works() { // Integers From d0411935ab4c1b5f7ade3a6e41cc265f59d3907e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 15 Jun 2022 18:56:02 +0200 Subject: [PATCH 012/344] schema: add placeholder test for IDL --- Cargo.lock | 2 ++ packages/schema/Cargo.toml | 4 +++ packages/schema/src/idl.rs | 34 +++++++++++++++-------- packages/schema/src/lib.rs | 1 + packages/schema/tests/idl.rs | 52 ++++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 packages/schema/tests/idl.rs diff --git a/Cargo.lock b/Cargo.lock index 7333d5e7a..8dc91d05a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -286,9 +286,11 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "anyhow", "schemars", "serde", "serde_json", + "tempfile", ] [[package]] diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 6e4bb1bd9..9ec9574f4 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -11,3 +11,7 @@ license = "Apache-2.0" schemars = "0.8.1" serde = "1.0" serde_json = "1.0" + +[dev-dependencies] +anyhow = "1" +tempfile = "3" diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index b420317ca..0d59f7c7e 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -1,5 +1,7 @@ //! The Cosmwasm IDL (Interface Description Language) +use std::path::Path; + use schemars::schema::RootSchema; /// The version of the CosmWasm IDL. @@ -11,20 +13,20 @@ pub const VERSION: &'static str = "0.1.0"; /// Rust representation of a contract's API. pub struct Api { - instantiate: RootSchema, - execute: RootSchema, - query: RootSchema, - response: RootSchema, + pub instantiate: RootSchema, + pub execute: RootSchema, + pub query: RootSchema, + //pub response: RootSchema, } impl Api { - fn render(self) -> JsonApi<'static> { + pub fn render(self) -> JsonApi<'static> { let mut json_api = JsonApi { version: VERSION, instantiate: self.instantiate, execute: self.execute, query: self.query, - response: self.response, + //response: self.response, }; if let Some(metadata) = &mut json_api.instantiate.schema.metadata { @@ -36,9 +38,9 @@ impl Api { if let Some(metadata) = &mut json_api.query.schema.metadata { metadata.title = Some("QueryMsg".to_string()); } - if let Some(metadata) = &mut json_api.response.schema.metadata { - metadata.title = Some("QueryResponse".to_string()); - } + //if let Some(metadata) = &mut json_api.response.schema.metadata { + // metadata.title = Some("QueryResponse".to_string()); + //} json_api } @@ -46,10 +48,20 @@ impl Api { /// A JSON representation of a contract's API. #[derive(serde::Serialize, serde::Deserialize)] -struct JsonApi<'v> { +pub struct JsonApi<'v> { version: &'v str, instantiate: RootSchema, execute: RootSchema, query: RootSchema, - response: RootSchema, + //response: RootSchema, } + +impl JsonApi<'_> { + pub fn verify(self) -> Result { + // TODO: check semver compatibility + todo!() + } +} + +/// TODO: actual thiserror thingy +pub struct VerificationError; diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 65305769e..0eaa6c285 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -4,6 +4,7 @@ mod idl; mod remove; pub use export::{export_schema, export_schema_with_title}; +pub use idl::Api; pub use remove::remove_schemas; // Re-exports diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs new file mode 100644 index 000000000..f55c8bb77 --- /dev/null +++ b/packages/schema/tests/idl.rs @@ -0,0 +1,52 @@ +use cosmwasm_schema::{schema_for, Api}; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use tempfile::tempfile; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct InstantiateMsg { + pub admin: String, + pub cap: u128, +} + +// failure modes to help test wasmd, based on this comment +// https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ExecuteMsg { + Mint { amount: u128 }, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsg { + Balance { account: String }, +} + +#[test] +fn test() -> anyhow::Result<()> { + let file = tempfile()?; + + let mut api = Api { + instantiate: schema_for!(InstantiateMsg), + execute: schema_for!(ExecuteMsg), + query: schema_for!(QueryMsg), + //response: schema_for!(QueryResponse), + } + .render(); + let api = serde_json::to_writer_pretty(file, &api)?; + + // let mut out_dir = current_dir().unwrap(); + // out_dir.push("schema"); + // create_dir_all(&out_dir).unwrap(); + // remove_schemas(&out_dir).unwrap(); + + // api.set_names(); + + // // TODO: expose write_schema in export.rs (cosmwasm-schema) + // let path = out_dir.join("api.json".to_string()); + // let json = serde_json::to_string_pretty(&api).unwrap(); + // write(&path, json + "\n").unwrap(); + // println!("Created {}", path.to_str().unwrap()); + Ok(()) +} From e2073ea4b084b98d2299b38ba0b48395415c0009 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 15 Jun 2022 20:53:16 +0200 Subject: [PATCH 013/344] schema: include query responses in IDL --- packages/schema/src/idl.rs | 14 ++++++-------- packages/schema/tests/idl.rs | 16 +++------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 0d59f7c7e..edb6d8746 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -1,8 +1,8 @@ //! The Cosmwasm IDL (Interface Description Language) -use std::path::Path; +use std::{collections::HashMap, path::Path}; -use schemars::schema::RootSchema; +use schemars::schema::{RootSchema, SchemaObject}; /// The version of the CosmWasm IDL. /// @@ -16,7 +16,8 @@ pub struct Api { pub instantiate: RootSchema, pub execute: RootSchema, pub query: RootSchema, - //pub response: RootSchema, + /// A mapping of query variants to response types + pub responses: HashMap, } impl Api { @@ -26,7 +27,7 @@ impl Api { instantiate: self.instantiate, execute: self.execute, query: self.query, - //response: self.response, + responses: self.responses, }; if let Some(metadata) = &mut json_api.instantiate.schema.metadata { @@ -38,9 +39,6 @@ impl Api { if let Some(metadata) = &mut json_api.query.schema.metadata { metadata.title = Some("QueryMsg".to_string()); } - //if let Some(metadata) = &mut json_api.response.schema.metadata { - // metadata.title = Some("QueryResponse".to_string()); - //} json_api } @@ -53,7 +51,7 @@ pub struct JsonApi<'v> { instantiate: RootSchema, execute: RootSchema, query: RootSchema, - //response: RootSchema, + responses: HashMap, } impl JsonApi<'_> { diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index f55c8bb77..3c8d2be51 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -31,22 +31,12 @@ fn test() -> anyhow::Result<()> { instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), - //response: schema_for!(QueryResponse), + responses: [("balance".to_string(), schema_for!(u128))] + .into_iter() + .collect(), } .render(); let api = serde_json::to_writer_pretty(file, &api)?; - // let mut out_dir = current_dir().unwrap(); - // out_dir.push("schema"); - // create_dir_all(&out_dir).unwrap(); - // remove_schemas(&out_dir).unwrap(); - - // api.set_names(); - - // // TODO: expose write_schema in export.rs (cosmwasm-schema) - // let path = out_dir.join("api.json".to_string()); - // let json = serde_json::to_string_pretty(&api).unwrap(); - // write(&path, json + "\n").unwrap(); - // println!("Created {}", path.to_str().unwrap()); Ok(()) } From 1d7ab4f988f3948511894631610acd8b03b938de Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 15 Jun 2022 21:31:01 +0200 Subject: [PATCH 014/344] schema: add more msgs to IDL --- packages/schema/src/idl.rs | 20 ++++++++++++++++++-- packages/schema/tests/idl.rs | 6 ++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index edb6d8746..2a943ffa2 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -1,8 +1,8 @@ //! The Cosmwasm IDL (Interface Description Language) -use std::{collections::HashMap, path::Path}; +use std::collections::HashMap; -use schemars::schema::{RootSchema, SchemaObject}; +use schemars::schema::RootSchema; /// The version of the CosmWasm IDL. /// @@ -16,6 +16,8 @@ pub struct Api { pub instantiate: RootSchema, pub execute: RootSchema, pub query: RootSchema, + pub migrate: Option, + pub sudo: Option, /// A mapping of query variants to response types pub responses: HashMap, } @@ -27,6 +29,8 @@ impl Api { instantiate: self.instantiate, execute: self.execute, query: self.query, + migrate: self.migrate, + sudo: self.sudo, responses: self.responses, }; @@ -39,6 +43,16 @@ impl Api { if let Some(metadata) = &mut json_api.query.schema.metadata { metadata.title = Some("QueryMsg".to_string()); } + if let Some(migrate) = &mut json_api.migrate { + if let Some(metadata) = &mut migrate.schema.metadata { + metadata.title = Some("MigrateMsg".to_string()); + } + } + if let Some(sudo) = &mut json_api.sudo { + if let Some(metadata) = &mut sudo.schema.metadata { + metadata.title = Some("SudoMsg".to_string()); + } + } json_api } @@ -51,6 +65,8 @@ pub struct JsonApi<'v> { instantiate: RootSchema, execute: RootSchema, query: RootSchema, + migrate: Option, + sudo: Option, responses: HashMap, } diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 3c8d2be51..fe6eed7f6 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -27,16 +27,18 @@ pub enum QueryMsg { fn test() -> anyhow::Result<()> { let file = tempfile()?; - let mut api = Api { + let api = Api { instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), responses: [("balance".to_string(), schema_for!(u128))] .into_iter() .collect(), + migrate: None, + sudo: None, } .render(); - let api = serde_json::to_writer_pretty(file, &api)?; + let _api = serde_json::to_writer_pretty(file, &api)?; Ok(()) } From 9152d5ecd264f5a83cc23c3040791fa2b2ff63ae Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 15 Jun 2022 21:36:26 +0200 Subject: [PATCH 015/344] schema: add error type to IDL --- packages/schema/src/idl.rs | 3 +++ packages/schema/tests/idl.rs | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 2a943ffa2..cb7db5055 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -18,6 +18,7 @@ pub struct Api { pub query: RootSchema, pub migrate: Option, pub sudo: Option, + pub error: RootSchema, /// A mapping of query variants to response types pub responses: HashMap, } @@ -31,6 +32,7 @@ impl Api { query: self.query, migrate: self.migrate, sudo: self.sudo, + error: self.error, responses: self.responses, }; @@ -67,6 +69,7 @@ pub struct JsonApi<'v> { query: RootSchema, migrate: Option, sudo: Option, + error: RootSchema, responses: HashMap, } diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index fe6eed7f6..f1574457b 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -23,6 +23,12 @@ pub enum QueryMsg { Balance { account: String }, } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ContractError { + Invalid {}, +} + #[test] fn test() -> anyhow::Result<()> { let file = tempfile()?; @@ -31,11 +37,12 @@ fn test() -> anyhow::Result<()> { instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), + migrate: None, + sudo: None, + error: schema_for!(ContractError), responses: [("balance".to_string(), schema_for!(u128))] .into_iter() .collect(), - migrate: None, - sudo: None, } .render(); let _api = serde_json::to_writer_pretty(file, &api)?; From 4a5ed09ac5cd76839b5bf3fb8f770bcefac6faa1 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 14:56:54 +0200 Subject: [PATCH 016/344] schema: IDL - don't provide a way to deserialize --- Cargo.lock | 1 + packages/schema/Cargo.toml | 1 + packages/schema/src/idl.rs | 16 +++------------- packages/schema/src/lib.rs | 2 +- packages/schema/tests/idl.rs | 8 +++----- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8dc91d05a..93c875d58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -288,6 +288,7 @@ version = "1.0.0" dependencies = [ "anyhow", "schemars", + "semver", "serde", "serde_json", "tempfile", diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 9ec9574f4..a70d62bf4 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -14,4 +14,5 @@ serde_json = "1.0" [dev-dependencies] anyhow = "1" +semver = "1" tempfile = "3" diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index cb7db5055..649ffefdf 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -9,7 +9,7 @@ use schemars::schema::RootSchema; /// Follows Semantic Versioning 2.0.0: https://semver.org/ /// /// To determine if a change is breaking, assume consumers allow unknown fields. -pub const VERSION: &'static str = "0.1.0"; +pub const IDL_VERSION: &'static str = "0.1.0"; /// Rust representation of a contract's API. pub struct Api { @@ -26,7 +26,7 @@ pub struct Api { impl Api { pub fn render(self) -> JsonApi<'static> { let mut json_api = JsonApi { - version: VERSION, + version: IDL_VERSION, instantiate: self.instantiate, execute: self.execute, query: self.query, @@ -61,7 +61,7 @@ impl Api { } /// A JSON representation of a contract's API. -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(serde::Serialize)] pub struct JsonApi<'v> { version: &'v str, instantiate: RootSchema, @@ -72,13 +72,3 @@ pub struct JsonApi<'v> { error: RootSchema, responses: HashMap, } - -impl JsonApi<'_> { - pub fn verify(self) -> Result { - // TODO: check semver compatibility - todo!() - } -} - -/// TODO: actual thiserror thingy -pub struct VerificationError; diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 0eaa6c285..dda1abc71 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -4,7 +4,7 @@ mod idl; mod remove; pub use export::{export_schema, export_schema_with_title}; -pub use idl::Api; +pub use idl::{Api, IDL_VERSION}; pub use remove::remove_schemas; // Re-exports diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index f1574457b..c0a28fb38 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -30,8 +30,8 @@ pub enum ContractError { } #[test] -fn test() -> anyhow::Result<()> { - let file = tempfile()?; +fn test() { + let file = tempfile().unwrap(); let api = Api { instantiate: schema_for!(InstantiateMsg), @@ -45,7 +45,5 @@ fn test() -> anyhow::Result<()> { .collect(), } .render(); - let _api = serde_json::to_writer_pretty(file, &api)?; - - Ok(()) + let _api = serde_json::to_writer_pretty(file, &api).unwrap(); } From cad353d53a9880529725908e3d4dae8bdf0dfe3f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 14:57:08 +0200 Subject: [PATCH 017/344] schema: test IDL version number for semver compat --- packages/schema/src/idl.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 649ffefdf..280e204bb 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -72,3 +72,13 @@ pub struct JsonApi<'v> { error: RootSchema, responses: HashMap, } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn version_is_semver() { + semver::Version::parse(IDL_VERSION).unwrap(); + } +} From ce6babc7aa3df3119f311945b9ce6e623dfd27f6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 16:13:51 +0200 Subject: [PATCH 018/344] schema: remove errors from IDL context: for clients, these are not structured data, just strings --- packages/schema/src/idl.rs | 3 --- packages/schema/tests/idl.rs | 7 ------- 2 files changed, 10 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 280e204bb..eb2e750c3 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -18,7 +18,6 @@ pub struct Api { pub query: RootSchema, pub migrate: Option, pub sudo: Option, - pub error: RootSchema, /// A mapping of query variants to response types pub responses: HashMap, } @@ -32,7 +31,6 @@ impl Api { query: self.query, migrate: self.migrate, sudo: self.sudo, - error: self.error, responses: self.responses, }; @@ -69,7 +67,6 @@ pub struct JsonApi<'v> { query: RootSchema, migrate: Option, sudo: Option, - error: RootSchema, responses: HashMap, } diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index c0a28fb38..f427c2b29 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -23,12 +23,6 @@ pub enum QueryMsg { Balance { account: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum ContractError { - Invalid {}, -} - #[test] fn test() { let file = tempfile().unwrap(); @@ -39,7 +33,6 @@ fn test() { query: schema_for!(QueryMsg), migrate: None, sudo: None, - error: schema_for!(ContractError), responses: [("balance".to_string(), schema_for!(u128))] .into_iter() .collect(), From 5e622452e87d30d71825582c16ed89b3694c1eda Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 16:59:34 +0200 Subject: [PATCH 019/344] schema: rename `version` to `idl_version` --- packages/schema/src/idl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index eb2e750c3..8ddbf4b6d 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -25,7 +25,7 @@ pub struct Api { impl Api { pub fn render(self) -> JsonApi<'static> { let mut json_api = JsonApi { - version: IDL_VERSION, + idl_version: IDL_VERSION, instantiate: self.instantiate, execute: self.execute, query: self.query, @@ -61,7 +61,7 @@ impl Api { /// A JSON representation of a contract's API. #[derive(serde::Serialize)] pub struct JsonApi<'v> { - version: &'v str, + idl_version: &'v str, instantiate: RootSchema, execute: RootSchema, query: RootSchema, From 4f1183677e3de664bcb986af94302d763b9723e6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 17:53:27 +0200 Subject: [PATCH 020/344] schema: IDL render errors --- packages/schema/Cargo.toml | 1 + packages/schema/src/idl.rs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index a70d62bf4..f26cf38d9 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -11,6 +11,7 @@ license = "Apache-2.0" schemars = "0.8.1" serde = "1.0" serde_json = "1.0" +thiserror = "1" [dev-dependencies] anyhow = "1" diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 8ddbf4b6d..b752271e7 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use schemars::schema::RootSchema; +use thiserror::Error; /// The version of the CosmWasm IDL. /// @@ -70,6 +71,22 @@ pub struct JsonApi<'v> { responses: HashMap, } +impl JsonApi<'_> { + pub fn to_string(&self) -> Result { + serde_json::to_string_pretty(&self).map_err(Into::into) + } + + pub fn to_writer(&self, writer: impl std::io::Write) -> Result<(), EncodeError> { + serde_json::to_writer_pretty(writer, self).map_err(Into::into) + } +} + +#[derive(Error, Debug)] +pub enum EncodeError { + #[error("{0}")] + JsonError(#[from] serde_json::Error), +} + #[cfg(test)] mod tests { use super::*; From 0ed657996412c803c7a92113b3899e18fee54056 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 17:53:43 +0200 Subject: [PATCH 021/344] hackatom: example API export --- Cargo.lock | 1 + contracts/hackatom/Cargo.lock | 2 + contracts/hackatom/examples/schema.rs | 34 ++- contracts/hackatom/schema/api.json | 414 ++++++++++++++++++++++++++ contracts/hackatom/src/lib.rs | 2 +- 5 files changed, 448 insertions(+), 5 deletions(-) create mode 100644 contracts/hackatom/schema/api.json diff --git a/Cargo.lock b/Cargo.lock index 93c875d58..0a2d07d38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,6 +292,7 @@ dependencies = [ "serde", "serde_json", "tempfile", + "thiserror", ] [[package]] diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 26c6be6ec..d63bb8ba3 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -191,7 +191,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 8adeee986..cb27857d0 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,10 +1,14 @@ use std::env::current_dir; -use std::fs::create_dir_all; +use std::fs::{create_dir_all, write}; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; -use cosmwasm_std::BalanceResponse; +use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api}; +use cosmwasm_std::{AllBalanceResponse, BalanceResponse}; -use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg, VerifierResponse}; +use hackatom::errors::HackError; +use hackatom::msg::{ + ExecuteMsg, InstantiateMsg, IntResponse, MigrateMsg, QueryMsg, RecurseResponse, SudoMsg, + VerifierResponse, +}; use hackatom::state::State; fn main() { @@ -24,4 +28,26 @@ fn main() { // state export_schema(&schema_for!(State), &out_dir); + + // The new IDL + let path = out_dir.join("api.json".to_string()); + let api = Api { + instantiate: schema_for!(InstantiateMsg), + execute: schema_for!(ExecuteMsg), + query: schema_for!(QueryMsg), + migrate: Some(schema_for!(MigrateMsg)), + sudo: Some(schema_for!(SudoMsg)), + responses: [ + ("verifier".to_string(), schema_for!(VerifierResponse)), + ("other_balance".to_string(), schema_for!(AllBalanceResponse)), + ("recurse".to_string(), schema_for!(RecurseResponse)), + ("get_int".to_string(), schema_for!(IntResponse)), + ] + .into_iter() + .collect(), + } + .render(); + let json = api.to_string().unwrap(); + write(&path, json + "\n").unwrap(); + println!("Exported the full API as {}", path.to_str().unwrap()); } diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/api.json new file mode 100644 index 000000000..bd815cfa5 --- /dev/null +++ b/contracts/hackatom/schema/api.json @@ -0,0 +1,414 @@ +{ + "idl_version": "0.1.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "beneficiary", + "verifier" + ], + "properties": { + "beneficiary": { + "type": "string" + }, + "verifier": { + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", + "type": "object", + "required": [ + "release" + ], + "properties": { + "release": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Hashes some data. Uses CPU and memory, but no external calls.", + "type": "object", + "required": [ + "argon2" + ], + "properties": { + "argon2": { + "type": "object", + "required": [ + "mem_cost", + "time_cost" + ], + "properties": { + "mem_cost": { + "description": "The amount of memory requested (KB).", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "time_cost": { + "description": "The number of passes.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", + "type": "object", + "required": [ + "cpu_loop" + ], + "properties": { + "cpu_loop": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop making storage calls (to test when their limit hits)", + "type": "object", + "required": [ + "storage_loop" + ], + "properties": { + "storage_loop": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop reading and writing memory", + "type": "object", + "required": [ + "memory_loop" + ], + "properties": { + "memory_loop": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop sending message to itself", + "type": "object", + "required": [ + "message_loop" + ], + "properties": { + "message_loop": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Allocate large amounts of memory without consuming much gas", + "type": "object", + "required": [ + "allocate_large_memory" + ], + "properties": { + "allocate_large_memory": { + "type": "object", + "required": [ + "pages" + ], + "properties": { + "pages": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Trigger a panic to ensure framework handles gracefully", + "type": "object", + "required": [ + "panic" + ], + "properties": { + "panic": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", + "type": "object", + "required": [ + "user_errors_in_api_calls" + ], + "properties": { + "user_errors_in_api_calls": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", + "type": "object", + "required": [ + "other_balance" + ], + "properties": { + "other_balance": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", + "type": "object", + "required": [ + "recurse" + ], + "properties": { + "recurse": { + "type": "object", + "required": [ + "depth", + "work" + ], + "properties": { + "depth": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "work": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "GetInt returns a hardcoded u32 value", + "type": "object", + "required": [ + "get_int" + ], + "properties": { + "get_int": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + } + }, + "sudo": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SudoMsg", + "description": "SudoMsg is only exposed for internal Cosmos SDK modules to call. This is showing how we can expose \"admin\" functionality than can not be called by external users or contracts, but only trusted (native/Go) code in the blockchain", + "oneOf": [ + { + "type": "object", + "required": [ + "steal_funds" + ], + "properties": { + "steal_funds": { + "type": "object", + "required": [ + "amount", + "recipient" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "recipient": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "responses": { + "get_int": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "IntResponse", + "type": "object", + "required": [ + "int" + ], + "properties": { + "int": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "other_balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AllBalanceResponse", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Returns all non-zero coins held by this account.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "verifier": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifierResponse", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + } + }, + "recurse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RecurseResponse", + "type": "object", + "required": [ + "hashed" + ], + "properties": { + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + } + } +} diff --git a/contracts/hackatom/src/lib.rs b/contracts/hackatom/src/lib.rs index 0573cc96c..09d07c7ea 100644 --- a/contracts/hackatom/src/lib.rs +++ b/contracts/hackatom/src/lib.rs @@ -1,4 +1,4 @@ pub mod contract; -mod errors; +pub mod errors; pub mod msg; pub mod state; From 0a42b77138871ad56bf07403d2520a8c8ed20c85 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 20 Jun 2022 23:45:08 +0200 Subject: [PATCH 022/344] update contracts --- contracts/burner/Cargo.lock | 2 ++ contracts/crypto-verify/Cargo.lock | 2 ++ contracts/floaty/Cargo.lock | 2 ++ contracts/hackatom/examples/schema.rs | 1 - contracts/ibc-reflect-send/Cargo.lock | 2 ++ contracts/ibc-reflect/Cargo.lock | 2 ++ contracts/queue/Cargo.lock | 2 ++ contracts/reflect/Cargo.lock | 2 ++ contracts/staking/Cargo.lock | 2 ++ packages/schema/src/idl.rs | 2 +- 10 files changed, 17 insertions(+), 2 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index d4438615c..5ac61e77f 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -173,7 +173,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 92a7ec9fd..a90eb3d7e 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -175,7 +175,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index c75a21ef3..7e8c82cdc 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index cb27857d0..c6b4836e9 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -4,7 +4,6 @@ use std::fs::{create_dir_all, write}; use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api}; use cosmwasm_std::{AllBalanceResponse, BalanceResponse}; -use hackatom::errors::HackError; use hackatom::msg::{ ExecuteMsg, InstantiateMsg, IntResponse, MigrateMsg, QueryMsg, RecurseResponse, SudoMsg, VerifierResponse, diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index f5ca0f881..aeca46ae9 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 112f8a50c..808e6aa35 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 7b3e30b42..f056c426d 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index b6d03a514..2b91e890f 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 267db4a11..c1ce84f2f 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -162,7 +162,9 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "schemars", + "serde", "serde_json", + "thiserror", ] [[package]] diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index b752271e7..9e0389cf0 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -10,7 +10,7 @@ use thiserror::Error; /// Follows Semantic Versioning 2.0.0: https://semver.org/ /// /// To determine if a change is breaking, assume consumers allow unknown fields. -pub const IDL_VERSION: &'static str = "0.1.0"; +pub const IDL_VERSION: &str = "0.1.0"; /// Rust representation of a contract's API. pub struct Api { From bd57a9f98cee84eec646b87ce2ae2d020e24efd7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 21 Jun 2022 14:09:13 +0200 Subject: [PATCH 023/344] more lints --- contracts/hackatom/examples/schema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index c6b4836e9..a306dd8c3 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -29,7 +29,7 @@ fn main() { export_schema(&schema_for!(State), &out_dir); // The new IDL - let path = out_dir.join("api.json".to_string()); + let path = out_dir.join("api.json"); let api = Api { instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), From 888957849359dbf985c887ad37c99aa1766031da Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 21 Jun 2022 14:10:09 +0200 Subject: [PATCH 024/344] contrat schemas --- contracts/hackatom/schema/api.json | 72 +++++++++++++++--------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/api.json index bd815cfa5..9318c0a23 100644 --- a/contracts/hackatom/schema/api.json +++ b/contracts/hackatom/schema/api.json @@ -320,18 +320,40 @@ } }, "responses": { - "get_int": { + "verifier": { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "IntResponse", + "title": "VerifierResponse", "type": "object", "required": [ - "int" + "verifier" ], "properties": { - "int": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 + "verifier": { + "type": "string" + } + } + }, + "recurse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RecurseResponse", + "type": "object", + "required": [ + "hashed" + ], + "properties": { + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" } } }, @@ -373,40 +395,18 @@ } } }, - "verifier": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - } - }, - "recurse": { + "get_int": { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", + "title": "IntResponse", "type": "object", "required": [ - "hashed" + "int" ], "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" + "int": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } } } From 0f19686aebf79d92a64aaebeb38d9c7b497c7cf9 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 21 Jun 2022 15:04:30 +0200 Subject: [PATCH 025/344] schema: make api.json deterministic (use BTreeMap) --- contracts/hackatom/schema/api.json | 72 +++++++++++++++--------------- packages/schema/src/idl.rs | 6 +-- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/api.json index 9318c0a23..0b918d7cb 100644 --- a/contracts/hackatom/schema/api.json +++ b/contracts/hackatom/schema/api.json @@ -320,40 +320,18 @@ } }, "responses": { - "verifier": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - } - }, - "recurse": { + "get_int": { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", + "title": "IntResponse", "type": "object", "required": [ - "hashed" + "int" ], "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" + "int": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } } }, @@ -395,18 +373,40 @@ } } }, - "get_int": { + "recurse": { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "IntResponse", + "title": "RecurseResponse", "type": "object", "required": [ - "int" + "hashed" ], "properties": { - "int": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "verifier": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifierResponse", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" } } } diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 9e0389cf0..d0465935c 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -1,6 +1,6 @@ //! The Cosmwasm IDL (Interface Description Language) -use std::collections::HashMap; +use std::collections::BTreeMap; use schemars::schema::RootSchema; use thiserror::Error; @@ -20,7 +20,7 @@ pub struct Api { pub migrate: Option, pub sudo: Option, /// A mapping of query variants to response types - pub responses: HashMap, + pub responses: BTreeMap, } impl Api { @@ -68,7 +68,7 @@ pub struct JsonApi<'v> { query: RootSchema, migrate: Option, sudo: Option, - responses: HashMap, + responses: BTreeMap, } impl JsonApi<'_> { From f469c1fa0fe9fdc287485dec05f30a02cf2bb6ac Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 21 Jun 2022 21:25:51 +0200 Subject: [PATCH 026/344] schema: raise IDL test coverage --- packages/schema/tests/idl.rs | 86 +++++++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 7 deletions(-) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index f427c2b29..141a2fb72 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,7 +1,9 @@ -use cosmwasm_schema::{schema_for, Api}; +use std::collections::HashMap; + +use cosmwasm_schema::{schema_for, Api, IDL_VERSION}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use tempfile::tempfile; +use serde_json::Value; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] pub struct InstantiateMsg { @@ -23,11 +25,61 @@ pub enum QueryMsg { Balance { account: String }, } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum SudoMsg { + SetAdmin { new_admin: String }, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct MigrateMsg { + pub admin: String, + pub cap: u128, +} + #[test] -fn test() { - let file = tempfile().unwrap(); +fn test_basic_structure() { + let api_str = Api { + instantiate: schema_for!(InstantiateMsg), + execute: schema_for!(ExecuteMsg), + query: schema_for!(QueryMsg), + migrate: Some(schema_for!(MigrateMsg)), + sudo: Some(schema_for!(SudoMsg)), + responses: [("balance".to_string(), schema_for!(u128))] + .into_iter() + .collect(), + } + .render() + .to_string() + .unwrap(); - let api = Api { + let api_json: HashMap = serde_json::from_str(&api_str).unwrap(); + assert_eq!(api_json.get("idl_version").unwrap(), IDL_VERSION); + assert_eq!( + api_json.get("instantiate").unwrap().get("title").unwrap(), + "InstantiateMsg" + ); + assert_eq!( + api_json.get("execute").unwrap().get("title").unwrap(), + "ExecuteMsg" + ); + assert_eq!( + api_json.get("query").unwrap().get("title").unwrap(), + "QueryMsg" + ); + assert_eq!( + api_json.get("migrate").unwrap().get("title").unwrap(), + "MigrateMsg" + ); + assert_eq!( + api_json.get("sudo").unwrap().get("title").unwrap(), + "SudoMsg" + ); +} + +#[test] +fn test_query_responses() { + let api_str = Api { instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), @@ -37,6 +89,26 @@ fn test() { .into_iter() .collect(), } - .render(); - let _api = serde_json::to_writer_pretty(file, &api).unwrap(); + .render() + .to_string() + .unwrap(); + + let api: Value = serde_json::from_str(&api_str).unwrap(); + let queries = api + .get("query") + .unwrap() + .get("oneOf") + .unwrap() + .as_array() + .unwrap(); + + // Find the "balance" query in the queries schema + assert_eq!(queries.len(), 1); + assert_eq!( + queries[0].get("required").unwrap().get(0).unwrap(), + "balance" + ); + + // Find the "balance" query in responses + api.get("responses").unwrap().get("balance").unwrap(); } From fe0ca8256f8ced58c5b27f705d463f8964bd2048 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 22 Jun 2022 20:40:06 +0200 Subject: [PATCH 027/344] schema: include contract meta in IDL --- contracts/hackatom/examples/schema.rs | 3 +++ contracts/hackatom/schema/api.json | 2 ++ packages/schema/src/idl.rs | 6 ++++++ packages/schema/tests/idl.rs | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index a306dd8c3..327021822 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -31,6 +31,9 @@ fn main() { // The new IDL let path = out_dir.join("api.json"); let api = Api { + contract_name: "hackatom".to_string(), + // TODO: this version should really be acquired dynamically somehow + contract_version: "0.0.0".to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/api.json index 0b918d7cb..e24563123 100644 --- a/contracts/hackatom/schema/api.json +++ b/contracts/hackatom/schema/api.json @@ -1,4 +1,6 @@ { + "contract_name": "hackatom", + "contract_version": "0.0.0", "idl_version": "0.1.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index d0465935c..975379b4d 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -14,6 +14,8 @@ pub const IDL_VERSION: &str = "0.1.0"; /// Rust representation of a contract's API. pub struct Api { + pub contract_name: String, + pub contract_version: String, pub instantiate: RootSchema, pub execute: RootSchema, pub query: RootSchema, @@ -26,6 +28,8 @@ pub struct Api { impl Api { pub fn render(self) -> JsonApi<'static> { let mut json_api = JsonApi { + contract_name: self.contract_name, + contract_version: self.contract_version, idl_version: IDL_VERSION, instantiate: self.instantiate, execute: self.execute, @@ -62,6 +66,8 @@ impl Api { /// A JSON representation of a contract's API. #[derive(serde::Serialize)] pub struct JsonApi<'v> { + contract_name: String, + contract_version: String, idl_version: &'v str, instantiate: RootSchema, execute: RootSchema, diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 141a2fb72..069080a3f 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -40,6 +40,8 @@ pub struct MigrateMsg { #[test] fn test_basic_structure() { let api_str = Api { + contract_name: "test".to_string(), + contract_version: "0.1.0".to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), @@ -55,6 +57,8 @@ fn test_basic_structure() { let api_json: HashMap = serde_json::from_str(&api_str).unwrap(); assert_eq!(api_json.get("idl_version").unwrap(), IDL_VERSION); + assert_eq!(api_json.get("contract_name").unwrap(), "test"); + assert_eq!(api_json.get("contract_version").unwrap(), "0.1.0"); assert_eq!( api_json.get("instantiate").unwrap().get("title").unwrap(), "InstantiateMsg" @@ -80,6 +84,8 @@ fn test_basic_structure() { #[test] fn test_query_responses() { let api_str = Api { + contract_name: "test".to_string(), + contract_version: "0.1.0".to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), From b8757a2bd089845bc27581530d9471b1abed335a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 22 Jun 2022 21:28:51 +0200 Subject: [PATCH 028/344] hackatom: provide contract name and version in schema --- contracts/hackatom/examples/schema.rs | 5 +++-- contracts/hackatom/src/contract.rs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 327021822..404690a7d 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -4,6 +4,7 @@ use std::fs::{create_dir_all, write}; use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api}; use cosmwasm_std::{AllBalanceResponse, BalanceResponse}; +use hackatom::contract::{CONTRACT_NAME, CONTRACT_VERSION}; use hackatom::msg::{ ExecuteMsg, InstantiateMsg, IntResponse, MigrateMsg, QueryMsg, RecurseResponse, SudoMsg, VerifierResponse, @@ -31,9 +32,9 @@ fn main() { // The new IDL let path = out_dir.join("api.json"); let api = Api { - contract_name: "hackatom".to_string(), + contract_name: CONTRACT_NAME.to_string(), // TODO: this version should really be acquired dynamically somehow - contract_version: "0.0.0".to_string(), + contract_version: CONTRACT_VERSION.to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), diff --git a/contracts/hackatom/src/contract.rs b/contracts/hackatom/src/contract.rs index 9bc34efe7..910f1d49d 100644 --- a/contracts/hackatom/src/contract.rs +++ b/contracts/hackatom/src/contract.rs @@ -13,6 +13,9 @@ use crate::msg::{ }; use crate::state::{State, CONFIG_KEY}; +pub const CONTRACT_NAME: &str = env!("CARGO_PKG_NAME"); +pub const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + #[entry_point] pub fn instantiate( deps: DepsMut, From 293b68e2e5effa65576b3a44d1ee48aa21dbad7b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 22 Jun 2022 22:43:30 +0200 Subject: [PATCH 029/344] hackatom: deny unknown fields for all msgs and responses --- contracts/hackatom/schema/api.json | 55 +++++++++++++------ contracts/hackatom/schema/execute_msg.json | 27 ++++++--- .../hackatom/schema/instantiate_msg.json | 3 +- contracts/hackatom/schema/migrate_msg.json | 3 +- contracts/hackatom/schema/query_msg.json | 12 ++-- contracts/hackatom/schema/sudo_msg.json | 3 +- .../hackatom/schema/verifier_response.json | 3 +- contracts/hackatom/src/msg.rs | 11 +++- 8 files changed, 79 insertions(+), 38 deletions(-) diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/api.json index e24563123..42a165eea 100644 --- a/contracts/hackatom/schema/api.json +++ b/contracts/hackatom/schema/api.json @@ -17,7 +17,8 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -31,7 +32,8 @@ ], "properties": { "release": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -62,7 +64,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -75,7 +78,8 @@ ], "properties": { "cpu_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -88,7 +92,8 @@ ], "properties": { "storage_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -101,7 +106,8 @@ ], "properties": { "memory_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -114,7 +120,8 @@ ], "properties": { "message_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -137,7 +144,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -150,7 +158,8 @@ ], "properties": { "panic": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -163,7 +172,8 @@ ], "properties": { "user_errors_in_api_calls": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -182,7 +192,8 @@ ], "properties": { "verifier": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -203,7 +214,8 @@ "address": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -232,7 +244,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -245,7 +258,8 @@ ], "properties": { "get_int": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -264,7 +278,8 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false }, "sudo": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -293,7 +308,8 @@ "recipient": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -335,7 +351,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false }, "other_balance": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -392,6 +409,7 @@ ] } }, + "additionalProperties": false, "definitions": { "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", @@ -410,7 +428,8 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false } } } diff --git a/contracts/hackatom/schema/execute_msg.json b/contracts/hackatom/schema/execute_msg.json index c7cc50e61..0bddc48c7 100644 --- a/contracts/hackatom/schema/execute_msg.json +++ b/contracts/hackatom/schema/execute_msg.json @@ -10,7 +10,8 @@ ], "properties": { "release": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -41,7 +42,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -54,7 +56,8 @@ ], "properties": { "cpu_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -67,7 +70,8 @@ ], "properties": { "storage_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -80,7 +84,8 @@ ], "properties": { "memory_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -93,7 +98,8 @@ ], "properties": { "message_loop": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -116,7 +122,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -129,7 +136,8 @@ ], "properties": { "panic": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -142,7 +150,8 @@ ], "properties": { "user_errors_in_api_calls": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/hackatom/schema/instantiate_msg.json b/contracts/hackatom/schema/instantiate_msg.json index 7f844a506..8639103d3 100644 --- a/contracts/hackatom/schema/instantiate_msg.json +++ b/contracts/hackatom/schema/instantiate_msg.json @@ -13,5 +13,6 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false } diff --git a/contracts/hackatom/schema/migrate_msg.json b/contracts/hackatom/schema/migrate_msg.json index dbdad8fec..2696e3ac2 100644 --- a/contracts/hackatom/schema/migrate_msg.json +++ b/contracts/hackatom/schema/migrate_msg.json @@ -10,5 +10,6 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false } diff --git a/contracts/hackatom/schema/query_msg.json b/contracts/hackatom/schema/query_msg.json index 43679b015..dfd58202b 100644 --- a/contracts/hackatom/schema/query_msg.json +++ b/contracts/hackatom/schema/query_msg.json @@ -10,7 +10,8 @@ ], "properties": { "verifier": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -31,7 +32,8 @@ "address": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -60,7 +62,8 @@ "format": "uint32", "minimum": 0.0 } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -73,7 +76,8 @@ ], "properties": { "get_int": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/hackatom/schema/sudo_msg.json b/contracts/hackatom/schema/sudo_msg.json index 7220b9a3e..d41253aeb 100644 --- a/contracts/hackatom/schema/sudo_msg.json +++ b/contracts/hackatom/schema/sudo_msg.json @@ -25,7 +25,8 @@ "recipient": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/hackatom/schema/verifier_response.json b/contracts/hackatom/schema/verifier_response.json index 8af8ef368..fb04c86d6 100644 --- a/contracts/hackatom/schema/verifier_response.json +++ b/contracts/hackatom/schema/verifier_response.json @@ -9,5 +9,6 @@ "verifier": { "type": "string" } - } + }, + "additionalProperties": false } diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 402a59c87..560483bb7 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; use cosmwasm_std::{Binary, Coin}; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(deny_unknown_fields)] pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -17,6 +18,7 @@ pub struct InstantiateMsg { /// Note that the contract doesn't enforce permissions here, this is done /// by blockchain logic (in the future by blockchain governance) #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(deny_unknown_fields)] pub struct MigrateMsg { pub verifier: String, } @@ -25,7 +27,7 @@ pub struct MigrateMsg { /// This is showing how we can expose "admin" functionality than can not be called by /// external users or contracts, but only trusted (native/Go) code in the blockchain #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[serde(deny_unknown_fields, rename_all = "snake_case")] pub enum SudoMsg { StealFunds { recipient: String, @@ -36,7 +38,7 @@ pub enum SudoMsg { // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[serde(deny_unknown_fields, rename_all = "snake_case")] pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. Release {}, @@ -65,7 +67,7 @@ pub enum ExecuteMsg { } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[serde(deny_unknown_fields, rename_all = "snake_case")] pub enum QueryMsg { /// returns a human-readable representation of the verifier /// use to ensure query path works in integration tests @@ -82,17 +84,20 @@ pub enum QueryMsg { } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(deny_unknown_fields)] pub struct VerifierResponse { pub verifier: String, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(deny_unknown_fields)] pub struct RecurseResponse { /// hashed is the result of running sha256 "work+1" times on the contract's human address pub hashed: Binary, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(deny_unknown_fields)] pub struct IntResponse { pub int: u32, } From 7fe23611ef5d2dfd1e9c0fdb47bd4e1bda246e27 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 22 Jun 2022 22:46:26 +0200 Subject: [PATCH 030/344] hackatom: name contract api hackatom.json --- contracts/hackatom/examples/schema.rs | 3 +-- contracts/hackatom/schema/{api.json => hackatom.json} | 0 2 files changed, 1 insertion(+), 2 deletions(-) rename contracts/hackatom/schema/{api.json => hackatom.json} (100%) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 404690a7d..86f770747 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -30,10 +30,9 @@ fn main() { export_schema(&schema_for!(State), &out_dir); // The new IDL - let path = out_dir.join("api.json"); + let path = out_dir.join(format!("{}.json", CONTRACT_NAME)); let api = Api { contract_name: CONTRACT_NAME.to_string(), - // TODO: this version should really be acquired dynamically somehow contract_version: CONTRACT_VERSION.to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), diff --git a/contracts/hackatom/schema/api.json b/contracts/hackatom/schema/hackatom.json similarity index 100% rename from contracts/hackatom/schema/api.json rename to contracts/hackatom/schema/hackatom.json From 0cdac4adddd56fc632104f75e1458d047a85cfc2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 22 Jun 2022 23:30:50 +0200 Subject: [PATCH 031/344] schema: mark IDL version 1.0.0 --- contracts/hackatom/schema/hackatom.json | 2 +- packages/schema/src/idl.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json index 42a165eea..f498fe07f 100644 --- a/contracts/hackatom/schema/hackatom.json +++ b/contracts/hackatom/schema/hackatom.json @@ -1,7 +1,7 @@ { "contract_name": "hackatom", "contract_version": "0.0.0", - "idl_version": "0.1.0", + "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 975379b4d..33ccc3f12 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -10,7 +10,7 @@ use thiserror::Error; /// Follows Semantic Versioning 2.0.0: https://semver.org/ /// /// To determine if a change is breaking, assume consumers allow unknown fields. -pub const IDL_VERSION: &str = "0.1.0"; +pub const IDL_VERSION: &str = "1.0.0"; /// Rust representation of a contract's API. pub struct Api { From 94fc07b121e34c6afa3df3a1bccbce98e67d76f3 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 28 Jun 2022 11:30:04 +0200 Subject: [PATCH 032/344] hackatom: remove contract name/version consts --- contracts/hackatom/examples/schema.rs | 10 ++++++---- contracts/hackatom/src/contract.rs | 3 --- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 86f770747..90601fbf6 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -4,7 +4,6 @@ use std::fs::{create_dir_all, write}; use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api}; use cosmwasm_std::{AllBalanceResponse, BalanceResponse}; -use hackatom::contract::{CONTRACT_NAME, CONTRACT_VERSION}; use hackatom::msg::{ ExecuteMsg, InstantiateMsg, IntResponse, MigrateMsg, QueryMsg, RecurseResponse, SudoMsg, VerifierResponse, @@ -29,11 +28,14 @@ fn main() { // state export_schema(&schema_for!(State), &out_dir); + let contract_name = env!("CARGO_PKG_NAME"); + let contract_version = env!("CARGO_PKG_VERSION"); + // The new IDL - let path = out_dir.join(format!("{}.json", CONTRACT_NAME)); + let path = out_dir.join(format!("{}.json", contract_name)); let api = Api { - contract_name: CONTRACT_NAME.to_string(), - contract_version: CONTRACT_VERSION.to_string(), + contract_name: contract_name.to_string(), + contract_version: contract_version.to_string(), instantiate: schema_for!(InstantiateMsg), execute: schema_for!(ExecuteMsg), query: schema_for!(QueryMsg), diff --git a/contracts/hackatom/src/contract.rs b/contracts/hackatom/src/contract.rs index 910f1d49d..9bc34efe7 100644 --- a/contracts/hackatom/src/contract.rs +++ b/contracts/hackatom/src/contract.rs @@ -13,9 +13,6 @@ use crate::msg::{ }; use crate::state::{State, CONFIG_KEY}; -pub const CONTRACT_NAME: &str = env!("CARGO_PKG_NAME"); -pub const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); - #[entry_point] pub fn instantiate( deps: DepsMut, From 100fb501e1edeaf5bb625a0581ad096c00fc7f17 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 28 Jun 2022 11:35:09 +0200 Subject: [PATCH 033/344] schema: make execute and query msgs optional --- contracts/hackatom/examples/schema.rs | 4 ++-- packages/schema/src/idl.rs | 20 ++++++++++++-------- packages/schema/tests/idl.rs | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 90601fbf6..238de16b6 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -37,8 +37,8 @@ fn main() { contract_name: contract_name.to_string(), contract_version: contract_version.to_string(), instantiate: schema_for!(InstantiateMsg), - execute: schema_for!(ExecuteMsg), - query: schema_for!(QueryMsg), + execute: Some(schema_for!(ExecuteMsg)), + query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), responses: [ diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 33ccc3f12..5b2b98118 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -17,8 +17,8 @@ pub struct Api { pub contract_name: String, pub contract_version: String, pub instantiate: RootSchema, - pub execute: RootSchema, - pub query: RootSchema, + pub execute: Option, + pub query: Option, pub migrate: Option, pub sudo: Option, /// A mapping of query variants to response types @@ -42,11 +42,15 @@ impl Api { if let Some(metadata) = &mut json_api.instantiate.schema.metadata { metadata.title = Some("InstantiateMsg".to_string()); } - if let Some(metadata) = &mut json_api.execute.schema.metadata { - metadata.title = Some("ExecuteMsg".to_string()); + if let Some(execute) = &mut json_api.execute { + if let Some(metadata) = &mut execute.schema.metadata { + metadata.title = Some("ExecuteMsg".to_string()); + } } - if let Some(metadata) = &mut json_api.query.schema.metadata { - metadata.title = Some("QueryMsg".to_string()); + if let Some(query) = &mut json_api.query { + if let Some(metadata) = &mut query.schema.metadata { + metadata.title = Some("QueryMsg".to_string()); + } } if let Some(migrate) = &mut json_api.migrate { if let Some(metadata) = &mut migrate.schema.metadata { @@ -70,8 +74,8 @@ pub struct JsonApi<'v> { contract_version: String, idl_version: &'v str, instantiate: RootSchema, - execute: RootSchema, - query: RootSchema, + execute: Option, + query: Option, migrate: Option, sudo: Option, responses: BTreeMap, diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 069080a3f..71253ef4b 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -43,8 +43,8 @@ fn test_basic_structure() { contract_name: "test".to_string(), contract_version: "0.1.0".to_string(), instantiate: schema_for!(InstantiateMsg), - execute: schema_for!(ExecuteMsg), - query: schema_for!(QueryMsg), + execute: Some(schema_for!(ExecuteMsg)), + query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), responses: [("balance".to_string(), schema_for!(u128))] @@ -87,8 +87,8 @@ fn test_query_responses() { contract_name: "test".to_string(), contract_version: "0.1.0".to_string(), instantiate: schema_for!(InstantiateMsg), - execute: schema_for!(ExecuteMsg), - query: schema_for!(QueryMsg), + execute: Some(schema_for!(ExecuteMsg)), + query: Some(schema_for!(QueryMsg)), migrate: None, sudo: None, responses: [("balance".to_string(), schema_for!(u128))] From 4a238892d14aa86459f773cfcd25c1d0616c1bab Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 28 Jun 2022 11:37:12 +0200 Subject: [PATCH 034/344] schema: remove lifetime param from JsonApi --- packages/schema/src/idl.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 5b2b98118..470217954 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -26,11 +26,11 @@ pub struct Api { } impl Api { - pub fn render(self) -> JsonApi<'static> { + pub fn render(self) -> JsonApi { let mut json_api = JsonApi { contract_name: self.contract_name, contract_version: self.contract_version, - idl_version: IDL_VERSION, + idl_version: IDL_VERSION.to_string(), instantiate: self.instantiate, execute: self.execute, query: self.query, @@ -69,10 +69,10 @@ impl Api { /// A JSON representation of a contract's API. #[derive(serde::Serialize)] -pub struct JsonApi<'v> { +pub struct JsonApi { contract_name: String, contract_version: String, - idl_version: &'v str, + idl_version: String, instantiate: RootSchema, execute: Option, query: Option, @@ -81,7 +81,7 @@ pub struct JsonApi<'v> { responses: BTreeMap, } -impl JsonApi<'_> { +impl JsonApi { pub fn to_string(&self) -> Result { serde_json::to_string_pretty(&self).map_err(Into::into) } From 867eb3dec5ac49d5760a645df95d3bced557fb4d Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 28 Jun 2022 12:03:13 +0200 Subject: [PATCH 035/344] hackatom: style --- contracts/hackatom/examples/schema.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 238de16b6..245f5be2c 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::env::current_dir; use std::fs::{create_dir_all, write}; @@ -41,14 +42,12 @@ fn main() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: [ + responses: BTreeMap::from([ ("verifier".to_string(), schema_for!(VerifierResponse)), ("other_balance".to_string(), schema_for!(AllBalanceResponse)), ("recurse".to_string(), schema_for!(RecurseResponse)), ("get_int".to_string(), schema_for!(IntResponse)), - ] - .into_iter() - .collect(), + ]), } .render(); let json = api.to_string().unwrap(); From 0bc87c943c6f9d394b1a6c28ffe53e08ae63e2a8 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Tue, 28 Jun 2022 22:28:27 +0200 Subject: [PATCH 036/344] Decimal: Implement rem/rem_assign --- packages/std/src/math/decimal.rs | 58 +++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 47de1baf4..ec83efbdf 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -3,7 +3,7 @@ use schemars::JsonSchema; use serde::{de, ser, Deserialize, Deserializer, Serialize}; use std::cmp::Ordering; use std::fmt::{self, Write}; -use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; +use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Rem, RemAssign, Sub, SubAssign}; use std::str::FromStr; use thiserror::Error; @@ -481,6 +481,26 @@ impl DivAssign for Decimal { } } +impl Rem for Decimal { + type Output = Self; + + /// # Panics + /// + /// This operation will panic if `rhs` is zero + #[inline] + fn rem(self, rhs: Self) -> Self { + Self(self.0.rem(rhs.0)) + } +} +forward_ref_binop!(impl Rem, rem for Decimal, Decimal); + +impl RemAssign for Decimal { + fn rem_assign(&mut self, rhs: Decimal) { + *self = *self % rhs; + } +} +forward_ref_op_assign!(impl RemAssign, rem_assign for Decimal, Decimal); + impl std::iter::Sum for Decimal where Self: Add, @@ -1679,4 +1699,40 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + #[allow(clippy::op_ref)] + fn decimal_rem_works() { + // 4.02 % 1.11 = 0.69 + assert_eq!( + Decimal::percent(402) % Decimal::percent(111), + Decimal::percent(69) + ); + + // 15.25 % 4 = 3.25 + assert_eq!( + Decimal::percent(1525) % Decimal::percent(400), + Decimal::percent(325) + ); + + let a = Decimal::percent(318); + let b = Decimal::percent(317); + let expected = Decimal::percent(1); + assert_eq!(a % b, expected); + assert_eq!(a % &b, expected); + assert_eq!(&a % b, expected); + assert_eq!(&a % &b, expected); + } + + #[test] + fn decimal_rem_assign_works() { + let mut a = Decimal::percent(17673); + a %= Decimal::percent(2362); + assert_eq!(a, Decimal::percent(1139)); // 176.73 % 23.62 = 11.39 + + let mut a = Decimal::percent(4262); + let b = Decimal::percent(1270); + a %= &b; + assert_eq!(a, Decimal::percent(452)); // 42.62 % 12.7 = 4.52 + } } From 37724d6fc39a5c905c054b880e6f586dda770197 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Tue, 28 Jun 2022 22:32:12 +0200 Subject: [PATCH 037/344] Decimal256: Implement rem/rem_assign --- packages/std/src/math/decimal256.rs | 58 ++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 4b76f0721..aee0015a9 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -3,7 +3,7 @@ use schemars::JsonSchema; use serde::{de, ser, Deserialize, Deserializer, Serialize}; use std::cmp::Ordering; use std::fmt::{self, Write}; -use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; +use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Rem, RemAssign, Sub, SubAssign}; use std::str::FromStr; use thiserror::Error; @@ -505,6 +505,26 @@ impl DivAssign for Decimal256 { } } +impl Rem for Decimal256 { + type Output = Self; + + /// # Panics + /// + /// This operation will panic if `rhs` is zero + #[inline] + fn rem(self, rhs: Self) -> Self { + Self(self.0.rem(rhs.0)) + } +} +forward_ref_binop!(impl Rem, rem for Decimal256, Decimal256); + +impl RemAssign for Decimal256 { + fn rem_assign(&mut self, rhs: Decimal256) { + *self = *self % rhs; + } +} +forward_ref_op_assign!(impl RemAssign, rem_assign for Decimal256, Decimal256); + impl std::iter::Sum for Decimal256 where Self: Add, @@ -1825,4 +1845,40 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + #[allow(clippy::op_ref)] + fn decimal256_rem_works() { + // 4.02 % 1.11 = 0.69 + assert_eq!( + Decimal256::percent(402) % Decimal256::percent(111), + Decimal256::percent(69) + ); + + // 15.25 % 4 = 3.25 + assert_eq!( + Decimal256::percent(1525) % Decimal256::percent(400), + Decimal256::percent(325) + ); + + let a = Decimal256::percent(318); + let b = Decimal256::percent(317); + let expected = Decimal256::percent(1); + assert_eq!(a % b, expected); + assert_eq!(a % &b, expected); + assert_eq!(&a % b, expected); + assert_eq!(&a % &b, expected); + } + + #[test] + fn decimal_rem_assign_works() { + let mut a = Decimal256::percent(17673); + a %= Decimal256::percent(2362); + assert_eq!(a, Decimal256::percent(1139)); // 176.73 % 23.62 = 11.39 + + let mut a = Decimal256::percent(4262); + let b = Decimal256::percent(1270); + a %= &b; + assert_eq!(a, Decimal256::percent(452)); // 42.62 % 12.7 = 4.52 + } } From 33faa6cefc5029156b13db96cfd3c77e062b473b Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Tue, 28 Jun 2022 22:33:04 +0200 Subject: [PATCH 038/344] Remove AllImplDecimal --- packages/std/src/math/mod.rs | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/packages/std/src/math/mod.rs b/packages/std/src/math/mod.rs index 031999934..706d23005 100644 --- a/packages/std/src/math/mod.rs +++ b/packages/std/src/math/mod.rs @@ -54,37 +54,6 @@ mod tests { impl AllImpl<'_> for Uint128 {} impl AllImpl<'_> for Uint256 {} impl AllImpl<'_> for Uint512 {} - - // TODO: When all implementations are done, extra trait can be removed and - // unified with AllImpl - trait AllImplDecimal<'a>: - Add - + Add<&'a Self> - + AddAssign - + AddAssign<&'a Self> - + Sub - + Sub<&'a Self> - + SubAssign - + SubAssign<&'a Self> - + Mul - + Mul<&'a Self> - + MulAssign - + MulAssign<&'a Self> - + Div - + Div<&'a Self> - + DivAssign - + DivAssign<&'a Self> - // + Rem - // + Rem<&'a Self> - // + RemAssign - // + RemAssign<&'a Self> - + Sized - + Copy - where - Self: 'a, - { - } - - impl AllImplDecimal<'_> for Decimal {} - impl AllImplDecimal<'_> for Decimal256 {} + impl AllImpl<'_> for Decimal {} + impl AllImpl<'_> for Decimal256 {} } From 82a457ca2df52950b739df0ff014005ab042dd12 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Tue, 28 Jun 2022 22:40:03 +0200 Subject: [PATCH 039/344] Decimal/256: Tests for Rem panicking at division by zero --- packages/std/src/math/decimal.rs | 6 ++++++ packages/std/src/math/decimal256.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index ec83efbdf..ed3284b09 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1735,4 +1735,10 @@ mod tests { a %= &b; assert_eq!(a, Decimal::percent(452)); // 42.62 % 12.7 = 4.52 } + + #[test] + #[should_panic(expected = "divisor of zero")] + fn decimal_rem_panics_for_zero() { + let _ = Decimal::percent(777) % Decimal::zero(); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index aee0015a9..e98ed8fea 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -1881,4 +1881,10 @@ mod tests { a %= &b; assert_eq!(a, Decimal256::percent(452)); // 42.62 % 12.7 = 4.52 } + + #[test] + #[should_panic(expected = "division by zero")] + fn decimal256_rem_panics_for_zero() { + let _ = Decimal256::percent(777) % Decimal256::zero(); + } } From d2717a9f7d73d3a43d49ed79a602e4c7750f3247 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Wed, 29 Jun 2022 10:33:49 +0200 Subject: [PATCH 040/344] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a816c2075..a41b566e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to - cosmwasm-std: Add `Uint{64,128,256,512}::abs_diff` and `Decimal{,256}::abs_diff` ([#1334]). - cosmwasm-std: Implement `From for Decimal256`. +- cosmwasm-std: Implement `Rem`/`RemAssign` for `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From 1be774cd68decc25fc68ff6178a144bf92975320 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 10:27:38 +0200 Subject: [PATCH 041/344] schema: add a way to tie queries to responses --- Cargo.lock | 1 + contracts/hackatom/Cargo.toml | 2 +- contracts/hackatom/examples/schema.rs | 17 ++++------------- contracts/hackatom/src/msg.rs | 21 +++++++++++++++++++-- packages/schema/src/idl.rs | 4 ++-- packages/schema/src/lib.rs | 2 ++ packages/schema/src/query_response.rs | 7 +++++++ packages/schema/tests/idl.rs | 8 ++------ 8 files changed, 38 insertions(+), 24 deletions(-) create mode 100644 packages/schema/src/query_response.rs diff --git a/Cargo.lock b/Cargo.lock index 0a2d07d38..ab0f95aae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,6 +853,7 @@ dependencies = [ name = "hackatom" version = "0.0.0" dependencies = [ + "cosmwasm-schema", "cosmwasm-std", "rust-argon2", "schemars", diff --git a/contracts/hackatom/Cargo.toml b/contracts/hackatom/Cargo.toml index 2b91ed130..b5eb85528 100644 --- a/contracts/hackatom/Cargo.toml +++ b/contracts/hackatom/Cargo.toml @@ -31,6 +31,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } rust-argon2 = "0.8" schemars = "0.8.1" @@ -39,6 +40,5 @@ sha2 = "0.9.1" thiserror = "1.0" [dev-dependencies] -cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-storage = { path = "../../packages/storage", default-features = false } cosmwasm-vm = { path = "../../packages/vm", default-features = false } diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 245f5be2c..b5752f796 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,14 +1,10 @@ -use std::collections::BTreeMap; use std::env::current_dir; use std::fs::{create_dir_all, write}; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api}; -use cosmwasm_std::{AllBalanceResponse, BalanceResponse}; +use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api, QueryResponses}; +use cosmwasm_std::BalanceResponse; -use hackatom::msg::{ - ExecuteMsg, InstantiateMsg, IntResponse, MigrateMsg, QueryMsg, RecurseResponse, SudoMsg, - VerifierResponse, -}; +use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg, VerifierResponse}; use hackatom::state::State; fn main() { @@ -42,12 +38,7 @@ fn main() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: BTreeMap::from([ - ("verifier".to_string(), schema_for!(VerifierResponse)), - ("other_balance".to_string(), schema_for!(AllBalanceResponse)), - ("recurse".to_string(), schema_for!(RecurseResponse)), - ("get_int".to_string(), schema_for!(IntResponse)), - ]), + responses: QueryMsg::query_responses(), } .render(); let json = api.to_string().unwrap(); diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 560483bb7..fdab9a646 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -1,7 +1,10 @@ -use schemars::JsonSchema; +use std::collections::BTreeMap; + +use cosmwasm_schema::{schema_for, QueryResponses}; +use schemars::{schema::RootSchema, JsonSchema}; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{Binary, Coin}; +use cosmwasm_std::{AllBalanceResponse, Binary, Coin}; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(deny_unknown_fields)] @@ -83,6 +86,20 @@ pub enum QueryMsg { GetInt {}, } +// TODO: this should really be generated by a nice derive macro +impl QueryResponses for QueryMsg { + fn query_responses() -> BTreeMap<&'static str, RootSchema> { + [ + ("verifier", schema_for!(VerifierResponse)), + ("other_balance", schema_for!(AllBalanceResponse)), + ("recurse", schema_for!(RecurseResponse)), + ("get_int", schema_for!(IntResponse)), + ] + .into_iter() + .collect() + } +} + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(deny_unknown_fields)] pub struct VerifierResponse { diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 470217954..879c37374 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -22,7 +22,7 @@ pub struct Api { pub migrate: Option, pub sudo: Option, /// A mapping of query variants to response types - pub responses: BTreeMap, + pub responses: BTreeMap<&'static str, RootSchema>, } impl Api { @@ -78,7 +78,7 @@ pub struct JsonApi { query: Option, migrate: Option, sudo: Option, - responses: BTreeMap, + responses: BTreeMap<&'static str, RootSchema>, } impl JsonApi { diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index dda1abc71..7d4ef180e 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -1,10 +1,12 @@ mod casing; mod export; mod idl; +mod query_response; mod remove; pub use export::{export_schema, export_schema_with_title}; pub use idl::{Api, IDL_VERSION}; +pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs new file mode 100644 index 000000000..02fecabb1 --- /dev/null +++ b/packages/schema/src/query_response.rs @@ -0,0 +1,7 @@ +use std::collections::BTreeMap; + +use schemars::schema::RootSchema; + +pub trait QueryResponses { + fn query_responses() -> BTreeMap<&'static str, RootSchema>; +} diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 71253ef4b..bde5d8842 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -47,9 +47,7 @@ fn test_basic_structure() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: [("balance".to_string(), schema_for!(u128))] - .into_iter() - .collect(), + responses: [("balance", schema_for!(u128))].into_iter().collect(), } .render() .to_string() @@ -91,9 +89,7 @@ fn test_query_responses() { query: Some(schema_for!(QueryMsg)), migrate: None, sudo: None, - responses: [("balance".to_string(), schema_for!(u128))] - .into_iter() - .collect(), + responses: [("balance", schema_for!(u128))].into_iter().collect(), } .render() .to_string() From f793c2416fd153fe5e88ee978df0373e62ce2565 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 12:37:54 +0200 Subject: [PATCH 042/344] schema: derive macro for QueryResponses --- Cargo.lock | 11 ++++ contracts/hackatom/Cargo.lock | 10 ++++ contracts/hackatom/schema/hackatom.json | 79 +------------------------ contracts/hackatom/src/msg.rs | 26 +++----- packages/schema-derive/Cargo.toml | 19 ++++++ packages/schema-derive/src/lib.rs | 42 +++++++++++++ packages/schema/Cargo.toml | 1 + packages/schema/src/query_response.rs | 2 + 8 files changed, 93 insertions(+), 97 deletions(-) create mode 100644 packages/schema-derive/Cargo.toml create mode 100644 packages/schema-derive/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index ab0f95aae..81c809f50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,6 +287,7 @@ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ "anyhow", + "cosmwasm-schema-derive", "schemars", "semver", "serde", @@ -295,6 +296,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "cosmwasm-schema", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index d63bb8ba3..e9b733959 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -190,12 +190,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json index f498fe07f..c37cf958a 100644 --- a/contracts/hackatom/schema/hackatom.json +++ b/contracts/hackatom/schema/hackatom.json @@ -338,7 +338,7 @@ } }, "responses": { - "get_int": { + "v.ident": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "IntResponse", "type": "object", @@ -353,83 +353,6 @@ } }, "additionalProperties": false - }, - "other_balance": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AllBalanceResponse", - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Returns all non-zero coins held by this account.", - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "recurse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", - "type": "object", - "required": [ - "hashed" - ], - "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } - }, - "verifier": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false } } } diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index fdab9a646..11b49916d 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -1,7 +1,5 @@ -use std::collections::BTreeMap; - -use cosmwasm_schema::{schema_for, QueryResponses}; -use schemars::{schema::RootSchema, JsonSchema}; +use cosmwasm_schema::QueryResponses; +use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use cosmwasm_std::{AllBalanceResponse, Binary, Coin}; @@ -69,37 +67,27 @@ pub enum ExecuteMsg { UserErrorsInApiCalls {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] #[serde(deny_unknown_fields, rename_all = "snake_case")] pub enum QueryMsg { /// returns a human-readable representation of the verifier /// use to ensure query path works in integration tests + #[returns(VerifierResponse)] Verifier {}, /// This returns cosmwasm_std::AllBalanceResponse to demo use of the querier + #[returns(AllBalanceResponse)] OtherBalance { address: String }, /// Recurse will execute a query into itself up to depth-times and return /// Each step of the recursion may perform some extra work to test gas metering /// (`work` rounds of sha256 on contract). /// Now that we have Env, we can auto-calculate the address to recurse into + #[returns(RecurseResponse)] Recurse { depth: u32, work: u32 }, /// GetInt returns a hardcoded u32 value + #[returns(IntResponse)] GetInt {}, } -// TODO: this should really be generated by a nice derive macro -impl QueryResponses for QueryMsg { - fn query_responses() -> BTreeMap<&'static str, RootSchema> { - [ - ("verifier", schema_for!(VerifierResponse)), - ("other_balance", schema_for!(AllBalanceResponse)), - ("recurse", schema_for!(RecurseResponse)), - ("get_int", schema_for!(IntResponse)), - ] - .into_iter() - .collect() - } -} - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(deny_unknown_fields)] pub struct VerifierResponse { diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml new file mode 100644 index 000000000..585deca23 --- /dev/null +++ b/packages/schema-derive/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "cosmwasm-schema-derive" +version = "1.0.0" +author = "Tomasz Kurcz " +edition = "2021" +description = "Derive macros for cosmwasm-schema" +repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" +license = "Apache-2.0" + +[dependencies] +proc-macro2 = "1" +quote = "1" +syn = { version = "1", features = ["full", "printing"] } + +[dev-dependencies] +cosmwasm-schema = { version = "=1.0.0", path = "../schema" } + +[lib] +proc-macro = true diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs new file mode 100644 index 000000000..cb059d4e5 --- /dev/null +++ b/packages/schema-derive/src/lib.rs @@ -0,0 +1,42 @@ +use proc_macro2::TokenStream; +use quote::quote; +use syn::{parse_macro_input, ItemEnum, Type, Variant}; + +/// Extract the query -> response mapping out of an enum variant. +fn parse_query(v: Variant) -> TokenStream { + let query = stringify!(v.ident); + let response_ty: Type = v + .attrs + .iter() + .find(|a| a.path.get_ident().unwrap() == "returns") + .unwrap() + .parse_args() + .unwrap(); + + quote! { + (#query, cosmwasm_schema::schema_for!(#response_ty)) + } +} + +#[proc_macro_derive(QueryResponses, attributes(returns))] +pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + let input = parse_macro_input!(input as ItemEnum); + let ident = input.ident; + + let responses = input.variants.into_iter().map(parse_query); + + let expanded = quote! { + #[automatically_derived] + impl cosmwasm_schema::QueryResponses for #ident { + fn query_responses() -> std::collections::BTreeMap<&'static str, schemars::schema::RootSchema> { + [ + #( #responses, )* + ] + .into_iter() + .collect() + } + } + }; + + proc_macro::TokenStream::from(expanded) +} diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index f26cf38d9..ed4340388 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] +cosmwasm-schema-derive = { version = "=1.0.0", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 02fecabb1..c2c6ccd26 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -2,6 +2,8 @@ use std::collections::BTreeMap; use schemars::schema::RootSchema; +pub use cosmwasm_schema_derive::QueryResponses; + pub trait QueryResponses { fn query_responses() -> BTreeMap<&'static str, RootSchema>; } From 21b3ef383e285acf76c612a04c9de5b1e0ad4c6f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 12:39:20 +0200 Subject: [PATCH 043/344] schema-derive: don't gen trait when compiling to wasm --- packages/schema-derive/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index cb059d4e5..e1dc993d3 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -27,6 +27,7 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok let expanded = quote! { #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { fn query_responses() -> std::collections::BTreeMap<&'static str, schemars::schema::RootSchema> { [ From 27579ed533348df215d7587a3ca8c73cd15d328e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 12:47:13 +0200 Subject: [PATCH 044/344] schema-derive: fix query names in api file --- contracts/hackatom/schema/hackatom.json | 79 ++++++++++++++++++++++++- packages/schema-derive/src/lib.rs | 13 +++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json index c37cf958a..f498fe07f 100644 --- a/contracts/hackatom/schema/hackatom.json +++ b/contracts/hackatom/schema/hackatom.json @@ -338,7 +338,7 @@ } }, "responses": { - "v.ident": { + "get_int": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "IntResponse", "type": "object", @@ -353,6 +353,83 @@ } }, "additionalProperties": false + }, + "other_balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AllBalanceResponse", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Returns all non-zero coins held by this account.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "recurse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RecurseResponse", + "type": "object", + "required": [ + "hashed" + ], + "properties": { + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "verifier": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifierResponse", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + }, + "additionalProperties": false } } } diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index e1dc993d3..b2cd1feec 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -4,7 +4,7 @@ use syn::{parse_macro_input, ItemEnum, Type, Variant}; /// Extract the query -> response mapping out of an enum variant. fn parse_query(v: Variant) -> TokenStream { - let query = stringify!(v.ident); + let query = to_snake_case(&v.ident.to_string()); let response_ty: Type = v .attrs .iter() @@ -18,6 +18,17 @@ fn parse_query(v: Variant) -> TokenStream { } } +fn to_snake_case(input: &str) -> String { + let mut snake = String::new(); + for (i, ch) in input.char_indices() { + if i > 0 && ch.is_uppercase() { + snake.push('_'); + } + snake.push(ch.to_ascii_lowercase()); + } + snake +} + #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); From 1612747e77e2ec0db149383d481bc7dac179de4f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 12:52:35 +0200 Subject: [PATCH 045/344] Update contracts --- contracts/burner/Cargo.lock | 10 ++++++++++ contracts/crypto-verify/Cargo.lock | 10 ++++++++++ contracts/floaty/Cargo.lock | 10 ++++++++++ contracts/ibc-reflect-send/Cargo.lock | 10 ++++++++++ contracts/ibc-reflect/Cargo.lock | 10 ++++++++++ contracts/queue/Cargo.lock | 10 ++++++++++ contracts/reflect/Cargo.lock | 10 ++++++++++ contracts/staking/Cargo.lock | 10 ++++++++++ 8 files changed, 80 insertions(+) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 5ac61e77f..c7b5cf948 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -172,12 +172,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index a90eb3d7e..5c1fede9c 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -174,12 +174,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 7e8c82cdc..834452bdf 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index aeca46ae9..5b9b188ac 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 808e6aa35..90a361830 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index f056c426d..bd2edf8b0 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 2b91e890f..8739c04c7 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index c1ce84f2f..200549bb6 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -161,12 +161,22 @@ dependencies = [ name = "cosmwasm-schema" version = "1.0.0" dependencies = [ + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cosmwasm-std" version = "1.0.0" From 94d1513d6bf0e87e5b1350708a6e687da1ded64e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 15:38:58 +0200 Subject: [PATCH 046/344] update codecov.yaml with schema-derive --- codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/codecov.yml b/codecov.yml index 0351ef073..d87359409 100644 --- a/codecov.yml +++ b/codecov.yml @@ -25,6 +25,7 @@ flags: cosmwasm-schema: paths: - packages/schema/ + - packages/schema-derive/ cosmwasm-std: paths: - packages/std/ From 82d06d90a6a5c35180e23565f7a02edd4078c71d Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 15:39:38 +0200 Subject: [PATCH 047/344] schema-derive: remove unnecessary dep --- Cargo.lock | 1 - packages/schema-derive/Cargo.toml | 3 --- 2 files changed, 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 81c809f50..ef3d6b129 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -300,7 +300,6 @@ dependencies = [ name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema", "proc-macro2", "quote", "syn", diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 585deca23..a14e8abcf 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -12,8 +12,5 @@ proc-macro2 = "1" quote = "1" syn = { version = "1", features = ["full", "printing"] } -[dev-dependencies] -cosmwasm-schema = { version = "=1.0.0", path = "../schema" } - [lib] proc-macro = true From e279d8a480218bc46f048826b7dba3f1dab2b32b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 15:39:47 +0200 Subject: [PATCH 048/344] circleci: build schema-derive --- .circleci/config.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fbee3bed..0b4e3aaa2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ workflows: - arm64 - package_crypto - package_schema + - package_schema_derive - package_std - package_storage - package_vm @@ -186,6 +187,33 @@ jobs: - target/debug/deps key: cargocache-v2-package_schema-rust:1.56.1-{{ checksum "Cargo.lock" }} + package_schema_derive: + docker: + - image: rust:1.56.1 + steps: + - checkout + - run: + name: Version information + command: rustc --version; cargo --version; rustup --version; rustup target list --installed + - restore_cache: + keys: + - cargocache-v2-package_schema_derive-rust:1.56.1-{{ checksum "Cargo.lock" }} + - run: + name: Build + working_directory: ~/project/packages/schema-derive + command: cargo build --locked + - run: + name: Run tests + working_directory: ~/project/packages/schema-derive + command: cargo test --locked + - save_cache: + paths: + - /usr/local/cargo/registry + - target/debug/.fingerprint + - target/debug/build + - target/debug/deps + key: cargocache-v2-package_schema_derive-rust:1.56.1-{{ checksum "Cargo.lock" }} + package_std: docker: - image: rust:1.56.1 From 1a66e1703034a5dbf3e13aa2ff90e4173ae1958f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 27 Jun 2022 15:54:08 +0200 Subject: [PATCH 049/344] schema-derive: add some tests --- packages/schema-derive/src/lib.rs | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index b2cd1feec..010e3c138 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -19,6 +19,7 @@ fn parse_query(v: Variant) -> TokenStream { } fn to_snake_case(input: &str) -> String { + // this was stolen from serde for consistent behavior let mut snake = String::new(); for (i, ch) in input.char_indices() { if i > 0 && ch.is_uppercase() { @@ -52,3 +53,39 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok proc_macro::TokenStream::from(expanded) } + +#[cfg(tests)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn parse_query() { + let variant = parse_quote! { + #[returns(Foo)] + GetFoo {}, + }; + + assert_eq!( + parse_query(variant), + quote! { ("get_foo", cosmwasm_schema::schema_for!(Foo)) } + ); + + let variant = parse_quote! { + #[returns(some_crate::Foo)] + GetFoo {}, + }; + + assert_eq!( + parse_query(variant), + quote! { ("get_foo", cosmwasm_schema::schema_for!(some_crate::Foo)) } + ); + } + + #[test] + fn to_snake_case() { + assert_eq!(to_snake_case("SnakeCase"), "snake_case"); + assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); + } +} From a5605f6b453d7b2ead7d50718d9fedad471d226b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 15:27:31 +0200 Subject: [PATCH 050/344] schema-derive: style Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- packages/schema-derive/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 010e3c138..98c92d100 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -42,11 +42,9 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { fn query_responses() -> std::collections::BTreeMap<&'static str, schemars::schema::RootSchema> { - [ + std::collections::BTreeMap::from([ #( #responses, )* - ] - .into_iter() - .collect() + ]) } } }; From a955db025fd8ed724bc37302a9ee840f72ac6f01 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 15:43:18 +0200 Subject: [PATCH 051/344] schema: owned strings only for simplicity --- packages/schema-derive/src/lib.rs | 4 ++-- packages/schema/src/idl.rs | 4 ++-- packages/schema/src/query_response.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 98c92d100..197a60a0c 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -14,7 +14,7 @@ fn parse_query(v: Variant) -> TokenStream { .unwrap(); quote! { - (#query, cosmwasm_schema::schema_for!(#response_ty)) + (#query.to_string(), cosmwasm_schema::schema_for!(#response_ty)) } } @@ -41,7 +41,7 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { - fn query_responses() -> std::collections::BTreeMap<&'static str, schemars::schema::RootSchema> { + fn query_responses() -> std::collections::BTreeMap { std::collections::BTreeMap::from([ #( #responses, )* ]) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 879c37374..470217954 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -22,7 +22,7 @@ pub struct Api { pub migrate: Option, pub sudo: Option, /// A mapping of query variants to response types - pub responses: BTreeMap<&'static str, RootSchema>, + pub responses: BTreeMap, } impl Api { @@ -78,7 +78,7 @@ pub struct JsonApi { query: Option, migrate: Option, sudo: Option, - responses: BTreeMap<&'static str, RootSchema>, + responses: BTreeMap, } impl JsonApi { diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index c2c6ccd26..482b490b9 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -5,5 +5,5 @@ use schemars::schema::RootSchema; pub use cosmwasm_schema_derive::QueryResponses; pub trait QueryResponses { - fn query_responses() -> BTreeMap<&'static str, RootSchema>; + fn query_responses() -> BTreeMap; } From b495a6ca314d61a86c97b419bd1b17f8e8867cad Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 15:45:54 +0200 Subject: [PATCH 052/344] schema: rename query_responses -> response_schemas --- contracts/hackatom/examples/schema.rs | 2 +- packages/schema-derive/src/lib.rs | 2 +- packages/schema/src/query_response.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index b5752f796..0cdde9a97 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -38,7 +38,7 @@ fn main() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: QueryMsg::query_responses(), + responses: QueryMsg::response_schemas(), } .render(); let json = api.to_string().unwrap(); diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 197a60a0c..73723fc28 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -41,7 +41,7 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { - fn query_responses() -> std::collections::BTreeMap { + fn response_schemas() -> std::collections::BTreeMap { std::collections::BTreeMap::from([ #( #responses, )* ]) diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 482b490b9..cb585af1d 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -5,5 +5,5 @@ use schemars::schema::RootSchema; pub use cosmwasm_schema_derive::QueryResponses; pub trait QueryResponses { - fn query_responses() -> BTreeMap; + fn response_schemas() -> BTreeMap; } From 4a3caa007648e723163dfbe9fd33a6d3e0a66e47 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 15:54:55 +0200 Subject: [PATCH 053/344] schema: update IDL tests --- packages/schema/tests/idl.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index bde5d8842..d2897fbe9 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use cosmwasm_schema::{schema_for, Api, IDL_VERSION}; use schemars::JsonSchema; @@ -47,7 +47,7 @@ fn test_basic_structure() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: [("balance", schema_for!(u128))].into_iter().collect(), + responses: BTreeMap::from([("balance".to_string(), schema_for!(u128))]), } .render() .to_string() @@ -89,7 +89,7 @@ fn test_query_responses() { query: Some(schema_for!(QueryMsg)), migrate: None, sudo: None, - responses: [("balance", schema_for!(u128))].into_iter().collect(), + responses: BTreeMap::from([("balance".to_string(), schema_for!(u128))]), } .render() .to_string() From 17b6308e119813e77367eff4dbd98585eee308db Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 18:46:00 +0200 Subject: [PATCH 054/344] schema-derive: more tests --- Cargo.lock | 14 +++- contracts/hackatom/Cargo.lock | 14 +++- packages/schema-derive/Cargo.toml | 3 +- packages/schema-derive/src/lib.rs | 112 +++++++++++++++++++++++++----- 4 files changed, 124 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef3d6b129..1eb2c8009 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -302,6 +302,7 @@ version = "1.0.0" dependencies = [ "proc-macro2", "quote", + "serde_derive_internals 0.26.0", "syn", ] @@ -1539,7 +1540,7 @@ checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", + "serde_derive_internals 0.25.0", "syn", ] @@ -1633,6 +1634,17 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_json" version = "1.0.81" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index e9b733959..94108cf44 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -203,6 +203,7 @@ version = "1.0.0" dependencies = [ "proc-macro2", "quote", + "serde_derive_internals 0.26.0", "syn", ] @@ -1236,7 +1237,7 @@ checksum = "4a9ea2a613fe4cd7118b2bb101a25d8ae6192e1975179b67b2f17afd11e70ac8" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", + "serde_derive_internals 0.25.0", "syn", ] @@ -1314,6 +1315,17 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_json" version = "1.0.64" diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index a14e8abcf..8c7359e9c 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -10,7 +10,8 @@ license = "Apache-2.0" [dependencies] proc-macro2 = "1" quote = "1" -syn = { version = "1", features = ["full", "printing"] } +serde_derive_internals = "0.26.0" +syn = { version = "1", features = ["full", "printing", "extra-traits"] } [lib] proc-macro = true diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 73723fc28..a6b66af3a 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,9 +1,8 @@ -use proc_macro2::TokenStream; -use quote::quote; -use syn::{parse_macro_input, ItemEnum, Type, Variant}; +use quote::ToTokens; +use syn::{parse_macro_input, parse_quote, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; /// Extract the query -> response mapping out of an enum variant. -fn parse_query(v: Variant) -> TokenStream { +fn parse_query(v: Variant) -> ExprTuple { let query = to_snake_case(&v.ident.to_string()); let response_ty: Type = v .attrs @@ -13,7 +12,7 @@ fn parse_query(v: Variant) -> TokenStream { .parse_args() .unwrap(); - quote! { + parse_quote! { (#query.to_string(), cosmwasm_schema::schema_for!(#response_ty)) } } @@ -33,11 +32,18 @@ fn to_snake_case(input: &str) -> String { #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); + + let expanded = query_responses_derive_impl(input).into_token_stream(); + + proc_macro::TokenStream::from(expanded) +} + +fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let ident = input.ident; let responses = input.variants.into_iter().map(parse_query); - let expanded = quote! { + parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { @@ -47,43 +53,117 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok ]) } } - }; - - proc_macro::TokenStream::from(expanded) + } } -#[cfg(tests)] +#[cfg(test)] mod tests { use syn::parse_quote; use super::*; #[test] - fn parse_query() { + fn happy_path() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + #[returns(SomeType)] + Balance {}, + #[returns(some_crate::AnotherType)] + Supply {}, + } + }; + + assert_eq!( + query_responses_derive_impl(input), + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas() -> std::collections::BTreeMap { + std::collections::BTreeMap::from([ + ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), + ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), + ]) + } + } + } + ); + } + + #[test] + fn parse_query_works() { let variant = parse_quote! { #[returns(Foo)] - GetFoo {}, + GetFoo {} }; assert_eq!( parse_query(variant), - quote! { ("get_foo", cosmwasm_schema::schema_for!(Foo)) } + parse_quote! { + ("get_foo".to_string(), cosmwasm_schema::schema_for!(Foo)) + } ); let variant = parse_quote! { #[returns(some_crate::Foo)] - GetFoo {}, + GetFoo {} }; assert_eq!( parse_query(variant), - quote! { ("get_foo", cosmwasm_schema::schema_for!(some_crate::Foo)) } + parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(some_crate::Foo)) } ); } #[test] - fn to_snake_case() { + fn to_snake_case_works() { assert_eq!(to_snake_case("SnakeCase"), "snake_case"); assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); } + + #[test] + #[should_panic] + fn panic_if_queries_are_not_snake_case1() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + pub enum QueryMsg { + #[returns(SomeType)] + Balance {}, + } + }; + + query_responses_derive_impl(input); + } + + #[test] + #[should_panic] + fn panic_if_queries_are_not_snake_case2() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(deny_unknown_fields)] + pub enum QueryMsg { + #[returns(SomeType)] + Balance {}, + } + }; + + query_responses_derive_impl(input); + } + + #[test] + #[should_panic] + fn panic_if_queries_are_not_snake_case3() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "kebab-case")] + pub enum QueryMsg { + #[returns(SomeType)] + Balance {}, + } + }; + + query_responses_derive_impl(input); + } } From 7faefd3d060530ce4c61bf1a6a18dcbc3e51f1f1 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 19:35:51 +0200 Subject: [PATCH 055/344] schema-derive: verify `rename_all = "snake_case"` is used --- Cargo.lock | 3 +-- packages/schema-derive/Cargo.toml | 2 +- packages/schema-derive/src/lib.rs | 33 +++++++++++++++++++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1eb2c8009..d5051d174 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1637,8 +1637,7 @@ dependencies = [ [[package]] name = "serde_derive_internals" version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +source = "git+https://github.com/uint/serde?branch=expose_rename_rules#ea26d667329a0f95e64311c3433a72ec70e36710" dependencies = [ "proc-macro2", "quote", diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 8c7359e9c..7df8c10be 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0" [dependencies] proc-macro2 = "1" quote = "1" -serde_derive_internals = "0.26.0" +serde_derive_internals = { git = "https://github.com/uint/serde", branch = "expose_rename_rules" } syn = { version = "1", features = ["full", "printing", "extra-traits"] } [lib] diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index a6b66af3a..af2f82c2d 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,5 +1,8 @@ use quote::ToTokens; -use syn::{parse_macro_input, parse_quote, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; +use serde_derive_internals::attr::RenameRule; +use syn::{ + parse_macro_input, parse_quote, DeriveInput, ExprTuple, ItemEnum, ItemImpl, Type, Variant, +}; /// Extract the query -> response mapping out of an enum variant. fn parse_query(v: Variant) -> ExprTuple { @@ -29,6 +32,18 @@ fn to_snake_case(input: &str) -> String { snake } +fn verify_serde_snake_case(input: ItemEnum) -> bool { + let ctx = serde_derive_internals::Ctxt::new(); + let attr = serde_derive_internals::attr::Container::from_ast(&ctx, &DeriveInput::from(input)); + ctx.check().unwrap(); + + let rename_all_rules = attr.rename_all_rules(); + + [rename_all_rules.serialize(), rename_all_rules.deserialize()] + .iter() + .all(|rule| **rule == RenameRule::SnakeCase) +} + #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); @@ -39,6 +54,10 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok } fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { + if !verify_serde_snake_case(input.clone()) { + panic!("queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]"); + } + let ident = input.ident; let responses = input.variants.into_iter().map(parse_query); @@ -124,7 +143,9 @@ mod tests { } #[test] - #[should_panic] + #[should_panic( + expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" + )] fn panic_if_queries_are_not_snake_case1() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] @@ -138,7 +159,9 @@ mod tests { } #[test] - #[should_panic] + #[should_panic( + expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" + )] fn panic_if_queries_are_not_snake_case2() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] @@ -153,7 +176,9 @@ mod tests { } #[test] - #[should_panic] + #[should_panic( + expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" + )] fn panic_if_queries_are_not_snake_case3() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] From aebf8591a2696529e4697827ca8c66d91ed94c09 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 29 Jun 2022 22:16:42 +0200 Subject: [PATCH 056/344] Revert "schema-derive: verify `rename_all = "snake_case"` is used" This reverts commit 7faefd3d060530ce4c61bf1a6a18dcbc3e51f1f1. --- Cargo.lock | 3 ++- packages/schema-derive/Cargo.toml | 2 +- packages/schema-derive/src/lib.rs | 33 ++++--------------------------- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5051d174..1eb2c8009 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1637,7 +1637,8 @@ dependencies = [ [[package]] name = "serde_derive_internals" version = "0.26.0" -source = "git+https://github.com/uint/serde?branch=expose_rename_rules#ea26d667329a0f95e64311c3433a72ec70e36710" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 7df8c10be..8c7359e9c 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0" [dependencies] proc-macro2 = "1" quote = "1" -serde_derive_internals = { git = "https://github.com/uint/serde", branch = "expose_rename_rules" } +serde_derive_internals = "0.26.0" syn = { version = "1", features = ["full", "printing", "extra-traits"] } [lib] diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index af2f82c2d..a6b66af3a 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,8 +1,5 @@ use quote::ToTokens; -use serde_derive_internals::attr::RenameRule; -use syn::{ - parse_macro_input, parse_quote, DeriveInput, ExprTuple, ItemEnum, ItemImpl, Type, Variant, -}; +use syn::{parse_macro_input, parse_quote, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; /// Extract the query -> response mapping out of an enum variant. fn parse_query(v: Variant) -> ExprTuple { @@ -32,18 +29,6 @@ fn to_snake_case(input: &str) -> String { snake } -fn verify_serde_snake_case(input: ItemEnum) -> bool { - let ctx = serde_derive_internals::Ctxt::new(); - let attr = serde_derive_internals::attr::Container::from_ast(&ctx, &DeriveInput::from(input)); - ctx.check().unwrap(); - - let rename_all_rules = attr.rename_all_rules(); - - [rename_all_rules.serialize(), rename_all_rules.deserialize()] - .iter() - .all(|rule| **rule == RenameRule::SnakeCase) -} - #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); @@ -54,10 +39,6 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok } fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { - if !verify_serde_snake_case(input.clone()) { - panic!("queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]"); - } - let ident = input.ident; let responses = input.variants.into_iter().map(parse_query); @@ -143,9 +124,7 @@ mod tests { } #[test] - #[should_panic( - expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" - )] + #[should_panic] fn panic_if_queries_are_not_snake_case1() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] @@ -159,9 +138,7 @@ mod tests { } #[test] - #[should_panic( - expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" - )] + #[should_panic] fn panic_if_queries_are_not_snake_case2() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] @@ -176,9 +153,7 @@ mod tests { } #[test] - #[should_panic( - expected = "queries need to be serialized as snake_case using #[serde(rename_all = \"snake_case\")]" - )] + #[should_panic] fn panic_if_queries_are_not_snake_case3() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] From 7e9ea3d4b321e717c6d6129384d0600575fc6458 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 19:32:33 +0200 Subject: [PATCH 057/344] idl: integrity check for query names in generated JSON --- Cargo.lock | 29 +++++----- contracts/hackatom/Cargo.lock | 27 +++++---- packages/schema-derive/Cargo.toml | 2 +- packages/schema-derive/src/lib.rs | 79 ++++++++------------------- packages/schema/src/query_response.rs | 31 ++++++++++- 5 files changed, 81 insertions(+), 87 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1eb2c8009..c02f3e62b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -296,13 +296,23 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", - "serde_derive_internals 0.26.0", "syn", ] @@ -314,7 +324,7 @@ dependencies = [ "chrono", "cosmwasm-crypto", "cosmwasm-derive", - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "forward_ref", "hex", "hex-literal", @@ -864,7 +874,7 @@ dependencies = [ name = "hackatom" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "rust-argon2", "schemars", @@ -1540,7 +1550,7 @@ checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals 0.25.0", + "serde_derive_internals", "syn", ] @@ -1634,17 +1644,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_json" version = "1.0.81" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 94108cf44..135c9eecc 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -197,13 +197,23 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", - "serde_derive_internals 0.26.0", "syn", ] @@ -681,7 +691,7 @@ dependencies = [ name = "hackatom" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", @@ -1237,7 +1247,7 @@ checksum = "4a9ea2a613fe4cd7118b2bb101a25d8ae6192e1975179b67b2f17afd11e70ac8" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals 0.25.0", + "serde_derive_internals", "syn", ] @@ -1315,17 +1325,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_json" version = "1.0.64" diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 8c7359e9c..89a9b4a2a 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -8,9 +8,9 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] +cosmwasm-schema = "1" proc-macro2 = "1" quote = "1" -serde_derive_internals = "0.26.0" syn = { version = "1", features = ["full", "printing", "extra-traits"] } [lib] diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index a6b66af3a..e279294e0 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,8 +1,8 @@ use quote::ToTokens; -use syn::{parse_macro_input, parse_quote, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; +use syn::{parse_macro_input, parse_quote, Expr, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; /// Extract the query -> response mapping out of an enum variant. -fn parse_query(v: Variant) -> ExprTuple { +fn parse_query(v: Variant) -> (String, Expr) { let query = to_snake_case(&v.ident.to_string()); let response_ty: Type = v .attrs @@ -12,8 +12,15 @@ fn parse_query(v: Variant) -> ExprTuple { .parse_args() .unwrap(); + ( + query, + parse_quote!(cosmwasm_schema::schema_for!(#response_ty)), + ) +} + +fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { parse_quote! { - (#query.to_string(), cosmwasm_schema::schema_for!(#response_ty)) + (#q.to_string(), #r) } } @@ -40,16 +47,20 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let ident = input.ident; - - let responses = input.variants.into_iter().map(parse_query); + let mappings = input.variants.into_iter().map(parse_query); + let mut queries: Vec<_> = mappings.clone().map(|(q, _)| q).collect(); + queries.sort(); + let mappings = mappings.map(parse_tuple); parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { fn response_schemas() -> std::collections::BTreeMap { + Self::check_api_integrity(&[#(#queries),*]); + std::collections::BTreeMap::from([ - #( #responses, )* + #( #mappings, )* ]) } } @@ -68,10 +79,10 @@ mod tests { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] pub enum QueryMsg { - #[returns(SomeType)] - Balance {}, #[returns(some_crate::AnotherType)] Supply {}, + #[returns(SomeType)] + Balance {}, } }; @@ -82,9 +93,11 @@ mod tests { #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for QueryMsg { fn response_schemas() -> std::collections::BTreeMap { + Self::check_api_integrity(&["balance", "supply"]); + std::collections::BTreeMap::from([ - ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), + ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), ]) } } @@ -100,7 +113,7 @@ mod tests { }; assert_eq!( - parse_query(variant), + parse_tuple(parse_query(variant)), parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(Foo)) } @@ -112,7 +125,7 @@ mod tests { }; assert_eq!( - parse_query(variant), + parse_tuple(parse_query(variant)), parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(some_crate::Foo)) } ); } @@ -122,48 +135,4 @@ mod tests { assert_eq!(to_snake_case("SnakeCase"), "snake_case"); assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); } - - #[test] - #[should_panic] - fn panic_if_queries_are_not_snake_case1() { - let input: ItemEnum = parse_quote! { - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] - pub enum QueryMsg { - #[returns(SomeType)] - Balance {}, - } - }; - - query_responses_derive_impl(input); - } - - #[test] - #[should_panic] - fn panic_if_queries_are_not_snake_case2() { - let input: ItemEnum = parse_quote! { - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] - #[serde(deny_unknown_fields)] - pub enum QueryMsg { - #[returns(SomeType)] - Balance {}, - } - }; - - query_responses_derive_impl(input); - } - - #[test] - #[should_panic] - fn panic_if_queries_are_not_snake_case3() { - let input: ItemEnum = parse_quote! { - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] - #[serde(rename_all = "kebab-case")] - pub enum QueryMsg { - #[returns(SomeType)] - Balance {}, - } - }; - - query_responses_derive_impl(input); - } } diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index cb585af1d..527ff4cfe 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -1,9 +1,36 @@ use std::collections::BTreeMap; -use schemars::schema::RootSchema; +use schemars::{schema::RootSchema, JsonSchema}; pub use cosmwasm_schema_derive::QueryResponses; -pub trait QueryResponses { +pub trait QueryResponses: JsonSchema { fn response_schemas() -> BTreeMap; + + /// `generated_queries` is expected to be a sorted slice here! + fn check_api_integrity(generated_queries: &[&str]) { + let schema = crate::schema_for!(Self); + let mut schema_queries: Vec<_> = schema + .schema + .subschemas + .unwrap() + .one_of + .unwrap() + .into_iter() + .map(|s| { + s.into_object() + .object + .unwrap() + .required + .into_iter() + .next() + .unwrap() + }) + .collect(); + schema_queries.sort(); + if schema_queries != generated_queries { + // TODO: errors + panic!("NOES"); + } + } } From ef970e72b8cf2849502fc037b7c5dca161d5a15c Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 19:59:46 +0200 Subject: [PATCH 058/344] contracts: update Cargo.lock --- contracts/burner/Cargo.lock | 13 ++++++++++++- contracts/crypto-verify/Cargo.lock | 13 ++++++++++++- contracts/floaty/Cargo.lock | 13 ++++++++++++- contracts/ibc-reflect-send/Cargo.lock | 13 ++++++++++++- contracts/ibc-reflect/Cargo.lock | 13 ++++++++++++- contracts/queue/Cargo.lock | 13 ++++++++++++- contracts/reflect/Cargo.lock | 13 ++++++++++++- contracts/staking/Cargo.lock | 13 ++++++++++++- 8 files changed, 96 insertions(+), 8 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index c7b5cf948..685840b58 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -92,7 +92,7 @@ checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" name = "burner" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-vm", "schemars", @@ -179,10 +179,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 5c1fede9c..eab5be380 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -181,10 +181,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -386,7 +397,7 @@ dependencies = [ name = "crypto-verify" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 834452bdf..6326c72b7 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -579,7 +590,7 @@ dependencies = [ name = "floaty" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 5b9b188ac..76fb4de1f 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -694,7 +705,7 @@ dependencies = [ name = "ibc-reflect-send" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 90a361830..359587868 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -694,7 +705,7 @@ dependencies = [ name = "ibc-reflect" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index bd2edf8b0..8a8148d9a 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -963,7 +974,7 @@ dependencies = [ name = "queue" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-vm", "schemars", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 8739c04c7..45df1628b 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -1063,7 +1074,7 @@ dependencies = [ name = "reflect" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 200549bb6..05856f2cc 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -168,10 +168,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" +dependencies = [ + "schemars", + "serde_json", +] + [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ + "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -1345,7 +1356,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "staking" version = "0.0.0" dependencies = [ - "cosmwasm-schema", + "cosmwasm-schema 1.0.0", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", From 6a27aaf6cbfba181df7ef3d66aa03cdf998201e0 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 20:14:51 +0200 Subject: [PATCH 059/344] schema-derive: remove unused dep --- Cargo.lock | 15 ++------------- contracts/burner/Cargo.lock | 13 +------------ contracts/crypto-verify/Cargo.lock | 13 +------------ contracts/floaty/Cargo.lock | 13 +------------ contracts/hackatom/Cargo.lock | 13 +------------ contracts/ibc-reflect-send/Cargo.lock | 13 +------------ contracts/ibc-reflect/Cargo.lock | 13 +------------ contracts/queue/Cargo.lock | 13 +------------ contracts/reflect/Cargo.lock | 13 +------------ contracts/staking/Cargo.lock | 13 +------------ packages/schema-derive/Cargo.toml | 1 - 11 files changed, 11 insertions(+), 122 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c02f3e62b..ef3d6b129 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -296,21 +296,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -324,7 +313,7 @@ dependencies = [ "chrono", "cosmwasm-crypto", "cosmwasm-derive", - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "forward_ref", "hex", "hex-literal", @@ -874,7 +863,7 @@ dependencies = [ name = "hackatom" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "rust-argon2", "schemars", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 685840b58..c7b5cf948 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -92,7 +92,7 @@ checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" name = "burner" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-vm", "schemars", @@ -179,21 +179,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index eab5be380..5c1fede9c 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -181,21 +181,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -397,7 +386,7 @@ dependencies = [ name = "crypto-verify" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 6326c72b7..834452bdf 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -590,7 +579,7 @@ dependencies = [ name = "floaty" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 135c9eecc..e9b733959 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -197,21 +197,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -691,7 +680,7 @@ dependencies = [ name = "hackatom" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 76fb4de1f..5b9b188ac 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -705,7 +694,7 @@ dependencies = [ name = "ibc-reflect-send" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 359587868..90a361830 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -705,7 +694,7 @@ dependencies = [ name = "ibc-reflect" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 8a8148d9a..bd2edf8b0 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -974,7 +963,7 @@ dependencies = [ name = "queue" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-vm", "schemars", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 45df1628b..8739c04c7 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -1074,7 +1063,7 @@ dependencies = [ name = "reflect" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 05856f2cc..200549bb6 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -168,21 +168,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772e80bbad231a47a2068812b723a1ff81dd4a0d56c9391ac748177bea3a61da" -dependencies = [ - "schemars", - "serde_json", -] - [[package]] name = "cosmwasm-schema-derive" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "syn", @@ -1356,7 +1345,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "staking" version = "0.0.0" dependencies = [ - "cosmwasm-schema 1.0.0", + "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 89a9b4a2a..904796c4c 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -8,7 +8,6 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema = "1" proc-macro2 = "1" quote = "1" syn = { version = "1", features = ["full", "printing", "extra-traits"] } From 6308461a8cc0d2bbc1054905393be3be55360031 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 20:32:10 +0200 Subject: [PATCH 060/344] schema, schema-derive: refactor --- contracts/hackatom/schema/hackatom.json | 435 ----------------------- contracts/hackatom/schema/query_msg.json | 8 +- packages/schema-derive/src/lib.rs | 8 +- packages/schema/src/query_response.rs | 65 ++-- 4 files changed, 45 insertions(+), 471 deletions(-) delete mode 100644 contracts/hackatom/schema/hackatom.json diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json deleted file mode 100644 index f498fe07f..000000000 --- a/contracts/hackatom/schema/hackatom.json +++ /dev/null @@ -1,435 +0,0 @@ -{ - "contract_name": "hackatom", - "contract_version": "0.0.0", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "beneficiary", - "verifier" - ], - "properties": { - "beneficiary": { - "type": "string" - }, - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - }, - "execute": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", - "type": "object", - "required": [ - "release" - ], - "properties": { - "release": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Hashes some data. Uses CPU and memory, but no external calls.", - "type": "object", - "required": [ - "argon2" - ], - "properties": { - "argon2": { - "type": "object", - "required": [ - "mem_cost", - "time_cost" - ], - "properties": { - "mem_cost": { - "description": "The amount of memory requested (KB).", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "time_cost": { - "description": "The number of passes.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", - "type": "object", - "required": [ - "cpu_loop" - ], - "properties": { - "cpu_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop making storage calls (to test when their limit hits)", - "type": "object", - "required": [ - "storage_loop" - ], - "properties": { - "storage_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop reading and writing memory", - "type": "object", - "required": [ - "memory_loop" - ], - "properties": { - "memory_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop sending message to itself", - "type": "object", - "required": [ - "message_loop" - ], - "properties": { - "message_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocate large amounts of memory without consuming much gas", - "type": "object", - "required": [ - "allocate_large_memory" - ], - "properties": { - "allocate_large_memory": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Trigger a panic to ensure framework handles gracefully", - "type": "object", - "required": [ - "panic" - ], - "properties": { - "panic": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", - "type": "object", - "required": [ - "user_errors_in_api_calls" - ], - "properties": { - "user_errors_in_api_calls": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "query": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", - "type": "object", - "required": [ - "other_balance" - ], - "properties": { - "other_balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "GetInt returns a hardcoded u32 value", - "type": "object", - "required": [ - "get_int" - ], - "properties": { - "get_int": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "migrate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - }, - "sudo": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SudoMsg", - "description": "SudoMsg is only exposed for internal Cosmos SDK modules to call. This is showing how we can expose \"admin\" functionality than can not be called by external users or contracts, but only trusted (native/Go) code in the blockchain", - "oneOf": [ - { - "type": "object", - "required": [ - "steal_funds" - ], - "properties": { - "steal_funds": { - "type": "object", - "required": [ - "amount", - "recipient" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "recipient": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "responses": { - "get_int": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "IntResponse", - "type": "object", - "required": [ - "int" - ], - "properties": { - "int": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "other_balance": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AllBalanceResponse", - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Returns all non-zero coins held by this account.", - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "recurse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", - "type": "object", - "required": [ - "hashed" - ], - "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } - }, - "verifier": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - } - } -} diff --git a/contracts/hackatom/schema/query_msg.json b/contracts/hackatom/schema/query_msg.json index dfd58202b..8d14b2f32 100644 --- a/contracts/hackatom/schema/query_msg.json +++ b/contracts/hackatom/schema/query_msg.json @@ -20,10 +20,10 @@ "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", "type": "object", "required": [ - "other_balance" + "other-balance" ], "properties": { - "other_balance": { + "other-balance": { "type": "object", "required": [ "address" @@ -72,10 +72,10 @@ "description": "GetInt returns a hardcoded u32 value", "type": "object", "required": [ - "get_int" + "get-int" ], "properties": { - "get_int": { + "get-int": { "type": "object", "additionalProperties": false } diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index e279294e0..0201cbc93 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -56,9 +56,7 @@ fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for #ident { - fn response_schemas() -> std::collections::BTreeMap { - Self::check_api_integrity(&[#(#queries),*]); - + fn response_schemas_impl() -> std::collections::BTreeMap { std::collections::BTreeMap::from([ #( #mappings, )* ]) @@ -92,9 +90,7 @@ mod tests { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] impl cosmwasm_schema::QueryResponses for QueryMsg { - fn response_schemas() -> std::collections::BTreeMap { - Self::check_api_integrity(&["balance", "supply"]); - + fn response_schemas_impl() -> std::collections::BTreeMap { std::collections::BTreeMap::from([ ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 527ff4cfe..26b2ed639 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -5,32 +5,45 @@ use schemars::{schema::RootSchema, JsonSchema}; pub use cosmwasm_schema_derive::QueryResponses; pub trait QueryResponses: JsonSchema { - fn response_schemas() -> BTreeMap; - - /// `generated_queries` is expected to be a sorted slice here! - fn check_api_integrity(generated_queries: &[&str]) { - let schema = crate::schema_for!(Self); - let mut schema_queries: Vec<_> = schema - .schema - .subschemas - .unwrap() - .one_of - .unwrap() - .into_iter() - .map(|s| { - s.into_object() - .object - .unwrap() - .required - .into_iter() - .next() - .unwrap() - }) + fn response_schemas() -> BTreeMap { + let response_schemas = Self::response_schemas_impl(); + + let queries: Vec<_> = response_schemas + .keys() + .map(std::borrow::Borrow::borrow) .collect(); - schema_queries.sort(); - if schema_queries != generated_queries { - // TODO: errors - panic!("NOES"); - } + + check_api_integrity::(&queries); + + response_schemas + } + + fn response_schemas_impl() -> BTreeMap; +} + +/// `generated_queries` is expected to be a sorted slice here! +fn check_api_integrity(generated_queries: &[&str]) { + let schema = crate::schema_for!(T); + let mut schema_queries: Vec<_> = schema + .schema + .subschemas + .unwrap() + .one_of + .unwrap() + .into_iter() + .map(|s| { + s.into_object() + .object + .unwrap() + .required + .into_iter() + .next() + .unwrap() + }) + .collect(); + schema_queries.sort(); + if schema_queries != generated_queries { + // TODO: errors + panic!("NOES"); } } From 23e638bb608a50ce0c1de31e6dda2f9cf695f2ba Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 20:55:29 +0200 Subject: [PATCH 061/344] schema: better errors for the integrity check --- contracts/hackatom/examples/schema.rs | 2 +- contracts/hackatom/schema/hackatom.json | 435 +++++++++++++++++++++++ contracts/hackatom/schema/query_msg.json | 8 +- packages/schema/src/query_response.rs | 45 ++- 4 files changed, 474 insertions(+), 16 deletions(-) create mode 100644 contracts/hackatom/schema/hackatom.json diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 0cdde9a97..9cc7d0921 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -38,7 +38,7 @@ fn main() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: QueryMsg::response_schemas(), + responses: QueryMsg::response_schemas().unwrap(), } .render(); let json = api.to_string().unwrap(); diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json new file mode 100644 index 000000000..f498fe07f --- /dev/null +++ b/contracts/hackatom/schema/hackatom.json @@ -0,0 +1,435 @@ +{ + "contract_name": "hackatom", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "beneficiary", + "verifier" + ], + "properties": { + "beneficiary": { + "type": "string" + }, + "verifier": { + "type": "string" + } + }, + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", + "type": "object", + "required": [ + "release" + ], + "properties": { + "release": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Hashes some data. Uses CPU and memory, but no external calls.", + "type": "object", + "required": [ + "argon2" + ], + "properties": { + "argon2": { + "type": "object", + "required": [ + "mem_cost", + "time_cost" + ], + "properties": { + "mem_cost": { + "description": "The amount of memory requested (KB).", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "time_cost": { + "description": "The number of passes.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", + "type": "object", + "required": [ + "cpu_loop" + ], + "properties": { + "cpu_loop": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop making storage calls (to test when their limit hits)", + "type": "object", + "required": [ + "storage_loop" + ], + "properties": { + "storage_loop": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop reading and writing memory", + "type": "object", + "required": [ + "memory_loop" + ], + "properties": { + "memory_loop": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Infinite loop sending message to itself", + "type": "object", + "required": [ + "message_loop" + ], + "properties": { + "message_loop": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Allocate large amounts of memory without consuming much gas", + "type": "object", + "required": [ + "allocate_large_memory" + ], + "properties": { + "allocate_large_memory": { + "type": "object", + "required": [ + "pages" + ], + "properties": { + "pages": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Trigger a panic to ensure framework handles gracefully", + "type": "object", + "required": [ + "panic" + ], + "properties": { + "panic": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", + "type": "object", + "required": [ + "user_errors_in_api_calls" + ], + "properties": { + "user_errors_in_api_calls": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", + "type": "object", + "required": [ + "other_balance" + ], + "properties": { + "other_balance": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", + "type": "object", + "required": [ + "recurse" + ], + "properties": { + "recurse": { + "type": "object", + "required": [ + "depth", + "work" + ], + "properties": { + "depth": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "work": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "GetInt returns a hardcoded u32 value", + "type": "object", + "required": [ + "get_int" + ], + "properties": { + "get_int": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + }, + "additionalProperties": false + }, + "sudo": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SudoMsg", + "description": "SudoMsg is only exposed for internal Cosmos SDK modules to call. This is showing how we can expose \"admin\" functionality than can not be called by external users or contracts, but only trusted (native/Go) code in the blockchain", + "oneOf": [ + { + "type": "object", + "required": [ + "steal_funds" + ], + "properties": { + "steal_funds": { + "type": "object", + "required": [ + "amount", + "recipient" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "recipient": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "responses": { + "get_int": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "IntResponse", + "type": "object", + "required": [ + "int" + ], + "properties": { + "int": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "other_balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AllBalanceResponse", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Returns all non-zero coins held by this account.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "recurse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RecurseResponse", + "type": "object", + "required": [ + "hashed" + ], + "properties": { + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "verifier": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifierResponse", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/hackatom/schema/query_msg.json b/contracts/hackatom/schema/query_msg.json index 8d14b2f32..dfd58202b 100644 --- a/contracts/hackatom/schema/query_msg.json +++ b/contracts/hackatom/schema/query_msg.json @@ -20,10 +20,10 @@ "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", "type": "object", "required": [ - "other-balance" + "other_balance" ], "properties": { - "other-balance": { + "other_balance": { "type": "object", "required": [ "address" @@ -72,10 +72,10 @@ "description": "GetInt returns a hardcoded u32 value", "type": "object", "required": [ - "get-int" + "get_int" ], "properties": { - "get-int": { + "get_int": { "type": "object", "additionalProperties": false } diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 26b2ed639..c195e2510 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -1,11 +1,12 @@ use std::collections::BTreeMap; use schemars::{schema::RootSchema, JsonSchema}; +use thiserror::Error; pub use cosmwasm_schema_derive::QueryResponses; pub trait QueryResponses: JsonSchema { - fn response_schemas() -> BTreeMap { + fn response_schemas() -> Result, IntegrityError> { let response_schemas = Self::response_schemas_impl(); let queries: Vec<_> = response_schemas @@ -13,37 +14,59 @@ pub trait QueryResponses: JsonSchema { .map(std::borrow::Borrow::borrow) .collect(); - check_api_integrity::(&queries); + check_api_integrity::(&queries)?; - response_schemas + Ok(response_schemas) } fn response_schemas_impl() -> BTreeMap; } /// `generated_queries` is expected to be a sorted slice here! -fn check_api_integrity(generated_queries: &[&str]) { +fn check_api_integrity( + generated_queries: &[&str], +) -> Result<(), IntegrityError> { let schema = crate::schema_for!(T); + + // something more readable below? + let mut schema_queries: Vec<_> = schema .schema .subschemas - .unwrap() + .ok_or(IntegrityError::InvalidQueryMsgSchema)? .one_of - .unwrap() + .ok_or(IntegrityError::InvalidQueryMsgSchema)? .into_iter() .map(|s| { s.into_object() .object - .unwrap() + .ok_or(IntegrityError::InvalidQueryMsgSchema)? .required .into_iter() .next() - .unwrap() + .ok_or(IntegrityError::InvalidQueryMsgSchema) }) - .collect(); + .collect::>()?; schema_queries.sort(); if schema_queries != generated_queries { - // TODO: errors - panic!("NOES"); + return Err(IntegrityError::InconsistentQueries { + query_msg: schema_queries, + responses: generated_queries.iter().map(ToString::to_string).collect(), + }); } + + Ok(()) +} + +#[derive(Debug, Error)] +pub enum IntegrityError { + #[error("the structure of the QueryMsg schema was unexpected")] + InvalidQueryMsgSchema, + #[error( + "inconsistent queries - QueryMsg schema has {query_msg:?}, but query responses have {responses:?}" + )] + InconsistentQueries { + query_msg: Vec, + responses: Vec, + }, } From 57f20d217ef0f2d5d8fa8fd57841caad2f117f97 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 21:16:36 +0200 Subject: [PATCH 062/344] schema: make `responses` in IDL optional --- contracts/hackatom/examples/schema.rs | 2 +- packages/schema/src/idl.rs | 4 ++-- packages/schema/tests/idl.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index 9cc7d0921..ebb67b6fe 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -38,7 +38,7 @@ fn main() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: QueryMsg::response_schemas().unwrap(), + responses: Some(QueryMsg::response_schemas().unwrap()), } .render(); let json = api.to_string().unwrap(); diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index 470217954..ebfa163c1 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -22,7 +22,7 @@ pub struct Api { pub migrate: Option, pub sudo: Option, /// A mapping of query variants to response types - pub responses: BTreeMap, + pub responses: Option>, } impl Api { @@ -78,7 +78,7 @@ pub struct JsonApi { query: Option, migrate: Option, sudo: Option, - responses: BTreeMap, + responses: Option>, } impl JsonApi { diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index d2897fbe9..fdab94412 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -47,7 +47,7 @@ fn test_basic_structure() { query: Some(schema_for!(QueryMsg)), migrate: Some(schema_for!(MigrateMsg)), sudo: Some(schema_for!(SudoMsg)), - responses: BTreeMap::from([("balance".to_string(), schema_for!(u128))]), + responses: Some(BTreeMap::from([("balance".to_string(), schema_for!(u128))])), } .render() .to_string() @@ -89,7 +89,7 @@ fn test_query_responses() { query: Some(schema_for!(QueryMsg)), migrate: None, sudo: None, - responses: BTreeMap::from([("balance".to_string(), schema_for!(u128))]), + responses: Some(BTreeMap::from([("balance".to_string(), schema_for!(u128))])), } .render() .to_string() From 8ed00f5549a881e9d7761b0337861ee1686f7763 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 23:06:15 +0200 Subject: [PATCH 063/344] schema-derive: introduce generate_api!() --- packages/schema-derive/src/lib.rs | 224 +++++++++++++++++++++++++++++- packages/schema/tests/idl.rs | 1 + 2 files changed, 223 insertions(+), 2 deletions(-) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 0201cbc93..004bee2cb 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,5 +1,11 @@ -use quote::ToTokens; -use syn::{parse_macro_input, parse_quote, Expr, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; +use std::collections::BTreeMap; + +use quote::{quote, ToTokens}; +use syn::{ + parse::{Parse, ParseStream}, + parse_macro_input, parse_quote, Expr, ExprTuple, Ident, ItemEnum, ItemImpl, Token, Type, + Variant, +}; /// Extract the query -> response mapping out of an enum variant. fn parse_query(v: Variant) -> (String, Expr) { @@ -65,6 +71,151 @@ fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { } } +#[proc_macro] +pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + let input = parse_macro_input!(input as KV); + + let expanded = generate_api_impl(input).into_token_stream(); + + proc_macro::TokenStream::from(expanded) +} + +fn generate_api_impl(input: KV) -> Expr { + let mut input = input.0; + + let name = if let Some(name_override) = input.remove(&parse_quote!(name)) { + let name_override = name_override.unwrap_str(); + quote! { + #name_override.to_string() + } + } else { + quote! { + env!("CARGO_PKG_NAME").to_string() + } + }; + + let version = if let Some(version_override) = input.remove(&parse_quote!(version)) { + let version_override = version_override.unwrap_str(); + quote! { + #version_override.to_string() + } + } else { + quote! { + env!("CARGO_PKG_VERSION").to_string() + } + }; + + let instantiate = input + .remove(&parse_quote!(instantiate)) + .unwrap() + .unwrap_type(); + + let execute = match input.remove(&parse_quote!(execute)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let (query, responses) = match input.remove(&parse_quote!(query)) { + Some(ty) => { + let ty = ty.unwrap_type(); + ( + quote! {Some(schema_for!(#ty))}, + quote! { Some(#ty::response_schemas().unwrap()) }, + ) + } + None => (quote! { None }, quote! { None }), + }; + + let migrate = match input.remove(&parse_quote!(migrate)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let sudo = match input.remove(&parse_quote!(sudo)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + parse_quote! { + Api { + contract_name: #name, + contract_version: #version, + instantiate: schema_for!(#instantiate), + execute: #execute, + query: #query, + migrate: #migrate, + sudo: #sudo, + responses: #responses, + } + } +} + +#[derive(Debug)] +enum Value { + Type(syn::Path), + Str(syn::LitStr), +} + +impl Value { + fn unwrap_type(self) -> syn::Path { + if let Self::Type(p) = self { + p + } else { + panic!("expected a type"); + } + } + + fn unwrap_str(self) -> syn::LitStr { + if let Self::Str(s) = self { + s + } else { + panic!("expected a string literal"); + } + } +} + +impl Parse for Value { + fn parse(input: ParseStream) -> syn::parse::Result { + if let Ok(p) = input.parse::() { + Ok(Self::Type(p)) + } else { + Ok(Self::Str(input.parse::()?)) + } + } +} + +#[derive(Debug)] +struct Pair((Ident, Value)); + +impl Parse for Pair { + fn parse(input: ParseStream) -> syn::parse::Result { + let k = input.parse::()?; + input.parse::()?; + let v = input.parse::()?; + + Ok(Self((k, v))) + } +} + +#[derive(Debug)] +struct KV(BTreeMap); + +impl Parse for KV { + fn parse(input: ParseStream) -> syn::parse::Result { + let pairs = input.parse_terminated::(Pair::parse)?; + Ok(Self(pairs.into_iter().map(|p| p.0).collect())) + } +} + #[cfg(test)] mod tests { use syn::parse_quote; @@ -131,4 +282,73 @@ mod tests { assert_eq!(to_snake_case("SnakeCase"), "snake_case"); assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); } + + #[test] + fn generate_api_minimal() { + assert_eq!( + generate_api_impl(parse_quote! { + instantiate: InstantiateMsg, + }), + parse_quote! { + Api { + contract_name: env!("CARGO_PKG_NAME").to_string(), + contract_version: env!("CARGO_PKG_VERSION").to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: None, + query: None, + migrate: None, + sudo: None, + responses: None, + } + } + ); + } + + #[test] + fn generate_api_name_vesion_override() { + assert_eq!( + generate_api_impl(parse_quote! { + name: "foo", + version: "bar", + instantiate: InstantiateMsg, + }), + parse_quote! { + Api { + contract_name: "foo".to_string(), + contract_version: "bar".to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: None, + query: None, + migrate: None, + sudo: None, + responses: None, + } + } + ); + } + + #[test] + fn generate_api_all_msgs() { + assert_eq!( + generate_api_impl(parse_quote! { + instantiate: InstantiateMsg, + execute: ExecuteMsg, + query: QueryMsg, + migrate: MigrateMsg, + sudo: SudoMsg, + }), + parse_quote! { + Api { + contract_name: env!("CARGO_PKG_NAME").to_string(), + contract_version: env!("CARGO_PKG_VERSION").to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: Some(schema_for!(ExecuteMsg)), + query: Some(schema_for!(QueryMsg)), + migrate: Some(schema_for!(MigrateMsg)), + sudo: Some(schema_for!(SudoMsg)), + responses: Some(QueryMsg::response_schemas().unwrap()), + } + } + ); + } } diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index fdab94412..4e8ba42bd 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,6 +1,7 @@ use std::collections::{BTreeMap, HashMap}; use cosmwasm_schema::{schema_for, Api, IDL_VERSION}; +use cosmwasm_schema_derive::generate_api; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; From de786c4a10abe1e00821f56202a3495b7d400f85 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 23:32:48 +0200 Subject: [PATCH 064/344] schema-derive: Cargo.toml fix --- packages/schema-derive/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 904796c4c..bf9b5d01c 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cosmwasm-schema-derive" version = "1.0.0" -author = "Tomasz Kurcz " +authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" From c238af7f47aff1da2625b1c902c6f1fbb3f0da56 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 23:39:08 +0200 Subject: [PATCH 065/344] hackatom: migrate to the generate_api!() macro --- contracts/hackatom/examples/schema.rs | 20 +++++++++----------- packages/schema/src/lib.rs | 1 + 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index ebb67b6fe..e21155115 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,7 +1,9 @@ use std::env::current_dir; use std::fs::{create_dir_all, write}; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for, Api, QueryResponses}; +use cosmwasm_schema::{ + export_schema, generate_api, remove_schemas, schema_for, Api, QueryResponses, +}; use cosmwasm_std::BalanceResponse; use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg, VerifierResponse}; @@ -26,19 +28,15 @@ fn main() { export_schema(&schema_for!(State), &out_dir); let contract_name = env!("CARGO_PKG_NAME"); - let contract_version = env!("CARGO_PKG_VERSION"); // The new IDL let path = out_dir.join(format!("{}.json", contract_name)); - let api = Api { - contract_name: contract_name.to_string(), - contract_version: contract_version.to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: Some(schema_for!(ExecuteMsg)), - query: Some(schema_for!(QueryMsg)), - migrate: Some(schema_for!(MigrateMsg)), - sudo: Some(schema_for!(SudoMsg)), - responses: Some(QueryMsg::response_schemas().unwrap()), + let api = generate_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + sudo: SudoMsg, + migrate: MigrateMsg, } .render(); let json = api.to_string().unwrap(); diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 7d4ef180e..964058346 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,4 +10,5 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports +pub use cosmwasm_schema_derive::generate_api; pub use schemars::schema_for; From 11022aad1aa6928c97378e985baf01e54a8d3367 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 23:42:28 +0200 Subject: [PATCH 066/344] clippy --- packages/schema/tests/idl.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 4e8ba42bd..fdab94412 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,7 +1,6 @@ use std::collections::{BTreeMap, HashMap}; use cosmwasm_schema::{schema_for, Api, IDL_VERSION}; -use cosmwasm_schema_derive::generate_api; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; From 6c8a7e672a7f6956bee58e91a66fd978b7fcf298 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 4 Jul 2022 23:56:13 +0200 Subject: [PATCH 067/344] schema: simplify tests --- packages/schema/tests/idl.rs | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index fdab94412..801d568b1 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,6 +1,6 @@ -use std::collections::{BTreeMap, HashMap}; +use std::collections::HashMap; -use cosmwasm_schema::{schema_for, Api, IDL_VERSION}; +use cosmwasm_schema::{generate_api, schema_for, Api, QueryResponses, IDL_VERSION}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -19,9 +19,10 @@ pub enum ExecuteMsg { Mint { amount: u128 }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] pub enum QueryMsg { + #[returns(u128)] Balance { account: String }, } @@ -39,15 +40,14 @@ pub struct MigrateMsg { #[test] fn test_basic_structure() { - let api_str = Api { - contract_name: "test".to_string(), - contract_version: "0.1.0".to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: Some(schema_for!(ExecuteMsg)), - query: Some(schema_for!(QueryMsg)), - migrate: Some(schema_for!(MigrateMsg)), - sudo: Some(schema_for!(SudoMsg)), - responses: Some(BTreeMap::from([("balance".to_string(), schema_for!(u128))])), + let api_str = generate_api! { + name: "test", + version: "0.1.0", + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + sudo: SudoMsg, + migrate: MigrateMsg, } .render() .to_string() @@ -81,15 +81,9 @@ fn test_basic_structure() { #[test] fn test_query_responses() { - let api_str = Api { - contract_name: "test".to_string(), - contract_version: "0.1.0".to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: Some(schema_for!(ExecuteMsg)), - query: Some(schema_for!(QueryMsg)), - migrate: None, - sudo: None, - responses: Some(BTreeMap::from([("balance".to_string(), schema_for!(u128))])), + let api_str = generate_api! { + instantiate: InstantiateMsg, + query: QueryMsg, } .render() .to_string() From c0e2c07d77f61f2402836466efc1b4511997e884 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 14:42:06 +0200 Subject: [PATCH 068/344] schema: QueryResponse tests --- packages/schema/src/query_response.rs | 76 ++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 13 deletions(-) diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index c195e2510..871cb62d4 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -1,4 +1,4 @@ -use std::collections::BTreeMap; +use std::collections::{BTreeMap, BTreeSet}; use schemars::{schema::RootSchema, JsonSchema}; use thiserror::Error; @@ -9,12 +9,9 @@ pub trait QueryResponses: JsonSchema { fn response_schemas() -> Result, IntegrityError> { let response_schemas = Self::response_schemas_impl(); - let queries: Vec<_> = response_schemas - .keys() - .map(std::borrow::Borrow::borrow) - .collect(); + let queries: BTreeSet<_> = response_schemas.keys().cloned().collect(); - check_api_integrity::(&queries)?; + check_api_integrity::(queries)?; Ok(response_schemas) } @@ -24,13 +21,13 @@ pub trait QueryResponses: JsonSchema { /// `generated_queries` is expected to be a sorted slice here! fn check_api_integrity( - generated_queries: &[&str], + generated_queries: BTreeSet, ) -> Result<(), IntegrityError> { let schema = crate::schema_for!(T); // something more readable below? - let mut schema_queries: Vec<_> = schema + let schema_queries: BTreeSet<_> = schema .schema .subschemas .ok_or(IntegrityError::InvalidQueryMsgSchema)? @@ -47,18 +44,17 @@ fn check_api_integrity( .ok_or(IntegrityError::InvalidQueryMsgSchema) }) .collect::>()?; - schema_queries.sort(); if schema_queries != generated_queries { return Err(IntegrityError::InconsistentQueries { query_msg: schema_queries, - responses: generated_queries.iter().map(ToString::to_string).collect(), + responses: generated_queries, }); } Ok(()) } -#[derive(Debug, Error)] +#[derive(Debug, Error, PartialEq)] pub enum IntegrityError { #[error("the structure of the QueryMsg schema was unexpected")] InvalidQueryMsgSchema, @@ -66,7 +62,61 @@ pub enum IntegrityError { "inconsistent queries - QueryMsg schema has {query_msg:?}, but query responses have {responses:?}" )] InconsistentQueries { - query_msg: Vec, - responses: Vec, + query_msg: BTreeSet, + responses: BTreeSet, }, } + +#[cfg(test)] +mod tests { + use schemars::schema_for; + + use super::*; + + #[derive(Debug, JsonSchema)] + #[serde(rename_all = "snake_case")] + #[allow(dead_code)] + pub enum GoodMsg { + BalanceFor { account: String }, + } + + impl QueryResponses for GoodMsg { + fn response_schemas_impl() -> BTreeMap { + BTreeMap::from([("balance_for".to_string(), schema_for!(u128))]) + } + } + + #[test] + fn good_msg_works() { + let response_schemas = GoodMsg::response_schemas().unwrap(); + assert_eq!( + response_schemas, + BTreeMap::from([("balance_for".to_string(), schema_for!(u128))]) + ); + } + + #[derive(Debug, JsonSchema)] + #[serde(rename_all = "kebab-case")] + #[allow(dead_code)] + pub enum BadMsg { + BalanceFor { account: String }, + } + + impl QueryResponses for BadMsg { + fn response_schemas_impl() -> BTreeMap { + BTreeMap::from([("balance_for".to_string(), schema_for!(u128))]) + } + } + + #[test] + fn bad_msg_fails() { + let err = BadMsg::response_schemas().unwrap_err(); + assert_eq!( + err, + IntegrityError::InconsistentQueries { + query_msg: BTreeSet::from(["balance-for".to_string()]), + responses: BTreeSet::from(["balance_for".to_string()]) + } + ); + } +} From 09c55ad676b3562bf361408621bc7051fd38d02b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 14:54:12 +0200 Subject: [PATCH 069/344] schema-derive: refactor --- packages/schema-derive/src/generate_api.rs | 217 +++++++++++ packages/schema-derive/src/lib.rs | 345 +----------------- packages/schema-derive/src/query_responses.rs | 124 +++++++ 3 files changed, 348 insertions(+), 338 deletions(-) create mode 100644 packages/schema-derive/src/generate_api.rs create mode 100644 packages/schema-derive/src/query_responses.rs diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs new file mode 100644 index 000000000..ec2db4ba5 --- /dev/null +++ b/packages/schema-derive/src/generate_api.rs @@ -0,0 +1,217 @@ +use std::collections::BTreeMap; + +use quote::quote; +use syn::{ + parse::{Parse, ParseStream}, + parse_quote, Expr, Ident, Token, +}; + +pub fn generate_api_impl(input: KV) -> Expr { + let mut input = input.0; + + let name = if let Some(name_override) = input.remove(&parse_quote!(name)) { + let name_override = name_override.unwrap_str(); + quote! { + #name_override.to_string() + } + } else { + quote! { + env!("CARGO_PKG_NAME").to_string() + } + }; + + let version = if let Some(version_override) = input.remove(&parse_quote!(version)) { + let version_override = version_override.unwrap_str(); + quote! { + #version_override.to_string() + } + } else { + quote! { + env!("CARGO_PKG_VERSION").to_string() + } + }; + + let instantiate = input + .remove(&parse_quote!(instantiate)) + .unwrap() + .unwrap_type(); + + let execute = match input.remove(&parse_quote!(execute)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let (query, responses) = match input.remove(&parse_quote!(query)) { + Some(ty) => { + let ty = ty.unwrap_type(); + ( + quote! {Some(schema_for!(#ty))}, + quote! { Some(#ty::response_schemas().unwrap()) }, + ) + } + None => (quote! { None }, quote! { None }), + }; + + let migrate = match input.remove(&parse_quote!(migrate)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let sudo = match input.remove(&parse_quote!(sudo)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + parse_quote! { + Api { + contract_name: #name, + contract_version: #version, + instantiate: schema_for!(#instantiate), + execute: #execute, + query: #query, + migrate: #migrate, + sudo: #sudo, + responses: #responses, + } + } +} + +#[derive(Debug)] +enum Value { + Type(syn::Path), + Str(syn::LitStr), +} + +impl Value { + fn unwrap_type(self) -> syn::Path { + if let Self::Type(p) = self { + p + } else { + panic!("expected a type"); + } + } + + fn unwrap_str(self) -> syn::LitStr { + if let Self::Str(s) = self { + s + } else { + panic!("expected a string literal"); + } + } +} + +impl Parse for Value { + fn parse(input: ParseStream) -> syn::parse::Result { + if let Ok(p) = input.parse::() { + Ok(Self::Type(p)) + } else { + Ok(Self::Str(input.parse::()?)) + } + } +} + +#[derive(Debug)] +struct Pair((Ident, Value)); + +impl Parse for Pair { + fn parse(input: ParseStream) -> syn::parse::Result { + let k = input.parse::()?; + input.parse::()?; + let v = input.parse::()?; + + Ok(Self((k, v))) + } +} + +#[derive(Debug)] +pub struct KV(BTreeMap); + +impl Parse for KV { + fn parse(input: ParseStream) -> syn::parse::Result { + let pairs = input.parse_terminated::(Pair::parse)?; + Ok(Self(pairs.into_iter().map(|p| p.0).collect())) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn generate_api_minimal() { + assert_eq!( + generate_api_impl(parse_quote! { + instantiate: InstantiateMsg, + }), + parse_quote! { + Api { + contract_name: env!("CARGO_PKG_NAME").to_string(), + contract_version: env!("CARGO_PKG_VERSION").to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: None, + query: None, + migrate: None, + sudo: None, + responses: None, + } + } + ); + } + + #[test] + fn generate_api_name_vesion_override() { + assert_eq!( + generate_api_impl(parse_quote! { + name: "foo", + version: "bar", + instantiate: InstantiateMsg, + }), + parse_quote! { + Api { + contract_name: "foo".to_string(), + contract_version: "bar".to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: None, + query: None, + migrate: None, + sudo: None, + responses: None, + } + } + ); + } + + #[test] + fn generate_api_all_msgs() { + assert_eq!( + generate_api_impl(parse_quote! { + instantiate: InstantiateMsg, + execute: ExecuteMsg, + query: QueryMsg, + migrate: MigrateMsg, + sudo: SudoMsg, + }), + parse_quote! { + Api { + contract_name: env!("CARGO_PKG_NAME").to_string(), + contract_version: env!("CARGO_PKG_VERSION").to_string(), + instantiate: schema_for!(InstantiateMsg), + execute: Some(schema_for!(ExecuteMsg)), + query: Some(schema_for!(QueryMsg)), + migrate: Some(schema_for!(MigrateMsg)), + sudo: Some(schema_for!(SudoMsg)), + responses: Some(QueryMsg::response_schemas().unwrap()), + } + } + ); + } +} diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 004bee2cb..d844d9bb1 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,354 +1,23 @@ -use std::collections::BTreeMap; +mod generate_api; +mod query_responses; -use quote::{quote, ToTokens}; -use syn::{ - parse::{Parse, ParseStream}, - parse_macro_input, parse_quote, Expr, ExprTuple, Ident, ItemEnum, ItemImpl, Token, Type, - Variant, -}; - -/// Extract the query -> response mapping out of an enum variant. -fn parse_query(v: Variant) -> (String, Expr) { - let query = to_snake_case(&v.ident.to_string()); - let response_ty: Type = v - .attrs - .iter() - .find(|a| a.path.get_ident().unwrap() == "returns") - .unwrap() - .parse_args() - .unwrap(); - - ( - query, - parse_quote!(cosmwasm_schema::schema_for!(#response_ty)), - ) -} - -fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { - parse_quote! { - (#q.to_string(), #r) - } -} - -fn to_snake_case(input: &str) -> String { - // this was stolen from serde for consistent behavior - let mut snake = String::new(); - for (i, ch) in input.char_indices() { - if i > 0 && ch.is_uppercase() { - snake.push('_'); - } - snake.push(ch.to_ascii_lowercase()); - } - snake -} +use quote::ToTokens; +use syn::{parse_macro_input, ItemEnum}; #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); - let expanded = query_responses_derive_impl(input).into_token_stream(); + let expanded = query_responses::query_responses_derive_impl(input).into_token_stream(); proc_macro::TokenStream::from(expanded) } -fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { - let ident = input.ident; - let mappings = input.variants.into_iter().map(parse_query); - let mut queries: Vec<_> = mappings.clone().map(|(q, _)| q).collect(); - queries.sort(); - let mappings = mappings.map(parse_tuple); - - parse_quote! { - #[automatically_derived] - #[cfg(not(target_arch = "wasm32"))] - impl cosmwasm_schema::QueryResponses for #ident { - fn response_schemas_impl() -> std::collections::BTreeMap { - std::collections::BTreeMap::from([ - #( #mappings, )* - ]) - } - } - } -} - #[proc_macro] pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { - let input = parse_macro_input!(input as KV); + let input = parse_macro_input!(input as generate_api::KV); - let expanded = generate_api_impl(input).into_token_stream(); + let expanded = generate_api::generate_api_impl(input).into_token_stream(); proc_macro::TokenStream::from(expanded) } - -fn generate_api_impl(input: KV) -> Expr { - let mut input = input.0; - - let name = if let Some(name_override) = input.remove(&parse_quote!(name)) { - let name_override = name_override.unwrap_str(); - quote! { - #name_override.to_string() - } - } else { - quote! { - env!("CARGO_PKG_NAME").to_string() - } - }; - - let version = if let Some(version_override) = input.remove(&parse_quote!(version)) { - let version_override = version_override.unwrap_str(); - quote! { - #version_override.to_string() - } - } else { - quote! { - env!("CARGO_PKG_VERSION").to_string() - } - }; - - let instantiate = input - .remove(&parse_quote!(instantiate)) - .unwrap() - .unwrap_type(); - - let execute = match input.remove(&parse_quote!(execute)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} - } - None => quote! { None }, - }; - - let (query, responses) = match input.remove(&parse_quote!(query)) { - Some(ty) => { - let ty = ty.unwrap_type(); - ( - quote! {Some(schema_for!(#ty))}, - quote! { Some(#ty::response_schemas().unwrap()) }, - ) - } - None => (quote! { None }, quote! { None }), - }; - - let migrate = match input.remove(&parse_quote!(migrate)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} - } - None => quote! { None }, - }; - - let sudo = match input.remove(&parse_quote!(sudo)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} - } - None => quote! { None }, - }; - - parse_quote! { - Api { - contract_name: #name, - contract_version: #version, - instantiate: schema_for!(#instantiate), - execute: #execute, - query: #query, - migrate: #migrate, - sudo: #sudo, - responses: #responses, - } - } -} - -#[derive(Debug)] -enum Value { - Type(syn::Path), - Str(syn::LitStr), -} - -impl Value { - fn unwrap_type(self) -> syn::Path { - if let Self::Type(p) = self { - p - } else { - panic!("expected a type"); - } - } - - fn unwrap_str(self) -> syn::LitStr { - if let Self::Str(s) = self { - s - } else { - panic!("expected a string literal"); - } - } -} - -impl Parse for Value { - fn parse(input: ParseStream) -> syn::parse::Result { - if let Ok(p) = input.parse::() { - Ok(Self::Type(p)) - } else { - Ok(Self::Str(input.parse::()?)) - } - } -} - -#[derive(Debug)] -struct Pair((Ident, Value)); - -impl Parse for Pair { - fn parse(input: ParseStream) -> syn::parse::Result { - let k = input.parse::()?; - input.parse::()?; - let v = input.parse::()?; - - Ok(Self((k, v))) - } -} - -#[derive(Debug)] -struct KV(BTreeMap); - -impl Parse for KV { - fn parse(input: ParseStream) -> syn::parse::Result { - let pairs = input.parse_terminated::(Pair::parse)?; - Ok(Self(pairs.into_iter().map(|p| p.0).collect())) - } -} - -#[cfg(test)] -mod tests { - use syn::parse_quote; - - use super::*; - - #[test] - fn happy_path() { - let input: ItemEnum = parse_quote! { - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] - #[serde(rename_all = "snake_case")] - pub enum QueryMsg { - #[returns(some_crate::AnotherType)] - Supply {}, - #[returns(SomeType)] - Balance {}, - } - }; - - assert_eq!( - query_responses_derive_impl(input), - parse_quote! { - #[automatically_derived] - #[cfg(not(target_arch = "wasm32"))] - impl cosmwasm_schema::QueryResponses for QueryMsg { - fn response_schemas_impl() -> std::collections::BTreeMap { - std::collections::BTreeMap::from([ - ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), - ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), - ]) - } - } - } - ); - } - - #[test] - fn parse_query_works() { - let variant = parse_quote! { - #[returns(Foo)] - GetFoo {} - }; - - assert_eq!( - parse_tuple(parse_query(variant)), - parse_quote! { - ("get_foo".to_string(), cosmwasm_schema::schema_for!(Foo)) - } - ); - - let variant = parse_quote! { - #[returns(some_crate::Foo)] - GetFoo {} - }; - - assert_eq!( - parse_tuple(parse_query(variant)), - parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(some_crate::Foo)) } - ); - } - - #[test] - fn to_snake_case_works() { - assert_eq!(to_snake_case("SnakeCase"), "snake_case"); - assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); - } - - #[test] - fn generate_api_minimal() { - assert_eq!( - generate_api_impl(parse_quote! { - instantiate: InstantiateMsg, - }), - parse_quote! { - Api { - contract_name: env!("CARGO_PKG_NAME").to_string(), - contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: None, - query: None, - migrate: None, - sudo: None, - responses: None, - } - } - ); - } - - #[test] - fn generate_api_name_vesion_override() { - assert_eq!( - generate_api_impl(parse_quote! { - name: "foo", - version: "bar", - instantiate: InstantiateMsg, - }), - parse_quote! { - Api { - contract_name: "foo".to_string(), - contract_version: "bar".to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: None, - query: None, - migrate: None, - sudo: None, - responses: None, - } - } - ); - } - - #[test] - fn generate_api_all_msgs() { - assert_eq!( - generate_api_impl(parse_quote! { - instantiate: InstantiateMsg, - execute: ExecuteMsg, - query: QueryMsg, - migrate: MigrateMsg, - sudo: SudoMsg, - }), - parse_quote! { - Api { - contract_name: env!("CARGO_PKG_NAME").to_string(), - contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: Some(schema_for!(ExecuteMsg)), - query: Some(schema_for!(QueryMsg)), - migrate: Some(schema_for!(MigrateMsg)), - sudo: Some(schema_for!(SudoMsg)), - responses: Some(QueryMsg::response_schemas().unwrap()), - } - } - ); - } -} diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs new file mode 100644 index 000000000..973ac7434 --- /dev/null +++ b/packages/schema-derive/src/query_responses.rs @@ -0,0 +1,124 @@ +use syn::{parse_quote, Expr, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; + +pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { + let ident = input.ident; + let mappings = input.variants.into_iter().map(parse_query); + let mut queries: Vec<_> = mappings.clone().map(|(q, _)| q).collect(); + queries.sort(); + let mappings = mappings.map(parse_tuple); + + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl cosmwasm_schema::QueryResponses for #ident { + fn response_schemas_impl() -> std::collections::BTreeMap { + std::collections::BTreeMap::from([ + #( #mappings, )* + ]) + } + } + } +} + +/// Extract the query -> response mapping out of an enum variant. +fn parse_query(v: Variant) -> (String, Expr) { + let query = to_snake_case(&v.ident.to_string()); + let response_ty: Type = v + .attrs + .iter() + .find(|a| a.path.get_ident().unwrap() == "returns") + .unwrap() + .parse_args() + .unwrap(); + + ( + query, + parse_quote!(cosmwasm_schema::schema_for!(#response_ty)), + ) +} + +fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { + parse_quote! { + (#q.to_string(), #r) + } +} + +fn to_snake_case(input: &str) -> String { + // this was stolen from serde for consistent behavior + let mut snake = String::new(); + for (i, ch) in input.char_indices() { + if i > 0 && ch.is_uppercase() { + snake.push('_'); + } + snake.push(ch.to_ascii_lowercase()); + } + snake +} + +#[cfg(test)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn happy_path() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + #[returns(some_crate::AnotherType)] + Supply {}, + #[returns(SomeType)] + Balance {}, + } + }; + + assert_eq!( + query_responses_derive_impl(input), + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> std::collections::BTreeMap { + std::collections::BTreeMap::from([ + ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), + ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), + ]) + } + } + } + ); + } + + #[test] + fn parse_query_works() { + let variant = parse_quote! { + #[returns(Foo)] + GetFoo {} + }; + + assert_eq!( + parse_tuple(parse_query(variant)), + parse_quote! { + ("get_foo".to_string(), cosmwasm_schema::schema_for!(Foo)) + } + ); + + let variant = parse_quote! { + #[returns(some_crate::Foo)] + GetFoo {} + }; + + assert_eq!( + parse_tuple(parse_query(variant)), + parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(some_crate::Foo)) } + ); + } + + #[test] + fn to_snake_case_works() { + assert_eq!(to_snake_case("SnakeCase"), "snake_case"); + assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); + } +} From ba50c97590de393f484ee850f823d8e22fa90755 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 15:24:00 +0200 Subject: [PATCH 070/344] schema: doc comments for proc macros --- packages/schema/src/lib.rs | 31 +++++++++++++++++++++++++++ packages/schema/src/query_response.rs | 23 ++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 964058346..323cf7cf0 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,5 +10,36 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports +/// Generates an [`Api`](schema::Api) for the contract. The body describes the message +/// types exported in the schema and allows setting contract name and version overrides. +/// +/// The only obligatory field is `instantiate` - to set the InstantiateMsg type. +/// +/// # Available fields +/// - `name` - contract name +/// - `version` - contract version +/// - `instantiate` - instantiate msg type +/// - `query` - query msg type +/// - `execute` - execute msg type +/// - `migrate` - migrate msg type +/// - `sudo` - sudo msg type +/// +/// # Example +/// ``` +/// use cosmwasm_schema::{generate_api, Api}; +/// use schemars::{schema_for, JsonSchema}; +/// +/// #[derive(JsonSchema)] +/// struct InstantiateMsg; +/// +/// #[derive(JsonSchema)] +/// struct MigrateMsg; +/// +/// let api = generate_api! { +/// name: "cw20", +/// instantiate: InstantiateMsg, +/// migrate: MigrateMsg, +/// }; +/// ``` pub use cosmwasm_schema_derive::generate_api; pub use schemars::schema_for; diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 871cb62d4..f35570ba5 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -5,6 +5,29 @@ use thiserror::Error; pub use cosmwasm_schema_derive::QueryResponses; +/// A trait for tying QueryMsg variants (different contract queries) to their response types. +/// This is mostly useful for the generated contracted API description when using `cargo schema`. +/// +/// Using the derive macro is the preferred way of implementing this trait. +/// +/// # Example +/// ``` +/// use cosmwasm_schema::QueryResponses; +/// use schemars::JsonSchema; +/// +/// #[derive(JsonSchema)] +/// struct AccountInfo { +/// IcqHandle: String, +/// } +/// +/// #[derive(JsonSchema, QueryResponses)] +/// enum QueryMsg { +/// #[returns(Vec)] +/// Denoms {}, +/// #[returns(AccountInfo)] +/// AccountInfo { account: String }, +/// } +/// ``` pub trait QueryResponses: JsonSchema { fn response_schemas() -> Result, IntegrityError> { let response_schemas = Self::response_schemas_impl(); From 5c89ee91b624b1e3cdc89ab72e8698f801a655c9 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 16:37:17 +0200 Subject: [PATCH 071/344] schema-derive: go nuts with boilerplate removal --- contracts/hackatom/examples/schema.rs | 38 +--- .../hackatom/schema/balance_response.json | 39 ---- contracts/hackatom/schema/execute_msg.json | 160 -------------- .../hackatom/schema/instantiate_msg.json | 18 -- contracts/hackatom/schema/migrate_msg.json | 15 -- contracts/hackatom/schema/query_msg.json | 86 -------- contracts/hackatom/schema/state.json | 27 --- contracts/hackatom/schema/sudo_msg.json | 56 ----- .../hackatom/schema/verifier_response.json | 14 -- packages/schema-derive/src/generate_api.rs | 208 ++++++++++++------ packages/schema-derive/src/lib.rs | 2 +- 11 files changed, 143 insertions(+), 520 deletions(-) delete mode 100644 contracts/hackatom/schema/balance_response.json delete mode 100644 contracts/hackatom/schema/execute_msg.json delete mode 100644 contracts/hackatom/schema/instantiate_msg.json delete mode 100644 contracts/hackatom/schema/migrate_msg.json delete mode 100644 contracts/hackatom/schema/query_msg.json delete mode 100644 contracts/hackatom/schema/state.json delete mode 100644 contracts/hackatom/schema/sudo_msg.json delete mode 100644 contracts/hackatom/schema/verifier_response.json diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index e21155115..c94b58451 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,45 +1,13 @@ -use std::env::current_dir; -use std::fs::{create_dir_all, write}; +use cosmwasm_schema::generate_api; -use cosmwasm_schema::{ - export_schema, generate_api, remove_schemas, schema_for, Api, QueryResponses, -}; -use cosmwasm_std::BalanceResponse; - -use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg, VerifierResponse}; -use hackatom::state::State; +use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - // messages - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(MigrateMsg), &out_dir); - export_schema(&schema_for!(SudoMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); - export_schema(&schema_for!(VerifierResponse), &out_dir); - export_schema(&schema_for!(BalanceResponse), &out_dir); - - // state - export_schema(&schema_for!(State), &out_dir); - - let contract_name = env!("CARGO_PKG_NAME"); - - // The new IDL - let path = out_dir.join(format!("{}.json", contract_name)); - let api = generate_api! { + generate_api! { instantiate: InstantiateMsg, query: QueryMsg, execute: ExecuteMsg, sudo: SudoMsg, migrate: MigrateMsg, } - .render(); - let json = api.to_string().unwrap(); - write(&path, json + "\n").unwrap(); - println!("Exported the full API as {}", path.to_str().unwrap()); } diff --git a/contracts/hackatom/schema/balance_response.json b/contracts/hackatom/schema/balance_response.json deleted file mode 100644 index 4e3b16aa4..000000000 --- a/contracts/hackatom/schema/balance_response.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "BalanceResponse", - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Always returns a Coin with the requested denom. This may be of 0 amount if no such funds.", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - } - }, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/hackatom/schema/execute_msg.json b/contracts/hackatom/schema/execute_msg.json deleted file mode 100644 index 0bddc48c7..000000000 --- a/contracts/hackatom/schema/execute_msg.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", - "type": "object", - "required": [ - "release" - ], - "properties": { - "release": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Hashes some data. Uses CPU and memory, but no external calls.", - "type": "object", - "required": [ - "argon2" - ], - "properties": { - "argon2": { - "type": "object", - "required": [ - "mem_cost", - "time_cost" - ], - "properties": { - "mem_cost": { - "description": "The amount of memory requested (KB).", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "time_cost": { - "description": "The number of passes.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", - "type": "object", - "required": [ - "cpu_loop" - ], - "properties": { - "cpu_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop making storage calls (to test when their limit hits)", - "type": "object", - "required": [ - "storage_loop" - ], - "properties": { - "storage_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop reading and writing memory", - "type": "object", - "required": [ - "memory_loop" - ], - "properties": { - "memory_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop sending message to itself", - "type": "object", - "required": [ - "message_loop" - ], - "properties": { - "message_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocate large amounts of memory without consuming much gas", - "type": "object", - "required": [ - "allocate_large_memory" - ], - "properties": { - "allocate_large_memory": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Trigger a panic to ensure framework handles gracefully", - "type": "object", - "required": [ - "panic" - ], - "properties": { - "panic": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", - "type": "object", - "required": [ - "user_errors_in_api_calls" - ], - "properties": { - "user_errors_in_api_calls": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/hackatom/schema/instantiate_msg.json b/contracts/hackatom/schema/instantiate_msg.json deleted file mode 100644 index 8639103d3..000000000 --- a/contracts/hackatom/schema/instantiate_msg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "beneficiary", - "verifier" - ], - "properties": { - "beneficiary": { - "type": "string" - }, - "verifier": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/hackatom/schema/migrate_msg.json b/contracts/hackatom/schema/migrate_msg.json deleted file mode 100644 index 2696e3ac2..000000000 --- a/contracts/hackatom/schema/migrate_msg.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/hackatom/schema/query_msg.json b/contracts/hackatom/schema/query_msg.json deleted file mode 100644 index dfd58202b..000000000 --- a/contracts/hackatom/schema/query_msg.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", - "type": "object", - "required": [ - "other_balance" - ], - "properties": { - "other_balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "GetInt returns a hardcoded u32 value", - "type": "object", - "required": [ - "get_int" - ], - "properties": { - "get_int": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/hackatom/schema/state.json b/contracts/hackatom/schema/state.json deleted file mode 100644 index 8462e9fb3..000000000 --- a/contracts/hackatom/schema/state.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "State", - "type": "object", - "required": [ - "beneficiary", - "funder", - "verifier" - ], - "properties": { - "beneficiary": { - "$ref": "#/definitions/Addr" - }, - "funder": { - "$ref": "#/definitions/Addr" - }, - "verifier": { - "$ref": "#/definitions/Addr" - } - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - } - } -} diff --git a/contracts/hackatom/schema/sudo_msg.json b/contracts/hackatom/schema/sudo_msg.json deleted file mode 100644 index d41253aeb..000000000 --- a/contracts/hackatom/schema/sudo_msg.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SudoMsg", - "description": "SudoMsg is only exposed for internal Cosmos SDK modules to call. This is showing how we can expose \"admin\" functionality than can not be called by external users or contracts, but only trusted (native/Go) code in the blockchain", - "oneOf": [ - { - "type": "object", - "required": [ - "steal_funds" - ], - "properties": { - "steal_funds": { - "type": "object", - "required": [ - "amount", - "recipient" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "recipient": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/hackatom/schema/verifier_response.json b/contracts/hackatom/schema/verifier_response.json deleted file mode 100644 index fb04c86d6..000000000 --- a/contracts/hackatom/schema/verifier_response.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index ec2db4ba5..03b5a87ec 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -1,80 +1,55 @@ use std::collections::BTreeMap; +use proc_macro2::TokenStream; use quote::quote; use syn::{ parse::{Parse, ParseStream}, - parse_quote, Expr, Ident, Token, + parse_quote, Block, ExprStruct, Ident, Path, Token, }; -pub fn generate_api_impl(input: KV) -> Expr { - let mut input = input.0; +pub fn generate_api_impl(input: Options) -> Block { + let api_object = api_object(&input); + let name = input.name; - let name = if let Some(name_override) = input.remove(&parse_quote!(name)) { - let name_override = name_override.unwrap_str(); - quote! { - #name_override.to_string() - } - } else { - quote! { - env!("CARGO_PKG_NAME").to_string() - } - }; + parse_quote! { + { + use std::env::current_dir; + use std::fs::{create_dir_all, write}; - let version = if let Some(version_override) = input.remove(&parse_quote!(version)) { - let version_override = version_override.unwrap_str(); - quote! { - #version_override.to_string() - } - } else { - quote! { - env!("CARGO_PKG_VERSION").to_string() - } - }; + use cosmwasm_schema::{remove_schemas, schema_for, Api, QueryResponses}; - let instantiate = input - .remove(&parse_quote!(instantiate)) - .unwrap() - .unwrap_type(); + let mut out_dir = current_dir().unwrap(); + out_dir.push("schema"); + create_dir_all(&out_dir).unwrap(); + remove_schemas(&out_dir).unwrap(); - let execute = match input.remove(&parse_quote!(execute)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} - } - None => quote! { None }, - }; - - let (query, responses) = match input.remove(&parse_quote!(query)) { - Some(ty) => { - let ty = ty.unwrap_type(); - ( - quote! {Some(schema_for!(#ty))}, - quote! { Some(#ty::response_schemas().unwrap()) }, - ) - } - None => (quote! { None }, quote! { None }), - }; + let path = out_dir.join(concat!(#name, ".json")); - let migrate = match input.remove(&parse_quote!(migrate)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} - } - None => quote! { None }, - }; + let api = #api_object.render(); - let sudo = match input.remove(&parse_quote!(sudo)) { - Some(ty) => { - let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} + let json = api.to_string().unwrap(); + write(&path, json + "\n").unwrap(); + println!("Exported the full API as {}", path.to_str().unwrap()); } - None => quote! { None }, - }; + } +} + +fn api_object(input: &Options) -> ExprStruct { + let Options { + name, + version, + instantiate, + execute, + query, + migrate, + sudo, + responses, + } = input; parse_quote! { Api { - contract_name: #name, - contract_version: #version, + contract_name: #name.to_string(), + contract_version: #version.to_string(), instantiate: schema_for!(#instantiate), execute: #execute, query: #query, @@ -133,12 +108,98 @@ impl Parse for Pair { } #[derive(Debug)] -pub struct KV(BTreeMap); +pub struct Options { + name: TokenStream, + version: TokenStream, + instantiate: Path, + execute: TokenStream, + query: TokenStream, + migrate: TokenStream, + sudo: TokenStream, + responses: TokenStream, +} -impl Parse for KV { +impl Parse for Options { fn parse(input: ParseStream) -> syn::parse::Result { let pairs = input.parse_terminated::(Pair::parse)?; - Ok(Self(pairs.into_iter().map(|p| p.0).collect())) + let mut map: BTreeMap<_, _> = pairs.into_iter().map(|p| p.0).collect(); + + let name = if let Some(name_override) = map.remove(&parse_quote!(name)) { + let name_override = name_override.unwrap_str(); + quote! { + #name_override + } + } else { + quote! { + env!("CARGO_PKG_NAME") + } + }; + + let version = if let Some(version_override) = map.remove(&parse_quote!(version)) { + let version_override = version_override.unwrap_str(); + quote! { + #version_override + } + } else { + quote! { + env!("CARGO_PKG_VERSION") + } + }; + + let instantiate = map + .remove(&parse_quote!(instantiate)) + .unwrap() + .unwrap_type(); + + let execute = match map.remove(&parse_quote!(execute)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let (query, responses) = match map.remove(&parse_quote!(query)) { + Some(ty) => { + let ty = ty.unwrap_type(); + ( + quote! {Some(schema_for!(#ty))}, + quote! { Some(#ty::response_schemas().unwrap()) }, + ) + } + None => (quote! { None }, quote! { None }), + }; + + let migrate = match map.remove(&parse_quote!(migrate)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + let sudo = match map.remove(&parse_quote!(sudo)) { + Some(ty) => { + let ty = ty.unwrap_type(); + quote! {Some(schema_for!(#ty))} + } + None => quote! { None }, + }; + + if let Some((invalid_option, _)) = map.into_iter().next() { + panic!("unknown generate_api option: {}", invalid_option); + } + + Ok(Self { + name, + version, + instantiate, + execute, + query, + migrate, + sudo, + responses, + }) } } @@ -147,9 +208,9 @@ mod tests { use super::*; #[test] - fn generate_api_minimal() { + fn api_object_minimal() { assert_eq!( - generate_api_impl(parse_quote! { + api_object(&parse_quote! { instantiate: InstantiateMsg, }), parse_quote! { @@ -168,9 +229,9 @@ mod tests { } #[test] - fn generate_api_name_vesion_override() { + fn api_object_name_vesion_override() { assert_eq!( - generate_api_impl(parse_quote! { + api_object(&parse_quote! { name: "foo", version: "bar", instantiate: InstantiateMsg, @@ -191,9 +252,9 @@ mod tests { } #[test] - fn generate_api_all_msgs() { + fn api_object_all_msgs() { assert_eq!( - generate_api_impl(parse_quote! { + api_object(&parse_quote! { instantiate: InstantiateMsg, execute: ExecuteMsg, query: QueryMsg, @@ -214,4 +275,13 @@ mod tests { } ); } + + #[test] + #[should_panic(expected = "unknown generate_api option: asd")] + fn invalid_option() { + let _options: Options = parse_quote! { + instantiate: InstantiateMsg, + asd: Asd, + }; + } } diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index d844d9bb1..b5bc339ca 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -15,7 +15,7 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok #[proc_macro] pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { - let input = parse_macro_input!(input as generate_api::KV); + let input = parse_macro_input!(input as generate_api::Options); let expanded = generate_api::generate_api_impl(input).into_token_stream(); From 3a355073e84da83536c0d9feb9a869878dbab2c1 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 17:05:56 +0200 Subject: [PATCH 072/344] schema-derive: assorted fixes --- packages/schema-derive/src/generate_api.rs | 36 ++++++++++---------- packages/schema-derive/src/lib.rs | 9 +++++ packages/schema/schema/cw20.json | 19 +++++++++++ packages/schema/src/lib.rs | 38 ++++++++++++++++++++-- packages/schema/tests/idl.rs | 6 ++-- 5 files changed, 84 insertions(+), 24 deletions(-) create mode 100644 packages/schema/schema/cw20.json diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index 03b5a87ec..09d6bf81a 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -16,7 +16,7 @@ pub fn generate_api_impl(input: Options) -> Block { use std::env::current_dir; use std::fs::{create_dir_all, write}; - use cosmwasm_schema::{remove_schemas, schema_for, Api, QueryResponses}; + use cosmwasm_schema::{remove_schemas, Api, QueryResponses}; let mut out_dir = current_dir().unwrap(); out_dir.push("schema"); @@ -34,7 +34,7 @@ pub fn generate_api_impl(input: Options) -> Block { } } -fn api_object(input: &Options) -> ExprStruct { +pub fn api_object(input: &Options) -> ExprStruct { let Options { name, version, @@ -47,10 +47,10 @@ fn api_object(input: &Options) -> ExprStruct { } = input; parse_quote! { - Api { + cosmwasm_schema::Api { contract_name: #name.to_string(), contract_version: #version.to_string(), - instantiate: schema_for!(#instantiate), + instantiate: cosmwasm_schema::schema_for!(#instantiate), execute: #execute, query: #query, migrate: #migrate, @@ -154,7 +154,7 @@ impl Parse for Options { let execute = match map.remove(&parse_quote!(execute)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} + quote! {Some(cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -163,7 +163,7 @@ impl Parse for Options { Some(ty) => { let ty = ty.unwrap_type(); ( - quote! {Some(schema_for!(#ty))}, + quote! {Some(cosmwasm_schema::schema_for!(#ty))}, quote! { Some(#ty::response_schemas().unwrap()) }, ) } @@ -173,7 +173,7 @@ impl Parse for Options { let migrate = match map.remove(&parse_quote!(migrate)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} + quote! {Some(cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -181,7 +181,7 @@ impl Parse for Options { let sudo = match map.remove(&parse_quote!(sudo)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(schema_for!(#ty))} + quote! {Some(cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -214,10 +214,10 @@ mod tests { instantiate: InstantiateMsg, }), parse_quote! { - Api { + cosmwasm_schema::Api { contract_name: env!("CARGO_PKG_NAME").to_string(), contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: schema_for!(InstantiateMsg), + instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), execute: None, query: None, migrate: None, @@ -237,10 +237,10 @@ mod tests { instantiate: InstantiateMsg, }), parse_quote! { - Api { + cosmwasm_schema::Api { contract_name: "foo".to_string(), contract_version: "bar".to_string(), - instantiate: schema_for!(InstantiateMsg), + instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), execute: None, query: None, migrate: None, @@ -262,14 +262,14 @@ mod tests { sudo: SudoMsg, }), parse_quote! { - Api { + cosmwasm_schema::Api { contract_name: env!("CARGO_PKG_NAME").to_string(), contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: schema_for!(InstantiateMsg), - execute: Some(schema_for!(ExecuteMsg)), - query: Some(schema_for!(QueryMsg)), - migrate: Some(schema_for!(MigrateMsg)), - sudo: Some(schema_for!(SudoMsg)), + instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), + execute: Some(cosmwasm_schema::schema_for!(ExecuteMsg)), + query: Some(cosmwasm_schema::schema_for!(QueryMsg)), + migrate: Some(cosmwasm_schema::schema_for!(MigrateMsg)), + sudo: Some(cosmwasm_schema::schema_for!(SudoMsg)), responses: Some(QueryMsg::response_schemas().unwrap()), } } diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index b5bc339ca..ff77a3cfd 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -21,3 +21,12 @@ pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { proc_macro::TokenStream::from(expanded) } + +#[proc_macro] +pub fn generate_api_obj(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + let input = parse_macro_input!(input as generate_api::Options); + + let expanded = generate_api::api_object(&input).into_token_stream(); + + proc_macro::TokenStream::from(expanded) +} diff --git a/packages/schema/schema/cw20.json b/packages/schema/schema/cw20.json new file mode 100644 index 000000000..8481724aa --- /dev/null +++ b/packages/schema/schema/cw20.json @@ -0,0 +1,19 @@ +{ + "contract_name": "cw20", + "contract_version": "1.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "null" + }, + "execute": null, + "query": null, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "null" + }, + "sudo": null, + "responses": null +} diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 323cf7cf0..2455167cd 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -26,8 +26,8 @@ pub use remove::remove_schemas; /// /// # Example /// ``` -/// use cosmwasm_schema::{generate_api, Api}; -/// use schemars::{schema_for, JsonSchema}; +/// use cosmwasm_schema::{generate_api}; +/// use schemars::{JsonSchema}; /// /// #[derive(JsonSchema)] /// struct InstantiateMsg; @@ -35,11 +35,43 @@ pub use remove::remove_schemas; /// #[derive(JsonSchema)] /// struct MigrateMsg; /// -/// let api = generate_api! { +/// generate_api! { /// name: "cw20", /// instantiate: InstantiateMsg, /// migrate: MigrateMsg, /// }; /// ``` pub use cosmwasm_schema_derive::generate_api; +/// Generates an [`Api`](schema::Api) for the contract. The body describes the message +/// types exported in the schema and allows setting contract name and version overrides. +/// +/// The only obligatory field is `instantiate` - to set the InstantiateMsg type. +/// +/// # Available fields +/// - `name` - contract name +/// - `version` - contract version +/// - `instantiate` - instantiate msg type +/// - `query` - query msg type +/// - `execute` - execute msg type +/// - `migrate` - migrate msg type +/// - `sudo` - sudo msg type +/// +/// # Example +/// ``` +/// use cosmwasm_schema::{generate_api_obj}; +/// use schemars::{JsonSchema}; +/// +/// #[derive(JsonSchema)] +/// struct InstantiateMsg; +/// +/// #[derive(JsonSchema)] +/// struct MigrateMsg; +/// +/// let api = generate_api_obj! { +/// name: "cw20", +/// instantiate: InstantiateMsg, +/// migrate: MigrateMsg, +/// }.render(); +/// ``` +pub use cosmwasm_schema_derive::generate_api_obj; pub use schemars::schema_for; diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 801d568b1..3f312cd88 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use cosmwasm_schema::{generate_api, schema_for, Api, QueryResponses, IDL_VERSION}; +use cosmwasm_schema::{generate_api_obj, QueryResponses, IDL_VERSION}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -40,7 +40,7 @@ pub struct MigrateMsg { #[test] fn test_basic_structure() { - let api_str = generate_api! { + let api_str = generate_api_obj! { name: "test", version: "0.1.0", instantiate: InstantiateMsg, @@ -81,7 +81,7 @@ fn test_basic_structure() { #[test] fn test_query_responses() { - let api_str = generate_api! { + let api_str = generate_api_obj! { instantiate: InstantiateMsg, query: QueryMsg, } From 998dfbe3dd4336c6951580ffa6e642eb5a0bf887 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 17:13:33 +0200 Subject: [PATCH 073/344] schema: improve proc macro doc comments --- packages/schema/src/lib.rs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 2455167cd..04baf276a 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,19 +10,19 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports -/// Generates an [`Api`](schema::Api) for the contract. The body describes the message -/// types exported in the schema and allows setting contract name and version overrides. +/// Takes care of generating the interface description file for a contract. The body describes +/// the message types included and allows setting contract name and version overrides. /// /// The only obligatory field is `instantiate` - to set the InstantiateMsg type. /// /// # Available fields -/// - `name` - contract name -/// - `version` - contract version +/// - `name` - contract name, crate name by default +/// - `version` - contract version, crate version by default /// - `instantiate` - instantiate msg type -/// - `query` - query msg type -/// - `execute` - execute msg type -/// - `migrate` - migrate msg type -/// - `sudo` - sudo msg type +/// - `query` - query msg type, empty by default +/// - `execute` - execute msg type, empty by default +/// - `migrate` - migrate msg type, empty by default +/// - `sudo` - sudo msg type, empty by default /// /// # Example /// ``` @@ -42,19 +42,13 @@ pub use remove::remove_schemas; /// }; /// ``` pub use cosmwasm_schema_derive::generate_api; -/// Generates an [`Api`](schema::Api) for the contract. The body describes the message +/// Generates an [`Api`](crate::Api) for the contract. The body describes the message /// types exported in the schema and allows setting contract name and version overrides. /// /// The only obligatory field is `instantiate` - to set the InstantiateMsg type. /// /// # Available fields -/// - `name` - contract name -/// - `version` - contract version -/// - `instantiate` - instantiate msg type -/// - `query` - query msg type -/// - `execute` - execute msg type -/// - `migrate` - migrate msg type -/// - `sudo` - sudo msg type +/// See [`generate_api`](crate::generate_api). /// /// # Example /// ``` From 90d8355c11138219fd1ffccb9c7f6f0d63955c0d Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 5 Jul 2022 17:15:27 +0200 Subject: [PATCH 074/344] schema: doc comment style --- packages/schema/src/idl.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/schema/src/idl.rs b/packages/schema/src/idl.rs index ebfa163c1..8297d6f19 100644 --- a/packages/schema/src/idl.rs +++ b/packages/schema/src/idl.rs @@ -7,9 +7,8 @@ use thiserror::Error; /// The version of the CosmWasm IDL. /// -/// Follows Semantic Versioning 2.0.0: https://semver.org/ -/// -/// To determine if a change is breaking, assume consumers allow unknown fields. +/// Follows Semantic Versioning 2.0.0: +// To determine if a change is breaking, assume consumers allow unknown fields and bump accordingly. pub const IDL_VERSION: &str = "1.0.0"; /// Rust representation of a contract's API. From 163a9d7ddc852540d67912f6a9e33516b424f11e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 6 Jul 2022 18:18:56 +0200 Subject: [PATCH 075/344] schema-derive: panic msg tests --- packages/schema-derive/src/query_responses.rs | 37 ++++++++++++++++++- packages/schema/src/query_response.rs | 11 +++++- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 973ac7434..bdffae96d 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -27,9 +27,9 @@ fn parse_query(v: Variant) -> (String, Expr) { .attrs .iter() .find(|a| a.path.get_ident().unwrap() == "returns") - .unwrap() + .unwrap_or_else(|| panic!("missing return type for query: {}", v.ident)) .parse_args() - .unwrap(); + .unwrap_or_else(|_| panic!("return for {} must be a type", v.ident)); ( query, @@ -91,6 +91,39 @@ mod tests { ); } + #[test] + #[should_panic(expected = "missing return type for query: Supply")] + fn missing_return() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + Supply {}, + #[returns(SomeType)] + Balance {}, + } + }; + + query_responses_derive_impl(input); + } + + #[test] + #[should_panic(expected = "return for Supply must be a type")] + fn invalid_return() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + #[returns(1)] + Supply {}, + #[returns(SomeType)] + Balance {}, + } + }; + + query_responses_derive_impl(input); + } + #[test] fn parse_query_works() { let variant = parse_quote! { diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index f35570ba5..29162c169 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -101,11 +101,15 @@ mod tests { #[allow(dead_code)] pub enum GoodMsg { BalanceFor { account: String }, + Supply {}, } impl QueryResponses for GoodMsg { fn response_schemas_impl() -> BTreeMap { - BTreeMap::from([("balance_for".to_string(), schema_for!(u128))]) + BTreeMap::from([ + ("balance_for".to_string(), schema_for!(u128)), + ("supply".to_string(), schema_for!(u128)), + ]) } } @@ -114,7 +118,10 @@ mod tests { let response_schemas = GoodMsg::response_schemas().unwrap(); assert_eq!( response_schemas, - BTreeMap::from([("balance_for".to_string(), schema_for!(u128))]) + BTreeMap::from([ + ("balance_for".to_string(), schema_for!(u128)), + ("supply".to_string(), schema_for!(u128)) + ]) ); } From 15617c79a4871454c058f5782da6cf89fa9f9e86 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 13:43:24 +0200 Subject: [PATCH 076/344] Decimal: Implement missing checked methods --- packages/std/src/math/decimal.rs | 87 +++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index ed3284b09..e91c43809 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -7,8 +7,7 @@ use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Rem, RemAssign, S use std::str::FromStr; use thiserror::Error; -use crate::errors::{CheckedFromRatioError, CheckedMultiplyRatioError, StdError}; -use crate::OverflowError; +use crate::errors::{CheckedFromRatioError, CheckedMultiplyRatioError, StdError, OverflowError, OverflowOperation, DivideByZeroError}; use super::Fraction; use super::Isqrt; @@ -182,6 +181,33 @@ impl Decimal { Self::DECIMAL_PLACES as u32 } + pub fn checked_add(self, other: Self) -> Result { + self.0 + .checked_add(other.0) + .map(Self) + .map_err(|_| OverflowError::new(OverflowOperation::Add, self, other)) + } + + pub fn checked_sub(self, other: Self) -> Result { + self.0 + .checked_sub(other.0) + .map(Self) + .map_err(|_| OverflowError::new(OverflowOperation::Sub, self, other)) + } + + pub fn checked_div(self, other: Self) -> Result { + Decimal::checked_from_ratio(self.numerator(), other.numerator()) + } + + pub fn checked_rem(self, other: Self) -> Result { + self.0 + .checked_rem(other.0) + .map(Self) + .map_err(|_| DivideByZeroError::new(self)) + } + + + /// Multiplies one `Decimal` by another, returning an `OverflowError` if an overflow occurred. pub fn checked_mul(self, other: Self) -> Result { let result_as_uint256 = self.numerator().full_mul(other.numerator()) @@ -1741,4 +1767,61 @@ mod tests { fn decimal_rem_panics_for_zero() { let _ = Decimal::percent(777) % Decimal::zero(); } + + #[test] + fn decimal_checked_methods() { + // checked add + assert_eq!( + Decimal::percent(402).checked_add(Decimal::percent(111)).unwrap(), + Decimal::percent(513) + ); + assert!(matches!( + Decimal::MAX.checked_add(Decimal::percent(1)), + Err(OverflowError { .. }) + )); + + // checked sub + assert_eq!( + Decimal::percent(1111).checked_sub(Decimal::percent(111)).unwrap(), + Decimal::percent(1000) + ); + assert!(matches!( + Decimal::zero().checked_sub(Decimal::percent(1)), + Err(OverflowError { .. }) + )); + + // checked div + assert_eq!( + Decimal::percent(30).checked_div(Decimal::percent(200)).unwrap(), + Decimal::percent(15) + ); + assert_eq!( + Decimal::percent(88).checked_div(Decimal::percent(20)).unwrap(), + Decimal::percent(440) + ); + assert!(matches!( + Decimal::MAX.checked_div(Decimal::zero()), + Err(CheckedFromRatioError::DivideByZero { .. }) + )); + assert!(matches!( + Decimal::MAX.checked_div(Decimal::percent(1)), + Err(CheckedFromRatioError::Overflow { .. }) + )); + + // checked rem + assert_eq!( + Decimal::percent(402).checked_rem(Decimal::percent(111)).unwrap(), + Decimal::percent(69) + ); + assert_eq!( + Decimal::percent(1525).checked_rem(Decimal::percent(400)).unwrap(), + Decimal::percent(325) + ); + assert!(matches!( + Decimal::MAX.checked_rem(Decimal::zero()), + Err(DivideByZeroError { .. }) + )); + } + + } From a459a1b9aaefd4e4a0ba1c850b06a88a38b8f306 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:10:31 +0200 Subject: [PATCH 077/344] Decimal256: Implement missing checked methods --- packages/std/src/math/decimal.rs | 55 +++++++++------- packages/std/src/math/decimal256.rs | 99 ++++++++++++++++++++++++++++- 2 files changed, 130 insertions(+), 24 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index e91c43809..13bc9b808 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -7,7 +7,10 @@ use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Rem, RemAssign, S use std::str::FromStr; use thiserror::Error; -use crate::errors::{CheckedFromRatioError, CheckedMultiplyRatioError, StdError, OverflowError, OverflowOperation, DivideByZeroError}; +use crate::errors::{ + CheckedFromRatioError, CheckedMultiplyRatioError, DivideByZeroError, OverflowError, + OverflowOperation, StdError, +}; use super::Fraction; use super::Isqrt; @@ -195,19 +198,6 @@ impl Decimal { .map_err(|_| OverflowError::new(OverflowOperation::Sub, self, other)) } - pub fn checked_div(self, other: Self) -> Result { - Decimal::checked_from_ratio(self.numerator(), other.numerator()) - } - - pub fn checked_rem(self, other: Self) -> Result { - self.0 - .checked_rem(other.0) - .map(Self) - .map_err(|_| DivideByZeroError::new(self)) - } - - - /// Multiplies one `Decimal` by another, returning an `OverflowError` if an overflow occurred. pub fn checked_mul(self, other: Self) -> Result { let result_as_uint256 = self.numerator().full_mul(other.numerator()) @@ -255,6 +245,17 @@ impl Decimal { }) } + pub fn checked_div(self, other: Self) -> Result { + Decimal::checked_from_ratio(self.numerator(), other.numerator()) + } + + pub fn checked_rem(self, other: Self) -> Result { + self.0 + .checked_rem(other.0) + .map(Self) + .map_err(|_| DivideByZeroError::new(self)) + } + /// Returns the approximate square root as a Decimal. /// /// This should not overflow or panic. @@ -1772,7 +1773,9 @@ mod tests { fn decimal_checked_methods() { // checked add assert_eq!( - Decimal::percent(402).checked_add(Decimal::percent(111)).unwrap(), + Decimal::percent(402) + .checked_add(Decimal::percent(111)) + .unwrap(), Decimal::percent(513) ); assert!(matches!( @@ -1782,7 +1785,9 @@ mod tests { // checked sub assert_eq!( - Decimal::percent(1111).checked_sub(Decimal::percent(111)).unwrap(), + Decimal::percent(1111) + .checked_sub(Decimal::percent(111)) + .unwrap(), Decimal::percent(1000) ); assert!(matches!( @@ -1792,11 +1797,15 @@ mod tests { // checked div assert_eq!( - Decimal::percent(30).checked_div(Decimal::percent(200)).unwrap(), + Decimal::percent(30) + .checked_div(Decimal::percent(200)) + .unwrap(), Decimal::percent(15) ); assert_eq!( - Decimal::percent(88).checked_div(Decimal::percent(20)).unwrap(), + Decimal::percent(88) + .checked_div(Decimal::percent(20)) + .unwrap(), Decimal::percent(440) ); assert!(matches!( @@ -1810,11 +1819,15 @@ mod tests { // checked rem assert_eq!( - Decimal::percent(402).checked_rem(Decimal::percent(111)).unwrap(), + Decimal::percent(402) + .checked_rem(Decimal::percent(111)) + .unwrap(), Decimal::percent(69) ); assert_eq!( - Decimal::percent(1525).checked_rem(Decimal::percent(400)).unwrap(), + Decimal::percent(1525) + .checked_rem(Decimal::percent(400)) + .unwrap(), Decimal::percent(325) ); assert!(matches!( @@ -1822,6 +1835,4 @@ mod tests { Err(DivideByZeroError { .. }) )); } - - } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index e98ed8fea..c0f9005f8 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -7,8 +7,11 @@ use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Rem, RemAssign, S use std::str::FromStr; use thiserror::Error; -use crate::errors::{CheckedFromRatioError, CheckedMultiplyRatioError, StdError}; -use crate::{Decimal, OverflowError, Uint512}; +use crate::errors::{ + CheckedFromRatioError, CheckedMultiplyRatioError, DivideByZeroError, OverflowError, + OverflowOperation, StdError, +}; +use crate::{Decimal, Uint512}; use super::Fraction; use super::Isqrt; @@ -194,6 +197,20 @@ impl Decimal256 { Self::DECIMAL_PLACES as u32 } + pub fn checked_add(self, other: Self) -> Result { + self.0 + .checked_add(other.0) + .map(Self) + .map_err(|_| OverflowError::new(OverflowOperation::Add, self, other)) + } + + pub fn checked_sub(self, other: Self) -> Result { + self.0 + .checked_sub(other.0) + .map(Self) + .map_err(|_| OverflowError::new(OverflowOperation::Sub, self, other)) + } + /// Multiplies one `Decimal256` by another, returning an `OverflowError` if an overflow occurred. pub fn checked_mul(self, other: Self) -> Result { let result_as_uint512 = self.numerator().full_mul(other.numerator()) @@ -241,6 +258,17 @@ impl Decimal256 { }) } + pub fn checked_div(self, other: Self) -> Result { + Decimal256::checked_from_ratio(self.numerator(), other.numerator()) + } + + pub fn checked_rem(self, other: Self) -> Result { + self.0 + .checked_rem(other.0) + .map(Self) + .map_err(|_| DivideByZeroError::new(self)) + } + /// Returns the approximate square root as a Decimal256. /// /// This should not overflow or panic. @@ -1887,4 +1915,71 @@ mod tests { fn decimal256_rem_panics_for_zero() { let _ = Decimal256::percent(777) % Decimal256::zero(); } + + #[test] + fn decimal256_checked_methods() { + // checked add + assert_eq!( + Decimal256::percent(402) + .checked_add(Decimal256::percent(111)) + .unwrap(), + Decimal256::percent(513) + ); + assert!(matches!( + Decimal256::MAX.checked_add(Decimal256::percent(1)), + Err(OverflowError { .. }) + )); + + // checked sub + assert_eq!( + Decimal256::percent(1111) + .checked_sub(Decimal256::percent(111)) + .unwrap(), + Decimal256::percent(1000) + ); + assert!(matches!( + Decimal256::zero().checked_sub(Decimal256::percent(1)), + Err(OverflowError { .. }) + )); + + // checked div + assert_eq!( + Decimal256::percent(30) + .checked_div(Decimal256::percent(200)) + .unwrap(), + Decimal256::percent(15) + ); + assert_eq!( + Decimal256::percent(88) + .checked_div(Decimal256::percent(20)) + .unwrap(), + Decimal256::percent(440) + ); + assert!(matches!( + Decimal256::MAX.checked_div(Decimal256::zero()), + Err(CheckedFromRatioError::DivideByZero { .. }) + )); + assert!(matches!( + Decimal256::MAX.checked_div(Decimal256::percent(1)), + Err(CheckedFromRatioError::Overflow { .. }) + )); + + // checked rem + assert_eq!( + Decimal256::percent(402) + .checked_rem(Decimal256::percent(111)) + .unwrap(), + Decimal256::percent(69) + ); + assert_eq!( + Decimal256::percent(1525) + .checked_rem(Decimal256::percent(400)) + .unwrap(), + Decimal256::percent(325) + ); + assert!(matches!( + Decimal256::MAX.checked_rem(Decimal256::zero()), + Err(DivideByZeroError { .. }) + )); + } } From 681043a994a6b4132e76fe6071a9f020ce25ff05 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:12:02 +0200 Subject: [PATCH 078/344] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a41b566e6..44baac9c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to `Decimal{,256}::abs_diff` ([#1334]). - cosmwasm-std: Implement `From for Decimal256`. - cosmwasm-std: Implement `Rem`/`RemAssign` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `checked_add`/`_sub`/`_div`/`_rem` for + `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From e61703906d37927451d95d8721cc496f044c601d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 11 Jul 2022 11:23:39 +0200 Subject: [PATCH 079/344] Rewrite limit_to_pages to avoid storing 2^32 in u32 --- packages/vm/src/wasm_backend/store.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/vm/src/wasm_backend/store.rs b/packages/vm/src/wasm_backend/store.rs index aebe33b1c..570692b59 100644 --- a/packages/vm/src/wasm_backend/store.rs +++ b/packages/vm/src/wasm_backend/store.rs @@ -18,7 +18,7 @@ use super::limiting_tunables::LimitingTunables; /// is 65536 (2^16) bytes. In WebAssembly version 1, a linear memory can have at /// most 65536 pages, for a total of 2^32 bytes (4 gibibytes). /// https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md -const MAX_WASM_MEMORY: usize = 4 * 1024 * 1024 * 1024; +const MAX_WASM_PAGES: u32 = 65536; fn cost(_operator: &Operator) -> u64 { // A flat fee for each operation @@ -86,12 +86,17 @@ fn make_store_with_engine(engine: &dyn Engine, memory_limit: Option) -> St } fn limit_to_pages(limit: Size) -> Pages { - let capped = std::cmp::min(limit.0, MAX_WASM_MEMORY); // round down to ensure the limit is less than or equal to the config - let pages: u32 = (capped / WASM_PAGE_SIZE) - .try_into() - .expect("Value must be <= 4 GiB/64KiB, i.e. fit in uint32. This is a bug."); - Pages(pages) + let limit_in_pages: usize = limit.0 / WASM_PAGE_SIZE; + + let capped = match u32::try_from(limit_in_pages) { + Ok(x) => std::cmp::min(x, MAX_WASM_PAGES), + // The only case where TryFromIntError can happen is when + // limit_in_pages exceeds the u32 range. In this case it is way + // larger than MAX_WASM_PAGES and needs to be capped. + Err(_too_large) => MAX_WASM_PAGES, + }; + Pages(capped) } #[cfg(test)] @@ -113,10 +118,12 @@ mod tests { assert_eq!(limit_to_pages(Size::kibi(63)), Pages(0)); assert_eq!(limit_to_pages(Size::kibi(64)), Pages(1)); assert_eq!(limit_to_pages(Size::kibi(65)), Pages(1)); + assert_eq!(limit_to_pages(Size(u32::MAX as usize)), Pages(65535)); // caps at 4 GiB assert_eq!(limit_to_pages(Size::gibi(3)), Pages(49152)); assert_eq!(limit_to_pages(Size::gibi(4)), Pages(65536)); assert_eq!(limit_to_pages(Size::gibi(5)), Pages(65536)); + assert_eq!(limit_to_pages(Size(usize::MAX)), Pages(65536)); } #[test] From 88a8f5936ac4ed157221065756c9f7e0f7026856 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 13:02:01 +0200 Subject: [PATCH 080/344] put `schema-derive` in separate codecov flag --- codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/codecov.yml b/codecov.yml index d87359409..ca6f4a47d 100644 --- a/codecov.yml +++ b/codecov.yml @@ -25,6 +25,7 @@ flags: cosmwasm-schema: paths: - packages/schema/ + cosmwasm-schema-derive: - packages/schema-derive/ cosmwasm-std: paths: From ce17cf4ae7050df63f92f96343ee3541866b521a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 13:07:56 +0200 Subject: [PATCH 081/344] schema: rename API generation macros for clarity --- contracts/hackatom/examples/schema.rs | 4 +-- packages/schema-derive/src/generate_api.rs | 12 ++++---- packages/schema-derive/src/lib.rs | 8 ++--- packages/schema/src/lib.rs | 36 +++++++++++----------- packages/schema/tests/idl.rs | 6 ++-- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/contracts/hackatom/examples/schema.rs b/contracts/hackatom/examples/schema.rs index c94b58451..e2fa27d80 100644 --- a/contracts/hackatom/examples/schema.rs +++ b/contracts/hackatom/examples/schema.rs @@ -1,9 +1,9 @@ -use cosmwasm_schema::generate_api; +use cosmwasm_schema::write_api; use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg}; fn main() { - generate_api! { + write_api! { instantiate: InstantiateMsg, query: QueryMsg, execute: ExecuteMsg, diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index 09d6bf81a..70a61c4f2 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -7,8 +7,8 @@ use syn::{ parse_quote, Block, ExprStruct, Ident, Path, Token, }; -pub fn generate_api_impl(input: Options) -> Block { - let api_object = api_object(&input); +pub fn write_api_impl(input: Options) -> Block { + let api_object = generate_api_impl(&input); let name = input.name; parse_quote! { @@ -34,7 +34,7 @@ pub fn generate_api_impl(input: Options) -> Block { } } -pub fn api_object(input: &Options) -> ExprStruct { +pub fn generate_api_impl(input: &Options) -> ExprStruct { let Options { name, version, @@ -210,7 +210,7 @@ mod tests { #[test] fn api_object_minimal() { assert_eq!( - api_object(&parse_quote! { + generate_api_impl(&parse_quote! { instantiate: InstantiateMsg, }), parse_quote! { @@ -231,7 +231,7 @@ mod tests { #[test] fn api_object_name_vesion_override() { assert_eq!( - api_object(&parse_quote! { + generate_api_impl(&parse_quote! { name: "foo", version: "bar", instantiate: InstantiateMsg, @@ -254,7 +254,7 @@ mod tests { #[test] fn api_object_all_msgs() { assert_eq!( - api_object(&parse_quote! { + generate_api_impl(&parse_quote! { instantiate: InstantiateMsg, execute: ExecuteMsg, query: QueryMsg, diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index ff77a3cfd..61b832156 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -14,19 +14,19 @@ pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::Tok } #[proc_macro] -pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { +pub fn write_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as generate_api::Options); - let expanded = generate_api::generate_api_impl(input).into_token_stream(); + let expanded = generate_api::write_api_impl(input).into_token_stream(); proc_macro::TokenStream::from(expanded) } #[proc_macro] -pub fn generate_api_obj(input: proc_macro::TokenStream) -> proc_macro::TokenStream { +pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as generate_api::Options); - let expanded = generate_api::api_object(&input).into_token_stream(); + let expanded = generate_api::generate_api_impl(&input).into_token_stream(); proc_macro::TokenStream::from(expanded) } diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 04baf276a..415acf59f 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,19 +10,13 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports -/// Takes care of generating the interface description file for a contract. The body describes -/// the message types included and allows setting contract name and version overrides. +/// Generates an [`Api`](crate::Api) for the contract. The body describes the message +/// types exported in the schema and allows setting contract name and version overrides. /// /// The only obligatory field is `instantiate` - to set the InstantiateMsg type. /// /// # Available fields -/// - `name` - contract name, crate name by default -/// - `version` - contract version, crate version by default -/// - `instantiate` - instantiate msg type -/// - `query` - query msg type, empty by default -/// - `execute` - execute msg type, empty by default -/// - `migrate` - migrate msg type, empty by default -/// - `sudo` - sudo msg type, empty by default +/// See [`write_api`](crate::write_api). /// /// # Example /// ``` @@ -35,24 +29,30 @@ pub use remove::remove_schemas; /// #[derive(JsonSchema)] /// struct MigrateMsg; /// -/// generate_api! { +/// let api = generate_api! { /// name: "cw20", /// instantiate: InstantiateMsg, /// migrate: MigrateMsg, -/// }; +/// }.render(); /// ``` pub use cosmwasm_schema_derive::generate_api; -/// Generates an [`Api`](crate::Api) for the contract. The body describes the message -/// types exported in the schema and allows setting contract name and version overrides. +/// Takes care of generating the interface description file for a contract. The body describes +/// the message types included and allows setting contract name and version overrides. /// /// The only obligatory field is `instantiate` - to set the InstantiateMsg type. /// /// # Available fields -/// See [`generate_api`](crate::generate_api). +/// - `name` - contract name, crate name by default +/// - `version` - contract version, crate version by default +/// - `instantiate` - instantiate msg type +/// - `query` - query msg type, empty by default +/// - `execute` - execute msg type, empty by default +/// - `migrate` - migrate msg type, empty by default +/// - `sudo` - sudo msg type, empty by default /// /// # Example /// ``` -/// use cosmwasm_schema::{generate_api_obj}; +/// use cosmwasm_schema::{write_api}; /// use schemars::{JsonSchema}; /// /// #[derive(JsonSchema)] @@ -61,11 +61,11 @@ pub use cosmwasm_schema_derive::generate_api; /// #[derive(JsonSchema)] /// struct MigrateMsg; /// -/// let api = generate_api_obj! { +/// generate_api! { /// name: "cw20", /// instantiate: InstantiateMsg, /// migrate: MigrateMsg, -/// }.render(); +/// }; /// ``` -pub use cosmwasm_schema_derive::generate_api_obj; +pub use cosmwasm_schema_derive::write_api; pub use schemars::schema_for; diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 3f312cd88..841237f91 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use cosmwasm_schema::{generate_api_obj, QueryResponses, IDL_VERSION}; +use cosmwasm_schema::{generate_api, QueryResponses, IDL_VERSION}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -40,7 +40,7 @@ pub struct MigrateMsg { #[test] fn test_basic_structure() { - let api_str = generate_api_obj! { + let api_str = generate_api! { name: "test", version: "0.1.0", instantiate: InstantiateMsg, @@ -81,7 +81,7 @@ fn test_basic_structure() { #[test] fn test_query_responses() { - let api_str = generate_api_obj! { + let api_str = generate_api! { instantiate: InstantiateMsg, query: QueryMsg, } From ff89d447abd9e5c4ae6b38fc4bdfd702a9ce9dfb Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 13:09:04 +0200 Subject: [PATCH 082/344] format codecov.yml file --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index ca6f4a47d..b1bea1d2d 100644 --- a/codecov.yml +++ b/codecov.yml @@ -26,7 +26,7 @@ flags: paths: - packages/schema/ cosmwasm-schema-derive: - - packages/schema-derive/ + - packages/schema-derive/ cosmwasm-std: paths: - packages/std/ From da722a42f113a2848d217bcd3178d9d859090dcb Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 13:11:58 +0200 Subject: [PATCH 083/344] schema: fix failing doc test --- packages/schema/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 415acf59f..254c21952 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -61,7 +61,7 @@ pub use cosmwasm_schema_derive::generate_api; /// #[derive(JsonSchema)] /// struct MigrateMsg; /// -/// generate_api! { +/// write_api! { /// name: "cw20", /// instantiate: InstantiateMsg, /// migrate: MigrateMsg, From 34756444852307b228cb46de2f72214579e410f0 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:38:10 +0200 Subject: [PATCH 084/344] Decimal/256: Implement pow --- packages/std/src/math/decimal.rs | 20 ++++++++++++++++++++ packages/std/src/math/decimal256.rs | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 13bc9b808..6e77636ad 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -212,6 +212,14 @@ impl Decimal { }) } + /// Raises a value to the power of `exp`, pancis if an overflow occurred. + pub fn pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => panic!("Multiplication overflow"), + } + } + /// Raises a value to the power of `exp`, returning an `OverflowError` if an overflow occurred. pub fn checked_pow(self, exp: u32) -> Result { // This uses the exponentiation by squaring algorithm: @@ -1835,4 +1843,16 @@ mod tests { Err(DivideByZeroError { .. }) )); } + + #[test] + fn decimal_pow_works() { + assert_eq!(Decimal::percent(200).pow(2), Decimal::percent(400)); + assert_eq!(Decimal::percent(200).pow(10), Decimal::percent(102400)); + } + + #[test] + #[should_panic] + fn decimal_pow_overflow_panics() { + Decimal::MAX.pow(2u32); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index c0f9005f8..63777e500 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -225,6 +225,14 @@ impl Decimal256 { }) } + /// Raises a value to the power of `exp`, panics if an overflow occurred. + pub fn pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => panic!("Multiplication overflow"), + } + } + /// Raises a value to the power of `exp`, returning an `OverflowError` if an overflow occurred. pub fn checked_pow(self, exp: u32) -> Result { // This uses the exponentiation by squaring algorithm: @@ -1982,4 +1990,19 @@ mod tests { Err(DivideByZeroError { .. }) )); } + + #[test] + fn decimal256_pow_works() { + assert_eq!(Decimal256::percent(200).pow(2), Decimal256::percent(400)); + assert_eq!( + Decimal256::percent(200).pow(10), + Decimal256::percent(102400) + ); + } + + #[test] + #[should_panic] + fn decimal256_pow_overflow_panics() { + Decimal256::MAX.pow(2u32); + } } From a804ab2cbb74eea7a7790ef20cc9df25d97247ae Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:55:01 +0200 Subject: [PATCH 085/344] Decimal/256: Implement saturating_pow --- packages/std/src/math/decimal.rs | 15 ++++++++++++++- packages/std/src/math/decimal256.rs | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 6e77636ad..8d9fe7e55 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -212,7 +212,7 @@ impl Decimal { }) } - /// Raises a value to the power of `exp`, pancis if an overflow occurred. + /// Raises a value to the power of `exp`, panics if an overflow occurred. pub fn pow(self, exp: u32) -> Self { match self.checked_pow(exp) { Ok(value) => value, @@ -253,6 +253,14 @@ impl Decimal { }) } + /// Raises a value to the power of `exp`, returns MAX on overflow. + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + pub fn checked_div(self, other: Self) -> Result { Decimal::checked_from_ratio(self.numerator(), other.numerator()) } @@ -1855,4 +1863,9 @@ mod tests { fn decimal_pow_overflow_panics() { Decimal::MAX.pow(2u32); } + + #[test] + fn decimal_saturating_pow() { + assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 63777e500..d7e36960e 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -266,6 +266,14 @@ impl Decimal256 { }) } + /// Raises a value to the power of `exp`, returns MAX on overflow. + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + pub fn checked_div(self, other: Self) -> Result { Decimal256::checked_from_ratio(self.numerator(), other.numerator()) } @@ -2005,4 +2013,9 @@ mod tests { fn decimal256_pow_overflow_panics() { Decimal256::MAX.pow(2u32); } + + #[test] + fn decimal_saturating_pow() { + assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); + } } From fcce61d7536fd1e5719b447b04356aeee613f8fd Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:58:23 +0200 Subject: [PATCH 086/344] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44baac9c4..bd6ff727a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to - cosmwasm-std: Implement `Rem`/`RemAssign` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `checked_add`/`_sub`/`_div`/`_rem` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `pow`/`saturating_pow` for `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From afde9163caf35db636b2986097d186ccb87b0a75 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 16:42:07 +0200 Subject: [PATCH 087/344] Decimal/256: Add one more testcase to increase coverage --- packages/std/src/math/decimal.rs | 4 ++++ packages/std/src/math/decimal256.rs | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 8d9fe7e55..cd00a4ccd 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1866,6 +1866,10 @@ mod tests { #[test] fn decimal_saturating_pow() { + assert_eq!( + Decimal::percent(400).saturating_pow(2u32), + Decimal::percent(1600) + ); assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index d7e36960e..508191c6f 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -2015,7 +2015,11 @@ mod tests { } #[test] - fn decimal_saturating_pow() { - assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); + fn decimal256_saturating_pow() { + assert_eq!( + Decimal256::percent(400).saturating_pow(2u32), + Decimal256::percent(1600) + ); + assert_eq!(Decimal256::MAX.saturating_pow(2u32), Decimal256::MAX); } } From c2035609233792e9a00197311183a09f1a8365ea Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 15:34:12 +0200 Subject: [PATCH 088/344] CI: run clippy for schema-derive --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b4e3aaa2..1973b823d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -966,6 +966,10 @@ jobs: name: Clippy linting on schema working_directory: ~/project/packages/schema command: cargo clippy --all-targets -- -D warnings + - run: + name: Clippy linting on schema-derive + working_directory: ~/project/packages/schema-derive + command: cargo clippy --all-targets -- -D warnings - run: name: Clippy linting on std (no feature flags) working_directory: ~/project/packages/std From 4e0985a38a6672373a3ae3ad73ecc902799a3f50 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 15:34:54 +0200 Subject: [PATCH 089/344] Update codecov.yml Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index b1bea1d2d..f04225aed 100644 --- a/codecov.yml +++ b/codecov.yml @@ -26,7 +26,8 @@ flags: paths: - packages/schema/ cosmwasm-schema-derive: - - packages/schema-derive/ + paths: + - packages/schema-derive/ cosmwasm-std: paths: - packages/std/ From a5f67adf5b051c0b5da3c499c43f5f7c12fd323f Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 12:15:38 +0200 Subject: [PATCH 090/344] Decimal/256: Implement ceil/floor rounding --- packages/std/src/math/decimal.rs | 28 ++++++++++++++++++++++++++++ packages/std/src/math/decimal256.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index cd00a4ccd..006b337fc 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -184,6 +184,19 @@ impl Decimal { Self::DECIMAL_PLACES as u32 } + pub fn floor(&self) -> Self { + Self((self.0 / Self::DECIMAL_FRACTIONAL) * Self::DECIMAL_FRACTIONAL) + } + + pub fn ceil(&self) -> Self { + let floor = self.floor(); + if &floor == self { + floor + } else { + floor + Decimal::one() + } + } + pub fn checked_add(self, other: Self) -> Result { self.0 .checked_add(other.0) @@ -1872,4 +1885,19 @@ mod tests { ); assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); } + + #[test] + fn decimal_rounding() { + assert_eq!(Decimal::one().floor(), Decimal::one()); + assert_eq!(Decimal::percent(150).floor(), Decimal::one()); + assert_eq!(Decimal::percent(199).floor(), Decimal::one()); + assert_eq!(Decimal::percent(200).floor(), Decimal::percent(200)); + assert_eq!(Decimal::percent(99).floor(), Decimal::zero()); + + assert_eq!(Decimal::one().ceil(), Decimal::one()); + assert_eq!(Decimal::percent(150).ceil(), Decimal::percent(200)); + assert_eq!(Decimal::percent(199).ceil(), Decimal::percent(200)); + assert_eq!(Decimal::percent(99).ceil(), Decimal::one()); + assert_eq!(Decimal(Uint128::from(1u128)).ceil(), Decimal::one()); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 508191c6f..9111ce210 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -197,6 +197,19 @@ impl Decimal256 { Self::DECIMAL_PLACES as u32 } + pub fn floor(&self) -> Self { + Self((self.0 / Self::DECIMAL_FRACTIONAL) * Self::DECIMAL_FRACTIONAL) + } + + pub fn ceil(&self) -> Self { + let floor = self.floor(); + if &floor == self { + floor + } else { + floor + Decimal256::one() + } + } + pub fn checked_add(self, other: Self) -> Result { self.0 .checked_add(other.0) @@ -2022,4 +2035,19 @@ mod tests { ); assert_eq!(Decimal256::MAX.saturating_pow(2u32), Decimal256::MAX); } + + #[test] + fn decimal256_rounding() { + assert_eq!(Decimal256::one().floor(), Decimal256::one()); + assert_eq!(Decimal256::percent(150).floor(), Decimal256::one()); + assert_eq!(Decimal256::percent(199).floor(), Decimal256::one()); + assert_eq!(Decimal256::percent(200).floor(), Decimal256::percent(200)); + assert_eq!(Decimal256::percent(99).floor(), Decimal256::zero()); + + assert_eq!(Decimal256::one().ceil(), Decimal256::one()); + assert_eq!(Decimal256::percent(150).ceil(), Decimal256::percent(200)); + assert_eq!(Decimal256::percent(199).ceil(), Decimal256::percent(200)); + assert_eq!(Decimal256::percent(99).ceil(), Decimal256::one()); + assert_eq!(Decimal256(Uint256::from(1u128)).ceil(), Decimal256::one()); + } } From 61d9523339b8c515388a06ba051c68d07e5597d7 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 12:16:30 +0200 Subject: [PATCH 091/344] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6ff727a..af7a4f1f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to - cosmwasm-std: Implement `checked_add`/`_sub`/`_div`/`_rem` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `pow`/`saturating_pow` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From d2f3548e467e015507f88b678ea1fd05a7c7b380 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 12:57:15 +0200 Subject: [PATCH 092/344] Decimal/256: Implement checked_ceil; add doc comments --- packages/std/src/math/decimal.rs | 32 +++++++++++++++++++++++++++-- packages/std/src/math/decimal256.rs | 32 +++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 006b337fc..d7f48016d 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -184,16 +184,26 @@ impl Decimal { Self::DECIMAL_PLACES as u32 } + /// Rounds value down after decimal places. pub fn floor(&self) -> Self { Self((self.0 / Self::DECIMAL_FRACTIONAL) * Self::DECIMAL_FRACTIONAL) } + /// Rounds value up after decimal places. Panics on overflow. pub fn ceil(&self) -> Self { + match self.checked_ceil() { + Ok(value) => value, + Err(_) => panic!("attempt to ceil with overflow"), + } + } + + /// Rounds value up after decimal places. Returns OverflowError on overflow. + pub fn checked_ceil(&self) -> Result { let floor = self.floor(); if &floor == self { - floor + Ok(floor) } else { - floor + Decimal::one() + floor.checked_add(Decimal::one()) } } @@ -1900,4 +1910,22 @@ mod tests { assert_eq!(Decimal::percent(99).ceil(), Decimal::one()); assert_eq!(Decimal(Uint128::from(1u128)).ceil(), Decimal::one()); } + + #[test] + #[should_panic(expected = "attempt to ceil with overflow")] + fn decimal_ceil_panics() { + let _ = Decimal::MAX.ceil(); + } + + #[test] + fn decimal_checked_ceil() { + assert_eq!( + Decimal::percent(199).checked_ceil(), + Ok(Decimal::percent(200)) + ); + assert!(matches!( + Decimal::MAX.checked_ceil(), + Err(OverflowError { .. }) + )); + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 9111ce210..b8e8aa826 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -197,16 +197,26 @@ impl Decimal256 { Self::DECIMAL_PLACES as u32 } + /// Rounds value down after decimal places. pub fn floor(&self) -> Self { Self((self.0 / Self::DECIMAL_FRACTIONAL) * Self::DECIMAL_FRACTIONAL) } + /// Rounds value up after decimal places. Panics on overflow. pub fn ceil(&self) -> Self { + match self.checked_ceil() { + Ok(value) => value, + Err(_) => panic!("attempt to ceil with overflow"), + } + } + + /// Rounds value up after decimal places. Returns OverflowError on overflow. + pub fn checked_ceil(&self) -> Result { let floor = self.floor(); if &floor == self { - floor + Ok(floor) } else { - floor + Decimal256::one() + floor.checked_add(Decimal256::one()) } } @@ -2050,4 +2060,22 @@ mod tests { assert_eq!(Decimal256::percent(99).ceil(), Decimal256::one()); assert_eq!(Decimal256(Uint256::from(1u128)).ceil(), Decimal256::one()); } + + #[test] + #[should_panic(expected = "attempt to ceil with overflow")] + fn decimal256_ceil_panics() { + let _ = Decimal256::MAX.ceil(); + } + + #[test] + fn decimal256_checked_ceil() { + assert_eq!( + Decimal256::percent(199).checked_ceil(), + Ok(Decimal256::percent(200)) + ); + assert!(matches!( + Decimal256::MAX.checked_ceil(), + Err(OverflowError { .. }) + )); + } } From ea6904c23c0bf9f7c6a0963f426ce9900e012f15 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 11 Jul 2022 15:42:06 +0200 Subject: [PATCH 093/344] Upgrade clippy to 1.62.0 and adapt code to new rule --- .circleci/config.yml | 2 +- packages/vm/src/errors/vm_error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fbee3bed..c7df7e0d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.56.1", "1.60.0"] + rust-version: ["1.56.1", "1.62.0"] - benchmarking: requires: - package_vm diff --git a/packages/vm/src/errors/vm_error.rs b/packages/vm/src/errors/vm_error.rs index 863a27ebd..6140799bc 100644 --- a/packages/vm/src/errors/vm_error.rs +++ b/packages/vm/src/errors/vm_error.rs @@ -361,7 +361,7 @@ impl From for VmError { original.to_string().starts_with(&message), "The error message we created is not a prefix of the error message from Wasmer. Our message: '{}'. Wasmer messsage: '{}'", &message, - original.to_string() + original ); VmError::runtime_err(format!("Wasmer runtime error: {}", &message)) } From eb3a699425abd9c0a5a7eb9fd925c988971bd1a7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 10:56:11 +0200 Subject: [PATCH 094/344] schema-derive: introduce the `msg` macro --- packages/schema-derive/src/lib.rs | 15 ++++- packages/schema-derive/src/msg.rs | 107 ++++++++++++++++++++++++++++++ packages/schema/src/lib.rs | 1 + 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 packages/schema-derive/src/msg.rs diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 61b832156..3d0064533 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,8 +1,9 @@ mod generate_api; +mod msg; mod query_responses; use quote::ToTokens; -use syn::{parse_macro_input, ItemEnum}; +use syn::{parse_macro_input, DeriveInput, ItemEnum}; #[proc_macro_derive(QueryResponses, attributes(returns))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { @@ -30,3 +31,15 @@ pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { proc_macro::TokenStream::from(expanded) } + +#[proc_macro_attribute] +pub fn msg( + _attr: proc_macro::TokenStream, + input: proc_macro::TokenStream, +) -> proc_macro::TokenStream { + let input = parse_macro_input!(input as DeriveInput); + + let expanded = msg::msg_impl(input).into_token_stream(); + + proc_macro::TokenStream::from(expanded) +} diff --git a/packages/schema-derive/src/msg.rs b/packages/schema-derive/src/msg.rs new file mode 100644 index 000000000..353e03105 --- /dev/null +++ b/packages/schema-derive/src/msg.rs @@ -0,0 +1,107 @@ +use syn::{parse_quote, DeriveInput}; + +pub fn msg_impl(input: DeriveInput) -> DeriveInput { + match input.data { + syn::Data::Struct(_) => parse_quote! { + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Debug, + PartialEq, + schemars::JsonSchema + )] + #[serde(deny_unknown_fields)] + #input + }, + syn::Data::Enum(_) => parse_quote! { + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Debug, + PartialEq, + schemars::JsonSchema + )] + #[serde(deny_unknown_fields, rename_all = "snake_case")] + #input + }, + syn::Data::Union(_) => panic!("unions are not supported"), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn structs() { + let expanded = msg_impl(parse_quote! { + pub struct InstantiateMsg { + pub verifier: String, + pub beneficiary: String, + } + }); + + let expected = parse_quote! { + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Debug, + PartialEq, + schemars::JsonSchema + )] + #[serde(deny_unknown_fields)] + pub struct InstantiateMsg { + pub verifier: String, + pub beneficiary: String, + } + }; + + assert_eq!(expanded, expected); + } + + #[test] + fn enums() { + let expanded = msg_impl(parse_quote! { + pub enum SudoMsg { + StealFunds { + recipient: String, + amount: Vec, + }, + } + }); + + let expected = parse_quote! { + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Debug, + PartialEq, + schemars::JsonSchema + )] + #[serde(deny_unknown_fields, rename_all = "snake_case")] + pub enum SudoMsg { + StealFunds { + recipient: String, + amount: Vec, + }, + } + }; + + assert_eq!(expanded, expected); + } + + #[test] + #[should_panic(expected = "unions are not supported")] + fn unions() { + msg_impl(parse_quote! { + pub union SudoMsg { + x: u32, + y: u32, + } + }); + } +} diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 254c21952..89ad5da5a 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -36,6 +36,7 @@ pub use remove::remove_schemas; /// }.render(); /// ``` pub use cosmwasm_schema_derive::generate_api; +pub use cosmwasm_schema_derive::msg; /// Takes care of generating the interface description file for a contract. The body describes /// the message types included and allows setting contract name and version overrides. /// From a1ed27fda6fba96f017739322877415c6d8c3bad Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 11:10:35 +0200 Subject: [PATCH 095/344] hackatom: migrate to the `msg` macro --- contracts/hackatom/src/msg.rs | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 11b49916d..746dc5297 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -1,11 +1,8 @@ -use cosmwasm_schema::QueryResponses; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; +use cosmwasm_schema::{msg, QueryResponses}; use cosmwasm_std::{AllBalanceResponse, Binary, Coin}; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields)] +#[msg] pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -18,8 +15,7 @@ pub struct InstantiateMsg { /// /// Note that the contract doesn't enforce permissions here, this is done /// by blockchain logic (in the future by blockchain governance) -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields)] +#[msg] pub struct MigrateMsg { pub verifier: String, } @@ -27,8 +23,7 @@ pub struct MigrateMsg { /// SudoMsg is only exposed for internal Cosmos SDK modules to call. /// This is showing how we can expose "admin" functionality than can not be called by /// external users or contracts, but only trusted (native/Go) code in the blockchain -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields, rename_all = "snake_case")] +#[msg] pub enum SudoMsg { StealFunds { recipient: String, @@ -38,8 +33,7 @@ pub enum SudoMsg { // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields, rename_all = "snake_case")] +#[msg] pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. Release {}, @@ -67,8 +61,8 @@ pub enum ExecuteMsg { UserErrorsInApiCalls {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] -#[serde(deny_unknown_fields, rename_all = "snake_case")] +#[msg] +#[derive(QueryResponses)] pub enum QueryMsg { /// returns a human-readable representation of the verifier /// use to ensure query path works in integration tests @@ -88,21 +82,18 @@ pub enum QueryMsg { GetInt {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields)] +#[msg] pub struct VerifierResponse { pub verifier: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields)] +#[msg] pub struct RecurseResponse { /// hashed is the result of running sha256 "work+1" times on the contract's human address pub hashed: Binary, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(deny_unknown_fields)] +#[msg] pub struct IntResponse { pub int: u32, } From 4f4bc2a4a8ebe35f7db66df337cb90bf7985e787 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 15:56:57 +0200 Subject: [PATCH 096/344] Add new error for rounding up overflow --- packages/std/src/errors/mod.rs | 2 +- packages/std/src/errors/std_error.rs | 4 ++++ packages/std/src/math/decimal.rs | 10 ++++++---- packages/std/src/math/decimal256.rs | 13 ++++++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/std/src/errors/mod.rs b/packages/std/src/errors/mod.rs index 64b1e96f9..bf7e61f43 100644 --- a/packages/std/src/errors/mod.rs +++ b/packages/std/src/errors/mod.rs @@ -6,7 +6,7 @@ mod verification_error; pub use recover_pubkey_error::RecoverPubkeyError; pub use std_error::{ CheckedFromRatioError, CheckedMultiplyRatioError, ConversionOverflowError, DivideByZeroError, - OverflowError, OverflowOperation, StdError, StdResult, + OverflowError, OverflowOperation, RoundUpOverflowError, StdError, StdResult, }; pub use system_error::SystemError; pub use verification_error::VerificationError; diff --git a/packages/std/src/errors/std_error.rs b/packages/std/src/errors/std_error.rs index 165ba20fb..4993c29d5 100644 --- a/packages/std/src/errors/std_error.rs +++ b/packages/std/src/errors/std_error.rs @@ -544,6 +544,10 @@ pub enum CheckedFromRatioError { Overflow, } +#[derive(Error, Debug, PartialEq, Eq)] +#[error("Round up operation failed because of overflow")] +pub struct RoundUpOverflowError; + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index d7f48016d..3d88fc0f5 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -9,7 +9,7 @@ use thiserror::Error; use crate::errors::{ CheckedFromRatioError, CheckedMultiplyRatioError, DivideByZeroError, OverflowError, - OverflowOperation, StdError, + OverflowOperation, RoundUpOverflowError, StdError, }; use super::Fraction; @@ -198,12 +198,14 @@ impl Decimal { } /// Rounds value up after decimal places. Returns OverflowError on overflow. - pub fn checked_ceil(&self) -> Result { + pub fn checked_ceil(&self) -> Result { let floor = self.floor(); if &floor == self { Ok(floor) } else { - floor.checked_add(Decimal::one()) + floor + .checked_add(Decimal::one()) + .map_err(|_| RoundUpOverflowError) } } @@ -1925,7 +1927,7 @@ mod tests { ); assert!(matches!( Decimal::MAX.checked_ceil(), - Err(OverflowError { .. }) + Err(RoundUpOverflowError { .. }) )); } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index b8e8aa826..ede9a0a96 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -9,7 +9,7 @@ use thiserror::Error; use crate::errors::{ CheckedFromRatioError, CheckedMultiplyRatioError, DivideByZeroError, OverflowError, - OverflowOperation, StdError, + OverflowOperation, RoundUpOverflowError, StdError, }; use crate::{Decimal, Uint512}; @@ -211,12 +211,14 @@ impl Decimal256 { } /// Rounds value up after decimal places. Returns OverflowError on overflow. - pub fn checked_ceil(&self) -> Result { + pub fn checked_ceil(&self) -> Result { let floor = self.floor(); if &floor == self { Ok(floor) } else { - floor.checked_add(Decimal256::one()) + floor + .checked_add(Decimal256::one()) + .map_err(|_| RoundUpOverflowError) } } @@ -2073,9 +2075,6 @@ mod tests { Decimal256::percent(199).checked_ceil(), Ok(Decimal256::percent(200)) ); - assert!(matches!( - Decimal256::MAX.checked_ceil(), - Err(OverflowError { .. }) - )); + assert_eq!(Decimal256::MAX.checked_ceil(), Err(RoundUpOverflowError)); } } From 66c645a7fb6e78bebde5ab0b336307b55b80f6d4 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 15:55:01 +0200 Subject: [PATCH 097/344] Decimal/256: Implement saturating_pow --- packages/std/src/math/decimal.rs | 8 ++++++++ packages/std/src/math/decimal256.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 3d88fc0f5..5aa3d72fa 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -297,6 +297,14 @@ impl Decimal { .map_err(|_| DivideByZeroError::new(self)) } + /// Raises a value to the power of `exp`, returns MAX on overflow. + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + /// Returns the approximate square root as a Decimal. /// /// This should not overflow or panic. diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index ede9a0a96..130f30abc 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -310,6 +310,14 @@ impl Decimal256 { .map_err(|_| DivideByZeroError::new(self)) } + /// Raises a value to the power of `exp`, returns MAX on overflow. + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + /// Returns the approximate square root as a Decimal256. /// /// This should not overflow or panic. From 189d9a3a3b026609c9ea3db5486441f4418ac352 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 16:29:44 +0200 Subject: [PATCH 098/344] Decimal/256: Implement saturating_add/sub/mul --- packages/std/src/math/decimal.rs | 58 +++++++++++++++++++---------- packages/std/src/math/decimal256.rs | 58 +++++++++++++++++++---------- 2 files changed, 78 insertions(+), 38 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 5aa3d72fa..9de42e9d5 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -278,14 +278,6 @@ impl Decimal { }) } - /// Raises a value to the power of `exp`, returns MAX on overflow. - pub fn saturating_pow(self, exp: u32) -> Self { - match self.checked_pow(exp) { - Ok(value) => value, - Err(_) => Self::MAX, - } - } - pub fn checked_div(self, other: Self) -> Result { Decimal::checked_from_ratio(self.numerator(), other.numerator()) } @@ -297,14 +289,6 @@ impl Decimal { .map_err(|_| DivideByZeroError::new(self)) } - /// Raises a value to the power of `exp`, returns MAX on overflow. - pub fn saturating_pow(self, exp: u32) -> Self { - match self.checked_pow(exp) { - Ok(value) => value, - Err(_) => Self::MAX, - } - } - /// Returns the approximate square root as a Decimal. /// /// This should not overflow or panic. @@ -340,6 +324,34 @@ impl Decimal { pub const fn abs_diff(self, other: Self) -> Self { Self(self.0.abs_diff(other.0)) } + + pub fn saturating_add(self, other: Self) -> Self { + match self.checked_add(other) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + + pub fn saturating_sub(self, other: Self) -> Self { + match self.checked_sub(other) { + Ok(value) => value, + Err(_) => Self::zero(), + } + } + + pub fn saturating_mul(self, other: Self) -> Self { + match self.checked_mul(other) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } } impl Fraction for Decimal { @@ -1898,10 +1910,18 @@ mod tests { } #[test] - fn decimal_saturating_pow() { + fn decimal_saturating_works() { assert_eq!( - Decimal::percent(400).saturating_pow(2u32), - Decimal::percent(1600) + Decimal::MAX.saturating_add(Decimal::percent(200)), + Decimal::MAX + ); + assert_eq!( + Decimal::zero().saturating_sub(Decimal::percent(200)), + Decimal::zero() + ); + assert_eq!( + Decimal::MAX.saturating_mul(Decimal::percent(200)), + Decimal::MAX ); assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 130f30abc..fa4e1b0cd 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -291,14 +291,6 @@ impl Decimal256 { }) } - /// Raises a value to the power of `exp`, returns MAX on overflow. - pub fn saturating_pow(self, exp: u32) -> Self { - match self.checked_pow(exp) { - Ok(value) => value, - Err(_) => Self::MAX, - } - } - pub fn checked_div(self, other: Self) -> Result { Decimal256::checked_from_ratio(self.numerator(), other.numerator()) } @@ -310,14 +302,6 @@ impl Decimal256 { .map_err(|_| DivideByZeroError::new(self)) } - /// Raises a value to the power of `exp`, returns MAX on overflow. - pub fn saturating_pow(self, exp: u32) -> Self { - match self.checked_pow(exp) { - Ok(value) => value, - Err(_) => Self::MAX, - } - } - /// Returns the approximate square root as a Decimal256. /// /// This should not overflow or panic. @@ -357,6 +341,34 @@ impl Decimal256 { self - other } } + + pub fn saturating_add(self, other: Self) -> Self { + match self.checked_add(other) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + + pub fn saturating_sub(self, other: Self) -> Self { + match self.checked_sub(other) { + Ok(value) => value, + Err(_) => Self::zero(), + } + } + + pub fn saturating_mul(self, other: Self) -> Self { + match self.checked_mul(other) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } } impl Fraction for Decimal256 { @@ -2048,10 +2060,18 @@ mod tests { } #[test] - fn decimal256_saturating_pow() { + fn decimal256_saturating_works() { assert_eq!( - Decimal256::percent(400).saturating_pow(2u32), - Decimal256::percent(1600) + Decimal256::MAX.saturating_add(Decimal256::percent(200)), + Decimal256::MAX + ); + assert_eq!( + Decimal256::zero().saturating_sub(Decimal256::percent(200)), + Decimal256::zero() + ); + assert_eq!( + Decimal256::MAX.saturating_mul(Decimal256::percent(200)), + Decimal256::MAX ); assert_eq!(Decimal256::MAX.saturating_pow(2u32), Decimal256::MAX); } From df379636bed70024e8d56e795e90346a4c4f285e Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 16:37:41 +0200 Subject: [PATCH 099/344] Uint256/512: Implement saturating_pow --- packages/std/src/math/uint128.rs | 4 ++-- packages/std/src/math/uint256.rs | 8 ++++++++ packages/std/src/math/uint512.rs | 8 ++++++++ packages/std/src/math/uint64.rs | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 5aee2fc8f..d2e3cd8e1 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -205,8 +205,8 @@ impl Uint128 { Self(self.0.saturating_mul(other.0)) } - pub fn saturating_pow(self, other: u32) -> Self { - Self(self.0.saturating_pow(other)) + pub fn saturating_pow(self, exp: u32) -> Self { + Self(self.0.saturating_pow(exp)) } pub const fn abs_diff(self, other: Self) -> Self { diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 9150bed56..14a0504c5 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -284,6 +284,13 @@ impl Uint256 { Self(self.0.saturating_mul(other.0)) } + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + pub fn abs_diff(self, other: Self) -> Self { if self < other { other - self @@ -1465,6 +1472,7 @@ mod tests { Uint256::MAX.saturating_mul(Uint256::from(2u32)), Uint256::MAX ); + assert_eq!(Uint256::MAX.saturating_pow(2u32), Uint256::MAX); } #[test] diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index ceeb7b869..bb7211367 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -259,6 +259,13 @@ impl Uint512 { Self(self.0.saturating_mul(other.0)) } + pub fn saturating_pow(self, exp: u32) -> Self { + match self.checked_pow(exp) { + Ok(value) => value, + Err(_) => Self::MAX, + } + } + pub fn abs_diff(self, other: Self) -> Self { if self < other { other - self @@ -1100,6 +1107,7 @@ mod tests { Uint512::MAX.saturating_mul(Uint512::from(2u32)), Uint512::MAX ); + assert_eq!(Uint512::MAX.saturating_pow(2u32), Uint512::MAX); } #[test] diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 6bf19b2c3..b23e41e70 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -201,8 +201,8 @@ impl Uint64 { Self(self.0.saturating_mul(other.0)) } - pub fn saturating_pow(self, other: u32) -> Self { - Self(self.0.saturating_pow(other)) + pub fn saturating_pow(self, exp: u32) -> Self { + Self(self.0.saturating_pow(exp)) } pub const fn abs_diff(self, other: Self) -> Self { From a2d98971a3fbe086c55993895594eb61b36140dd Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 16:40:39 +0200 Subject: [PATCH 100/344] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af7a4f1f2..ae9f3659a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to `Decimal`/`Decimal256`. - cosmwasm-std: Implement `pow`/`saturating_pow` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From ce8a086411033dcfb241117fcafad0f316a2bfb9 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 17:15:38 +0200 Subject: [PATCH 101/344] Implement PartialEq for references for all math types --- packages/std/src/math/decimal.rs | 10 ++++++++-- packages/std/src/math/decimal256.rs | 10 ++++++++-- packages/std/src/math/uint128.rs | 10 ++++++++-- packages/std/src/math/uint256.rs | 10 ++++++++-- packages/std/src/math/uint512.rs | 10 ++++++++-- packages/std/src/math/uint64.rs | 10 ++++++++-- 6 files changed, 48 insertions(+), 12 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 3d88fc0f5..f01eb869c 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -200,7 +200,7 @@ impl Decimal { /// Rounds value up after decimal places. Returns OverflowError on overflow. pub fn checked_ceil(&self) -> Result { let floor = self.floor(); - if &floor == self { + if floor == self { Ok(floor) } else { floor @@ -618,6 +618,12 @@ impl<'de> de::Visitor<'de> for DecimalVisitor { } } +impl PartialEq<&Decimal> for Decimal { + fn eq(&self, rhs: &&Decimal) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -1721,7 +1727,7 @@ mod tests { ); let empty: Vec = vec![]; - assert_eq!(Decimal::zero(), empty.iter().sum()); + assert_eq!(Decimal::zero(), empty.iter().sum::()); } #[test] diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index ede9a0a96..e83a35ba8 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -213,7 +213,7 @@ impl Decimal256 { /// Rounds value up after decimal places. Returns OverflowError on overflow. pub fn checked_ceil(&self) -> Result { let floor = self.floor(); - if &floor == self { + if floor == self { Ok(floor) } else { floor @@ -643,6 +643,12 @@ impl<'de> de::Visitor<'de> for Decimal256Visitor { } } +impl PartialEq<&Decimal256> for Decimal256 { + fn eq(&self, rhs: &&Decimal256) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -1856,7 +1862,7 @@ mod tests { ); let empty: Vec = vec![]; - assert_eq!(Decimal256::zero(), empty.iter().sum()); + assert_eq!(Decimal256::zero(), empty.iter().sum::()); } #[test] diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 5aee2fc8f..681c945cc 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -511,6 +511,12 @@ where } } +impl PartialEq<&Uint128> for Uint128 { + fn eq(&self, rhs: &&Uint128) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -852,10 +858,10 @@ mod tests { let nums = vec![Uint128(17), Uint128(123), Uint128(540), Uint128(82)]; let expected = Uint128(762); - let sum_as_ref = nums.iter().sum(); + let sum_as_ref: Uint128 = nums.iter().sum(); assert_eq!(expected, sum_as_ref); - let sum_as_owned = nums.into_iter().sum(); + let sum_as_owned: Uint128 = nums.into_iter().sum(); assert_eq!(expected, sum_as_owned); } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 9150bed56..30fc9984b 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -608,6 +608,12 @@ where } } +impl PartialEq<&Uint256> for Uint256 { + fn eq(&self, rhs: &&Uint256) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -1397,10 +1403,10 @@ mod tests { ]; let expected = Uint256::from(762u32); - let sum_as_ref = nums.iter().sum(); + let sum_as_ref: Uint256 = nums.iter().sum(); assert_eq!(expected, sum_as_ref); - let sum_as_owned = nums.into_iter().sum(); + let sum_as_owned: Uint256 = nums.into_iter().sum(); assert_eq!(expected, sum_as_owned); } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index ceeb7b869..0714f3400 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -569,6 +569,12 @@ where } } +impl PartialEq<&Uint512> for Uint512 { + fn eq(&self, rhs: &&Uint512) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -1032,10 +1038,10 @@ mod tests { ]; let expected = Uint512::from(762u32); - let sum_as_ref = nums.iter().sum(); + let sum_as_ref: Uint512 = nums.iter().sum(); assert_eq!(expected, sum_as_ref); - let sum_as_owned = nums.into_iter().sum(); + let sum_as_owned: Uint512 = nums.into_iter().sum(); assert_eq!(expected, sum_as_owned); } diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 6bf19b2c3..1b377bfbc 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -465,6 +465,12 @@ where } } +impl PartialEq<&Uint64> for Uint64 { + fn eq(&self, rhs: &&Uint64) -> bool { + self == *rhs + } +} + #[cfg(test)] mod tests { use super::*; @@ -767,10 +773,10 @@ mod tests { let nums = vec![Uint64(17), Uint64(123), Uint64(540), Uint64(82)]; let expected = Uint64(762); - let sum_as_ref = nums.iter().sum(); + let sum_as_ref: Uint64 = nums.iter().sum(); assert_eq!(expected, sum_as_ref); - let sum_as_owned = nums.into_iter().sum(); + let sum_as_owned: Uint64 = nums.into_iter().sum(); assert_eq!(expected, sum_as_owned); } From 9b4d5beac1fe2ebd008d49a95ecd03b44e823ef6 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Mon, 11 Jul 2022 17:18:02 +0200 Subject: [PATCH 102/344] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af7a4f1f2..e472f8d29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to `Decimal`/`Decimal256`. - cosmwasm-std: Implement `pow`/`saturating_pow` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `PartialEq` for reference on one side and owned value + on the other for all `Uint` and `Decimal` types [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From 5bfe2d1f64a702db2309fbab960c4c12021f29b8 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Fri, 8 Jul 2022 16:53:25 +0200 Subject: [PATCH 103/344] Fix formatting in CHANGELOG; add more cases to saturating_ tests to increase coverage --- CHANGELOG.md | 3 ++- packages/std/src/math/decimal.rs | 16 ++++++++++++++++ packages/std/src/math/decimal256.rs | 16 ++++++++++++++++ packages/std/src/math/uint256.rs | 4 ++++ packages/std/src/math/uint512.rs | 4 ++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae9f3659a..70c570d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,8 @@ and this project adheres to `Decimal`/`Decimal256`. - cosmwasm-std: Implement `pow`/`saturating_pow` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. -- cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for + `Decimal`/`Decimal256`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 9de42e9d5..826f06d50 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1911,18 +1911,34 @@ mod tests { #[test] fn decimal_saturating_works() { + assert_eq!( + Decimal::percent(200).saturating_add(Decimal::percent(200)), + Decimal::percent(400) + ); assert_eq!( Decimal::MAX.saturating_add(Decimal::percent(200)), Decimal::MAX ); + assert_eq!( + Decimal::percent(200).saturating_sub(Decimal::percent(100)), + Decimal::percent(100) + ); assert_eq!( Decimal::zero().saturating_sub(Decimal::percent(200)), Decimal::zero() ); + assert_eq!( + Decimal::percent(200).saturating_mul(Decimal::percent(50)), + Decimal::percent(100) + ); assert_eq!( Decimal::MAX.saturating_mul(Decimal::percent(200)), Decimal::MAX ); + assert_eq!( + Decimal::percent(400).saturating_pow(2u32), + Decimal::percent(1600) + ); assert_eq!(Decimal::MAX.saturating_pow(2u32), Decimal::MAX); } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index fa4e1b0cd..ce76ccb87 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -2061,18 +2061,34 @@ mod tests { #[test] fn decimal256_saturating_works() { + assert_eq!( + Decimal256::percent(200).saturating_add(Decimal256::percent(200)), + Decimal256::percent(400) + ); assert_eq!( Decimal256::MAX.saturating_add(Decimal256::percent(200)), Decimal256::MAX ); + assert_eq!( + Decimal256::percent(200).saturating_sub(Decimal256::percent(100)), + Decimal256::percent(100) + ); assert_eq!( Decimal256::zero().saturating_sub(Decimal256::percent(200)), Decimal256::zero() ); + assert_eq!( + Decimal256::percent(200).saturating_mul(Decimal256::percent(50)), + Decimal256::percent(100) + ); assert_eq!( Decimal256::MAX.saturating_mul(Decimal256::percent(200)), Decimal256::MAX ); + assert_eq!( + Decimal256::percent(400).saturating_pow(2u32), + Decimal256::percent(1600) + ); assert_eq!(Decimal256::MAX.saturating_pow(2u32), Decimal256::MAX); } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 14a0504c5..57b3b78c1 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -1472,6 +1472,10 @@ mod tests { Uint256::MAX.saturating_mul(Uint256::from(2u32)), Uint256::MAX ); + assert_eq!( + Uint256::from(4u32).saturating_pow(2u32), + Uint256::from(16u32) + ); assert_eq!(Uint256::MAX.saturating_pow(2u32), Uint256::MAX); } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index bb7211367..40e2e55ff 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -1107,6 +1107,10 @@ mod tests { Uint512::MAX.saturating_mul(Uint512::from(2u32)), Uint512::MAX ); + assert_eq!( + Uint512::from(4u32).saturating_pow(2u32), + Uint512::from(16u32) + ); assert_eq!(Uint512::MAX.saturating_pow(2u32), Uint512::MAX); } From f40b7be09f0350cf7c45a4828e10ecae1fbd3a68 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 11:29:54 +0200 Subject: [PATCH 104/344] MIGRATING entry for new schema gen --- MIGRATING.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/MIGRATING.md b/MIGRATING.md index 335b034ad..4fe226c63 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -4,6 +4,88 @@ This guide explains what is needed to upgrade contracts when migrating over major releases of `cosmwasm`. Note that you can also view the [complete CHANGELOG](./CHANGELOG.md) to understand the differences. +## 1.0.0 -> ? + +- There are changes to how we generate schemas, resulting in less boilerplace + maintenance for smart contract devs. The changes are backwards-compatible - + old contracts will continue working for a while, but it's highly recommended + to migrate now. + + Your contract should have a `cosmwasm_schema` dependency in its `Cargo.toml` + file. Move it from `dev-dependencies`to regular `dependencies`. + + ```diff + [dependencies] + + cosmwasm-schema = { version = "1.0.0" } + cosmwasm-std = { version = "1.0.0", features = ["stargate"] } + cw-storage-plus = { path = "../../packages/storage-plus", version = "0.10.0" } + schemars = "0.8.1" + serde = { version = "1.0.103", default-features = false, features = ["derive"] } + thiserror = { version = "1.0.23" } + + [dev-dependencies] + - cosmwasm-schema = { version = "1.0.0" } + ``` + + Types you send to the contract and receive back are annotated with a bunch of + derives and sometimes `serde` annotations. Remove all those attributes and + replace them with `#[cosmwasm_schema::cw_serde]`. + + ```diff + + use cosmwasm_schema::{cw_serde, QueryResponses}; + + // *snip* + + - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] + - #[serde(deny_unknown_fields, rename_all = "snake_case")] + + #[cw_serde] + pub enum ExecuteMsg { + Release {}, + Argon2 { + mem_cost: u32, + time_cost: u32, + }, + } + ``` + + Derive `cosmwasm_schema::QueryResponses` for your `QueryMsg` type and annotate + each query with its return types. This lets the interface description file + (schema) generation know what return types to include - and therefore, any + clients relying on the generated schemas will also know how to interpret + response data from your contract. + + ```diff + #[cw_serde] + + #[derive(QueryResponses)] + pub enum QueryMsg { + + #[returns(VerifierResponse)] + Verifier {}, + + #[returns(Uint128)] + Balance { address: String }, + } + ``` + + The boilerplate in `examples/schema.rs` is also replaced with a macro + invocation. Just give it all the types sent to the contract's entrypoints. + Skip the ones that are not present in the contract - the only mandatory field + is `instantiate`. + + ```rust + use cosmwasm_schema::write_api; + + use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg}; + + fn main() { + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + sudo: SudoMsg, + migrate: MigrateMsg, + } + } + ``` + ## 1.0.0-beta -> 1.0.0 - The minimum Rust supported version is 1.56.1. Verify your Rust version is >= From 8cf39a5985fa4dcf202f1bbf1f7aa7fb3e26aa6c Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 11:36:10 +0200 Subject: [PATCH 105/344] schema: rename #[msg] to #[cw_serde] --- contracts/hackatom/src/msg.rs | 18 +++++++++--------- .../schema-derive/src/{msg.rs => cw_serde.rs} | 8 ++++---- packages/schema-derive/src/lib.rs | 6 +++--- packages/schema/src/lib.rs | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) rename packages/schema-derive/src/{msg.rs => cw_serde.rs} (92%) diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 746dc5297..7d06618f1 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -1,8 +1,8 @@ -use cosmwasm_schema::{msg, QueryResponses}; +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{AllBalanceResponse, Binary, Coin}; -#[msg] +#[cw_serde] pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -15,7 +15,7 @@ pub struct InstantiateMsg { /// /// Note that the contract doesn't enforce permissions here, this is done /// by blockchain logic (in the future by blockchain governance) -#[msg] +#[cw_serde] pub struct MigrateMsg { pub verifier: String, } @@ -23,7 +23,7 @@ pub struct MigrateMsg { /// SudoMsg is only exposed for internal Cosmos SDK modules to call. /// This is showing how we can expose "admin" functionality than can not be called by /// external users or contracts, but only trusted (native/Go) code in the blockchain -#[msg] +#[cw_serde] pub enum SudoMsg { StealFunds { recipient: String, @@ -33,7 +33,7 @@ pub enum SudoMsg { // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 -#[msg] +#[cw_serde] pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. Release {}, @@ -61,7 +61,7 @@ pub enum ExecuteMsg { UserErrorsInApiCalls {}, } -#[msg] +#[cw_serde] #[derive(QueryResponses)] pub enum QueryMsg { /// returns a human-readable representation of the verifier @@ -82,18 +82,18 @@ pub enum QueryMsg { GetInt {}, } -#[msg] +#[cw_serde] pub struct VerifierResponse { pub verifier: String, } -#[msg] +#[cw_serde] pub struct RecurseResponse { /// hashed is the result of running sha256 "work+1" times on the contract's human address pub hashed: Binary, } -#[msg] +#[cw_serde] pub struct IntResponse { pub int: u32, } diff --git a/packages/schema-derive/src/msg.rs b/packages/schema-derive/src/cw_serde.rs similarity index 92% rename from packages/schema-derive/src/msg.rs rename to packages/schema-derive/src/cw_serde.rs index 353e03105..98e430dad 100644 --- a/packages/schema-derive/src/msg.rs +++ b/packages/schema-derive/src/cw_serde.rs @@ -1,6 +1,6 @@ use syn::{parse_quote, DeriveInput}; -pub fn msg_impl(input: DeriveInput) -> DeriveInput { +pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { match input.data { syn::Data::Struct(_) => parse_quote! { #[derive( @@ -36,7 +36,7 @@ mod tests { #[test] fn structs() { - let expanded = msg_impl(parse_quote! { + let expanded = cw_serde_impl(parse_quote! { pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -64,7 +64,7 @@ mod tests { #[test] fn enums() { - let expanded = msg_impl(parse_quote! { + let expanded = cw_serde_impl(parse_quote! { pub enum SudoMsg { StealFunds { recipient: String, @@ -97,7 +97,7 @@ mod tests { #[test] #[should_panic(expected = "unions are not supported")] fn unions() { - msg_impl(parse_quote! { + cw_serde_impl(parse_quote! { pub union SudoMsg { x: u32, y: u32, diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 3d0064533..4bb0f6518 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,5 +1,5 @@ mod generate_api; -mod msg; +mod cw_serde; mod query_responses; use quote::ToTokens; @@ -33,13 +33,13 @@ pub fn generate_api(input: proc_macro::TokenStream) -> proc_macro::TokenStream { } #[proc_macro_attribute] -pub fn msg( +pub fn cw_serde( _attr: proc_macro::TokenStream, input: proc_macro::TokenStream, ) -> proc_macro::TokenStream { let input = parse_macro_input!(input as DeriveInput); - let expanded = msg::msg_impl(input).into_token_stream(); + let expanded = cw_serde::cw_serde_impl(input).into_token_stream(); proc_macro::TokenStream::from(expanded) } diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 89ad5da5a..e30070cc5 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,6 +10,7 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports +pub use cosmwasm_schema_derive::cw_serde; /// Generates an [`Api`](crate::Api) for the contract. The body describes the message /// types exported in the schema and allows setting contract name and version overrides. /// @@ -36,7 +37,6 @@ pub use remove::remove_schemas; /// }.render(); /// ``` pub use cosmwasm_schema_derive::generate_api; -pub use cosmwasm_schema_derive::msg; /// Takes care of generating the interface description file for a contract. The body describes /// the message types included and allows setting contract name and version overrides. /// From 1e05e7eeac406b4e9f15e0700f8997a7baf0c7f6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 11:47:28 +0200 Subject: [PATCH 106/344] schema: add documentation for `cw_serde` --- packages/schema/src/lib.rs | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index e30070cc5..09001b9b0 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -10,6 +10,30 @@ pub use query_response::QueryResponses; pub use remove::remove_schemas; // Re-exports +/// An attribute macro that annotates types with things they need to be properly (de)serialized +/// for use in CosmWasm contract messages and/or responses, and also for schema generation. +/// +/// This derives things like `serde::Serialize` or `schemars::JsonSchema`, makes sure +/// variants are `snake_case` in the resulting JSON, and so forth. +/// +/// # Example +/// ``` +/// use cosmwasm_schema::{cw_serde, QueryResponses}; +/// +/// #[cw_serde] +/// pub struct InstantiateMsg { +/// owner: String, +/// } +/// +/// #[cw_serde] +/// #[derive(QueryResponses)] +/// pub enum QueryMsg { +/// #[returns(Vec)] +/// Denoms {}, +/// #[returns(String)] +/// AccountName { account: String }, +/// } +/// ``` pub use cosmwasm_schema_derive::cw_serde; /// Generates an [`Api`](crate::Api) for the contract. The body describes the message /// types exported in the schema and allows setting contract name and version overrides. @@ -21,13 +45,12 @@ pub use cosmwasm_schema_derive::cw_serde; /// /// # Example /// ``` -/// use cosmwasm_schema::{generate_api}; -/// use schemars::{JsonSchema}; +/// use cosmwasm_schema::{cw_serde, generate_api}; /// -/// #[derive(JsonSchema)] +/// #[cw_serde] /// struct InstantiateMsg; /// -/// #[derive(JsonSchema)] +/// #[cw_serde] /// struct MigrateMsg; /// /// let api = generate_api! { @@ -53,13 +76,12 @@ pub use cosmwasm_schema_derive::generate_api; /// /// # Example /// ``` -/// use cosmwasm_schema::{write_api}; -/// use schemars::{JsonSchema}; +/// use cosmwasm_schema::{cw_serde, write_api}; /// -/// #[derive(JsonSchema)] +/// #[cw_serde] /// struct InstantiateMsg; /// -/// #[derive(JsonSchema)] +/// #[cw_serde] /// struct MigrateMsg; /// /// write_api! { From 35ab55dcad5d2d5c6bccdc5de53485ba5c99342f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 12:02:05 +0200 Subject: [PATCH 107/344] MIGRATING.md: typo --- MIGRATING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIGRATING.md b/MIGRATING.md index 4fe226c63..6b554a984 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -49,7 +49,7 @@ major releases of `cosmwasm`. Note that you can also view the ``` Derive `cosmwasm_schema::QueryResponses` for your `QueryMsg` type and annotate - each query with its return types. This lets the interface description file + each query with its return type. This lets the interface description file (schema) generation know what return types to include - and therefore, any clients relying on the generated schemas will also know how to interpret response data from your contract. From d32a94b68bfcc98e36d5cbe187bddd34e3c17a50 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 12:03:53 +0200 Subject: [PATCH 108/344] schema-derive: cargo fmt --- packages/schema-derive/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 4bb0f6518..94e9d831e 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -1,5 +1,5 @@ -mod generate_api; mod cw_serde; +mod generate_api; mod query_responses; use quote::ToTokens; From 24653e4448e6d9dfc3136ee30797b745956548f7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 11 Jul 2022 17:46:58 +0200 Subject: [PATCH 109/344] update all contracts to new schema gen standard --- contracts/burner/Cargo.toml | 2 +- contracts/burner/examples/schema.rs | 16 +- contracts/burner/schema/burner.json | 30 + contracts/burner/schema/instantiate_msg.json | 6 - contracts/burner/schema/migrate_msg.json | 13 - contracts/burner/src/msg.rs | 7 +- contracts/crypto-verify/Cargo.toml | 2 +- contracts/crypto-verify/examples/schema.rs | 16 +- .../crypto-verify/schema/crypto-verify.json | 371 ++++ .../crypto-verify/schema/instantiate_msg.json | 5 - contracts/crypto-verify/schema/query_msg.json | 262 --- contracts/crypto-verify/src/msg.rs | 19 +- contracts/floaty/Cargo.toml | 2 +- contracts/floaty/examples/schema.rs | 28 +- contracts/floaty/schema/balance_response.json | 39 - contracts/floaty/schema/execute_msg.json | 19 - contracts/floaty/schema/floaty.json | 196 ++ contracts/floaty/schema/instantiate_msg.json | 17 - contracts/floaty/schema/query_msg.json | 69 - contracts/floaty/schema/state.json | 27 - .../floaty/schema/verifier_response.json | 13 - contracts/floaty/src/msg.rs | 20 +- contracts/hackatom/src/msg.rs | 4 +- contracts/ibc-reflect-send/Cargo.toml | 2 +- .../schema/account_response.json | 1 + .../schema/admin_response.json | 3 +- .../ibc-reflect-send/schema/execute_msg.json | 12 +- .../schema/instantiate_msg.json | 3 +- .../schema/list_accounts_response.json | 4 +- .../ibc-reflect-send/schema/query_msg.json | 9 +- contracts/ibc-reflect-send/src/msg.rs | 24 +- contracts/ibc-reflect/Cargo.toml | 2 +- .../schema/acknowledgement_msg_balances.json | 3 +- .../schema/acknowledgement_msg_who_am_i.json | 3 +- .../ibc-reflect/schema/instantiate_msg.json | 3 +- contracts/ibc-reflect/schema/packet_msg.json | 9 +- contracts/ibc-reflect/schema/query_msg.json | 6 +- contracts/ibc-reflect/src/msg.rs | 27 +- contracts/queue/Cargo.toml | 2 +- contracts/queue/examples/schema.rs | 29 +- contracts/queue/schema/count_response.json | 15 - contracts/queue/schema/execute_msg.json | 39 - contracts/queue/schema/instantiate_msg.json | 5 - contracts/queue/schema/item.json | 14 - contracts/queue/schema/list_response.json | 39 - contracts/queue/schema/migrate_msg.json | 5 - contracts/queue/schema/query_msg.json | 77 - contracts/queue/schema/queue.json | 249 +++ contracts/queue/schema/sum_response.json | 14 - contracts/queue/src/msg.rs | 31 +- contracts/reflect/Cargo.toml | 2 +- contracts/reflect/examples/schema.rs | 37 +- .../reflect/schema/capitalized_response.json | 13 - contracts/reflect/schema/chain_response.json | 19 - contracts/reflect/schema/custom_msg.json | 37 - contracts/reflect/schema/execute_msg.json | 850 --------- contracts/reflect/schema/instantiate_msg.json | 5 - contracts/reflect/schema/owner_response.json | 13 - contracts/reflect/schema/query_msg.json | 545 ------ contracts/reflect/schema/raw_response.json | 24 - contracts/reflect/schema/reflect.json | 1612 +++++++++++++++++ .../schema/response_for__custom_msg.json | 860 --------- contracts/reflect/schema/state.json | 19 - contracts/reflect/src/msg.rs | 55 +- contracts/staking/Cargo.toml | 2 +- contracts/staking/examples/schema.rs | 34 +- .../staking/schema/balance_response.json | 19 - contracts/staking/schema/claims_response.json | 19 - contracts/staking/schema/execute_msg.json | 110 -- contracts/staking/schema/instantiate_msg.json | 59 - contracts/staking/schema/investment_info.json | 61 - .../staking/schema/investment_response.json | 74 - contracts/staking/schema/query_msg.json | 74 - contracts/staking/schema/staking.json | 406 +++++ contracts/staking/schema/supply.json | 43 - contracts/staking/schema/token_info.json | 27 - .../staking/schema/token_info_response.json | 27 - contracts/staking/src/msg.rs | 24 +- 78 files changed, 3051 insertions(+), 3832 deletions(-) create mode 100644 contracts/burner/schema/burner.json delete mode 100644 contracts/burner/schema/instantiate_msg.json delete mode 100644 contracts/burner/schema/migrate_msg.json create mode 100644 contracts/crypto-verify/schema/crypto-verify.json delete mode 100644 contracts/crypto-verify/schema/instantiate_msg.json delete mode 100644 contracts/crypto-verify/schema/query_msg.json delete mode 100644 contracts/floaty/schema/balance_response.json delete mode 100644 contracts/floaty/schema/execute_msg.json create mode 100644 contracts/floaty/schema/floaty.json delete mode 100644 contracts/floaty/schema/instantiate_msg.json delete mode 100644 contracts/floaty/schema/query_msg.json delete mode 100644 contracts/floaty/schema/state.json delete mode 100644 contracts/floaty/schema/verifier_response.json delete mode 100644 contracts/queue/schema/count_response.json delete mode 100644 contracts/queue/schema/execute_msg.json delete mode 100644 contracts/queue/schema/instantiate_msg.json delete mode 100644 contracts/queue/schema/item.json delete mode 100644 contracts/queue/schema/list_response.json delete mode 100644 contracts/queue/schema/migrate_msg.json delete mode 100644 contracts/queue/schema/query_msg.json create mode 100644 contracts/queue/schema/queue.json delete mode 100644 contracts/queue/schema/sum_response.json delete mode 100644 contracts/reflect/schema/capitalized_response.json delete mode 100644 contracts/reflect/schema/chain_response.json delete mode 100644 contracts/reflect/schema/custom_msg.json delete mode 100644 contracts/reflect/schema/execute_msg.json delete mode 100644 contracts/reflect/schema/instantiate_msg.json delete mode 100644 contracts/reflect/schema/owner_response.json delete mode 100644 contracts/reflect/schema/query_msg.json delete mode 100644 contracts/reflect/schema/raw_response.json create mode 100644 contracts/reflect/schema/reflect.json delete mode 100644 contracts/reflect/schema/response_for__custom_msg.json delete mode 100644 contracts/reflect/schema/state.json delete mode 100644 contracts/staking/schema/balance_response.json delete mode 100644 contracts/staking/schema/claims_response.json delete mode 100644 contracts/staking/schema/execute_msg.json delete mode 100644 contracts/staking/schema/instantiate_msg.json delete mode 100644 contracts/staking/schema/investment_info.json delete mode 100644 contracts/staking/schema/investment_response.json delete mode 100644 contracts/staking/schema/query_msg.json create mode 100644 contracts/staking/schema/staking.json delete mode 100644 contracts/staking/schema/supply.json delete mode 100644 contracts/staking/schema/token_info.json delete mode 100644 contracts/staking/schema/token_info_response.json diff --git a/contracts/burner/Cargo.toml b/contracts/burner/Cargo.toml index ec4c111c3..3aae397b0 100644 --- a/contracts/burner/Cargo.toml +++ b/contracts/burner/Cargo.toml @@ -32,10 +32,10 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] } -cosmwasm-schema = { path = "../../packages/schema" } diff --git a/contracts/burner/examples/schema.rs b/contracts/burner/examples/schema.rs index 264116ab6..cac500c50 100644 --- a/contracts/burner/examples/schema.rs +++ b/contracts/burner/examples/schema.rs @@ -1,16 +1,10 @@ -use std::env::current_dir; -use std::fs::create_dir_all; - -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; +use cosmwasm_schema::write_api; use burner::msg::{InstantiateMsg, MigrateMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(MigrateMsg), &out_dir); + write_api! { + instantiate: InstantiateMsg, + migrate: MigrateMsg, + } } diff --git a/contracts/burner/schema/burner.json b/contracts/burner/schema/burner.json new file mode 100644 index 000000000..58e102e12 --- /dev/null +++ b/contracts/burner/schema/burner.json @@ -0,0 +1,30 @@ +{ + "contract_name": "burner", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "A placeholder where we don't take any input", + "type": "object", + "additionalProperties": false + }, + "execute": null, + "query": null, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "payout" + ], + "properties": { + "payout": { + "type": "string" + } + }, + "additionalProperties": false + }, + "sudo": null, + "responses": null +} diff --git a/contracts/burner/schema/instantiate_msg.json b/contracts/burner/schema/instantiate_msg.json deleted file mode 100644 index e736d03d7..000000000 --- a/contracts/burner/schema/instantiate_msg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "A placeholder where we don't take any input", - "type": "object" -} diff --git a/contracts/burner/schema/migrate_msg.json b/contracts/burner/schema/migrate_msg.json deleted file mode 100644 index b2fd46b4f..000000000 --- a/contracts/burner/schema/migrate_msg.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "type": "object", - "required": [ - "payout" - ], - "properties": { - "payout": { - "type": "string" - } - } -} diff --git a/contracts/burner/src/msg.rs b/contracts/burner/src/msg.rs index 3a705c430..f94800423 100644 --- a/contracts/burner/src/msg.rs +++ b/contracts/burner/src/msg.rs @@ -1,11 +1,10 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; +use cosmwasm_schema::cw_serde; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct MigrateMsg { pub payout: String, } /// A placeholder where we don't take any input -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg {} diff --git a/contracts/crypto-verify/Cargo.toml b/contracts/crypto-verify/Cargo.toml index aada045f4..7f8bb1b93 100644 --- a/contracts/crypto-verify/Cargo.toml +++ b/contracts/crypto-verify/Cargo.toml @@ -33,6 +33,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } hex = "0.4" @@ -44,5 +45,4 @@ sha3 = "0.9" [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] } -cosmwasm-schema = { path = "../../packages/schema" } hex-literal = "0.3.1" diff --git a/contracts/crypto-verify/examples/schema.rs b/contracts/crypto-verify/examples/schema.rs index 2ff51e8d6..10a7388b4 100644 --- a/contracts/crypto-verify/examples/schema.rs +++ b/contracts/crypto-verify/examples/schema.rs @@ -1,16 +1,10 @@ -use std::env::current_dir; -use std::fs::create_dir_all; - -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; +use cosmwasm_schema::write_api; use crypto_verify::msg::{InstantiateMsg, QueryMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + } } diff --git a/contracts/crypto-verify/schema/crypto-verify.json b/contracts/crypto-verify/schema/crypto-verify.json new file mode 100644 index 000000000..58eeee35f --- /dev/null +++ b/contracts/crypto-verify/schema/crypto-verify.json @@ -0,0 +1,371 @@ +{ + "contract_name": "crypto-verify", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "additionalProperties": false + }, + "execute": null, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Cosmos format (secp256k1 verification scheme).", + "type": "object", + "required": [ + "verify_cosmos_signature" + ], + "properties": { + "verify_cosmos_signature": { + "type": "object", + "required": [ + "message", + "public_key", + "signature" + ], + "properties": { + "message": { + "description": "Message to verify.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "public_key": { + "description": "Serialized compressed (33 bytes) or uncompressed (65 bytes) public key.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "signature": { + "description": "Serialized signature. Cosmos format (64 bytes).", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Ethereum text verification (compatible to the eth_sign RPC/web3 enpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign", + "type": "object", + "required": [ + "verify_ethereum_text" + ], + "properties": { + "verify_ethereum_text": { + "type": "object", + "required": [ + "message", + "signature", + "signer_address" + ], + "properties": { + "message": { + "description": "Message to verify. This will be wrapped in the standard container `\"\\x19Ethereum Signed Message:\\n\" + len(message) + message` before verification.", + "type": "string" + }, + "signature": { + "description": "Serialized signature. Fixed length format (64 bytes `r` and `s` plus the one byte `v`).", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "signer_address": { + "description": "Signer address. This is matched case insensitive, so you can provide checksummed and non-checksummed addresses. Checksums are not validated.", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "verify_ethereum_transaction" + ], + "properties": { + "verify_ethereum_transaction": { + "type": "object", + "required": [ + "chain_id", + "data", + "from", + "gas_limit", + "gas_price", + "nonce", + "r", + "s", + "to", + "v", + "value" + ], + "properties": { + "chain_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "from": { + "description": "Ethereum address in hex format (42 characters, starting with 0x)", + "type": "string" + }, + "gas_limit": { + "$ref": "#/definitions/Uint128" + }, + "gas_price": { + "$ref": "#/definitions/Uint128" + }, + "nonce": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "r": { + "$ref": "#/definitions/Binary" + }, + "s": { + "$ref": "#/definitions/Binary" + }, + "to": { + "description": "Ethereum address in hex format (42 characters, starting with 0x)", + "type": "string" + }, + "v": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "value": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Tendermint format (ed25519 verification scheme).", + "type": "object", + "required": [ + "verify_tendermint_signature" + ], + "properties": { + "verify_tendermint_signature": { + "type": "object", + "required": [ + "message", + "public_key", + "signature" + ], + "properties": { + "message": { + "description": "Message to verify.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "public_key": { + "description": "Serialized public key. Tendermint format (32 bytes).", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "signature": { + "description": "Serialized signature. Tendermint format (64 bytes).", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Tendermint format (batch ed25519 verification scheme).", + "type": "object", + "required": [ + "verify_tendermint_batch" + ], + "properties": { + "verify_tendermint_batch": { + "type": "object", + "required": [ + "messages", + "public_keys", + "signatures" + ], + "properties": { + "messages": { + "description": "Messages to verify.", + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + }, + "public_keys": { + "description": "Serialized public keys. Tendermint format (32 bytes).", + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + }, + "signatures": { + "description": "Serialized signatures. Tendermint format (64 bytes).", + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns a list of supported verification schemes. No pagination - this is a short list.", + "type": "object", + "required": [ + "list_verification_schemes" + ], + "properties": { + "list_verification_schemes": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "migrate": null, + "sudo": null, + "responses": { + "list_verification_schemes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListVerificationsResponse", + "type": "object", + "required": [ + "verification_schemes" + ], + "properties": { + "verification_schemes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "verify_cosmos_signature": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifyResponse", + "type": "object", + "required": [ + "verifies" + ], + "properties": { + "verifies": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "verify_ethereum_text": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifyResponse", + "type": "object", + "required": [ + "verifies" + ], + "properties": { + "verifies": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "verify_ethereum_transaction": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifyResponse", + "type": "object", + "required": [ + "verifies" + ], + "properties": { + "verifies": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "verify_tendermint_batch": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifyResponse", + "type": "object", + "required": [ + "verifies" + ], + "properties": { + "verifies": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "verify_tendermint_signature": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifyResponse", + "type": "object", + "required": [ + "verifies" + ], + "properties": { + "verifies": { + "type": "boolean" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/crypto-verify/schema/instantiate_msg.json b/contracts/crypto-verify/schema/instantiate_msg.json deleted file mode 100644 index 44588cf22..000000000 --- a/contracts/crypto-verify/schema/instantiate_msg.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object" -} diff --git a/contracts/crypto-verify/schema/query_msg.json b/contracts/crypto-verify/schema/query_msg.json deleted file mode 100644 index cb76a65cd..000000000 --- a/contracts/crypto-verify/schema/query_msg.json +++ /dev/null @@ -1,262 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "Cosmos format (secp256k1 verification scheme).", - "type": "object", - "required": [ - "verify_cosmos_signature" - ], - "properties": { - "verify_cosmos_signature": { - "type": "object", - "required": [ - "message", - "public_key", - "signature" - ], - "properties": { - "message": { - "description": "Message to verify.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "public_key": { - "description": "Serialized compressed (33 bytes) or uncompressed (65 bytes) public key.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "signature": { - "description": "Serialized signature. Cosmos format (64 bytes).", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Ethereum text verification (compatible to the eth_sign RPC/web3 enpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign", - "type": "object", - "required": [ - "verify_ethereum_text" - ], - "properties": { - "verify_ethereum_text": { - "type": "object", - "required": [ - "message", - "signature", - "signer_address" - ], - "properties": { - "message": { - "description": "Message to verify. This will be wrapped in the standard container `\"\\x19Ethereum Signed Message:\\n\" + len(message) + message` before verification.", - "type": "string" - }, - "signature": { - "description": "Serialized signature. Fixed length format (64 bytes `r` and `s` plus the one byte `v`).", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "signer_address": { - "description": "Signer address. This is matched case insensitive, so you can provide checksummed and non-checksummed addresses. Checksums are not validated.", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "verify_ethereum_transaction" - ], - "properties": { - "verify_ethereum_transaction": { - "type": "object", - "required": [ - "chain_id", - "data", - "from", - "gas_limit", - "gas_price", - "nonce", - "r", - "s", - "to", - "v", - "value" - ], - "properties": { - "chain_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "from": { - "description": "Ethereum address in hex format (42 characters, starting with 0x)", - "type": "string" - }, - "gas_limit": { - "$ref": "#/definitions/Uint128" - }, - "gas_price": { - "$ref": "#/definitions/Uint128" - }, - "nonce": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "r": { - "$ref": "#/definitions/Binary" - }, - "s": { - "$ref": "#/definitions/Binary" - }, - "to": { - "description": "Ethereum address in hex format (42 characters, starting with 0x)", - "type": "string" - }, - "v": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Uint128" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Tendermint format (ed25519 verification scheme).", - "type": "object", - "required": [ - "verify_tendermint_signature" - ], - "properties": { - "verify_tendermint_signature": { - "type": "object", - "required": [ - "message", - "public_key", - "signature" - ], - "properties": { - "message": { - "description": "Message to verify.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "public_key": { - "description": "Serialized public key. Tendermint format (32 bytes).", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "signature": { - "description": "Serialized signature. Tendermint format (64 bytes).", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Tendermint format (batch ed25519 verification scheme).", - "type": "object", - "required": [ - "verify_tendermint_batch" - ], - "properties": { - "verify_tendermint_batch": { - "type": "object", - "required": [ - "messages", - "public_keys", - "signatures" - ], - "properties": { - "messages": { - "description": "Messages to verify.", - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - }, - "public_keys": { - "description": "Serialized public keys. Tendermint format (32 bytes).", - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - }, - "signatures": { - "description": "Serialized signatures. Tendermint format (64 bytes).", - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Returns a list of supported verification schemes. No pagination - this is a short list.", - "type": "object", - "required": [ - "list_verification_schemes" - ], - "properties": { - "list_verification_schemes": { - "type": "object" - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/crypto-verify/src/msg.rs b/contracts/crypto-verify/src/msg.rs index 9e3500e6d..e2a353e2f 100644 --- a/contracts/crypto-verify/src/msg.rs +++ b/contracts/crypto-verify/src/msg.rs @@ -1,14 +1,14 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{Binary, Deps, Uint128}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { /// Cosmos format (secp256k1 verification scheme). + #[returns(VerifyResponse)] VerifyCosmosSignature { /// Message to verify. message: Binary, @@ -21,6 +21,7 @@ pub enum QueryMsg { /// This cannot be used to verify transaction. /// /// See https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign + #[returns(VerifyResponse)] VerifyEthereumText { /// Message to verify. This will be wrapped in the standard container /// `"\x19Ethereum Signed Message:\n" + len(message) + message` before verification. @@ -31,6 +32,7 @@ pub enum QueryMsg { /// This is matched case insensitive, so you can provide checksummed and non-checksummed addresses. Checksums are not validated. signer_address: String, }, + #[returns(VerifyResponse)] VerifyEthereumTransaction { /// Ethereum address in hex format (42 characters, starting with 0x) from: String, @@ -47,6 +49,7 @@ pub enum QueryMsg { v: u64, }, /// Tendermint format (ed25519 verification scheme). + #[returns(VerifyResponse)] VerifyTendermintSignature { /// Message to verify. message: Binary, @@ -56,6 +59,7 @@ pub enum QueryMsg { public_key: Binary, }, /// Tendermint format (batch ed25519 verification scheme). + #[returns(VerifyResponse)] VerifyTendermintBatch { /// Messages to verify. messages: Vec, @@ -66,15 +70,16 @@ pub enum QueryMsg { }, /// Returns a list of supported verification schemes. /// No pagination - this is a short list. + #[returns(ListVerificationsResponse)] ListVerificationSchemes {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct VerifyResponse { pub verifies: bool, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct ListVerificationsResponse { pub verification_schemes: Vec, } diff --git a/contracts/floaty/Cargo.toml b/contracts/floaty/Cargo.toml index d4cfd57f8..c7894573a 100644 --- a/contracts/floaty/Cargo.toml +++ b/contracts/floaty/Cargo.toml @@ -31,6 +31,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -38,6 +39,5 @@ sha2 = "0.9.1" thiserror = "1.0" [dev-dependencies] -cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-storage = { path = "../../packages/storage" } cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] } diff --git a/contracts/floaty/examples/schema.rs b/contracts/floaty/examples/schema.rs index 928cbd6a2..b0a8a02b0 100644 --- a/contracts/floaty/examples/schema.rs +++ b/contracts/floaty/examples/schema.rs @@ -1,25 +1,11 @@ -use std::env::current_dir; -use std::fs::create_dir_all; +use cosmwasm_schema::write_api; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; -use cosmwasm_std::BalanceResponse; - -use floaty::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, VerifierResponse}; -use floaty::state::State; +use floaty::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - // messages - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); - export_schema(&schema_for!(VerifierResponse), &out_dir); - export_schema(&schema_for!(BalanceResponse), &out_dir); - - // state - export_schema(&schema_for!(State), &out_dir); + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + } } diff --git a/contracts/floaty/schema/balance_response.json b/contracts/floaty/schema/balance_response.json deleted file mode 100644 index 4e3b16aa4..000000000 --- a/contracts/floaty/schema/balance_response.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "BalanceResponse", - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Always returns a Coin with the requested denom. This may be of 0 amount if no such funds.", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - } - }, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/floaty/schema/execute_msg.json b/contracts/floaty/schema/execute_msg.json deleted file mode 100644 index 6d081ea8f..000000000 --- a/contracts/floaty/schema/execute_msg.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", - "type": "object", - "required": [ - "release" - ], - "properties": { - "release": { - "type": "object" - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/floaty/schema/floaty.json b/contracts/floaty/schema/floaty.json new file mode 100644 index 000000000..b99b4831b --- /dev/null +++ b/contracts/floaty/schema/floaty.json @@ -0,0 +1,196 @@ +{ + "contract_name": "floaty", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "beneficiary", + "verifier" + ], + "properties": { + "beneficiary": { + "type": "string" + }, + "verifier": { + "type": "string" + } + }, + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", + "type": "object", + "required": [ + "release" + ], + "properties": { + "release": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", + "type": "object", + "required": [ + "other_balance" + ], + "properties": { + "other_balance": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", + "type": "object", + "required": [ + "recurse" + ], + "properties": { + "recurse": { + "type": "object", + "required": [ + "depth", + "work" + ], + "properties": { + "depth": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "work": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": null, + "sudo": null, + "responses": { + "other_balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AllBalanceResponse", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Returns all non-zero coins held by this account.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "recurse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RecurseResponse", + "type": "object", + "required": [ + "hashed" + ], + "properties": { + "hashed": { + "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "verifier": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VerifierResponse", + "type": "object", + "required": [ + "verifier" + ], + "properties": { + "verifier": { + "type": "string" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/floaty/schema/instantiate_msg.json b/contracts/floaty/schema/instantiate_msg.json deleted file mode 100644 index 7f844a506..000000000 --- a/contracts/floaty/schema/instantiate_msg.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "beneficiary", - "verifier" - ], - "properties": { - "beneficiary": { - "type": "string" - }, - "verifier": { - "type": "string" - } - } -} diff --git a/contracts/floaty/schema/query_msg.json b/contracts/floaty/schema/query_msg.json deleted file mode 100644 index 29bd11290..000000000 --- a/contracts/floaty/schema/query_msg.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", - "type": "object", - "required": [ - "other_balance" - ], - "properties": { - "other_balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/floaty/schema/state.json b/contracts/floaty/schema/state.json deleted file mode 100644 index 8462e9fb3..000000000 --- a/contracts/floaty/schema/state.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "State", - "type": "object", - "required": [ - "beneficiary", - "funder", - "verifier" - ], - "properties": { - "beneficiary": { - "$ref": "#/definitions/Addr" - }, - "funder": { - "$ref": "#/definitions/Addr" - }, - "verifier": { - "$ref": "#/definitions/Addr" - } - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - } - } -} diff --git a/contracts/floaty/schema/verifier_response.json b/contracts/floaty/schema/verifier_response.json deleted file mode 100644 index 8af8ef368..000000000 --- a/contracts/floaty/schema/verifier_response.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - } -} diff --git a/contracts/floaty/src/msg.rs b/contracts/floaty/src/msg.rs index c3297aa7a..926493b1c 100644 --- a/contracts/floaty/src/msg.rs +++ b/contracts/floaty/src/msg.rs @@ -1,9 +1,7 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::Binary; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -11,34 +9,36 @@ pub struct InstantiateMsg { // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. Release {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { /// returns a human-readable representation of the verifier /// use to ensure query path works in integration tests + #[returns(VerifierResponse)] Verifier {}, /// This returns cosmwasm_std::AllBalanceResponse to demo use of the querier + #[returns(cosmwasm_std::AllBalanceResponse)] OtherBalance { address: String }, /// Recurse will execute a query into itself up to depth-times and return /// Each step of the recursion may perform some extra work to test gas metering /// (`work` rounds of sha256 on contract). /// Now that we have Env, we can auto-calculate the address to recurse into + #[returns(RecurseResponse)] Recurse { depth: u32, work: u32 }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct VerifierResponse { pub verifier: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct RecurseResponse { /// hashed is the result of running sha256 "work+1" times on the contract's human address pub hashed: Binary, diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 7d06618f1..22cb25558 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use cosmwasm_std::{AllBalanceResponse, Binary, Coin}; +use cosmwasm_std::{Binary, Coin}; #[cw_serde] pub struct InstantiateMsg { @@ -69,7 +69,7 @@ pub enum QueryMsg { #[returns(VerifierResponse)] Verifier {}, /// This returns cosmwasm_std::AllBalanceResponse to demo use of the querier - #[returns(AllBalanceResponse)] + #[returns(cosmwasm_std::AllBalanceResponse)] OtherBalance { address: String }, /// Recurse will execute a query into itself up to depth-times and return /// Each step of the recursion may perform some extra work to test gas metering diff --git a/contracts/ibc-reflect-send/Cargo.toml b/contracts/ibc-reflect-send/Cargo.toml index 6460b58ed..1eebbe9bf 100644 --- a/contracts/ibc-reflect-send/Cargo.toml +++ b/contracts/ibc-reflect-send/Cargo.toml @@ -32,6 +32,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator", "staking", "stargate"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } schemars = "0.8.1" @@ -39,4 +40,3 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator", "stargate"] } -cosmwasm-schema = { path = "../../packages/schema" } diff --git a/contracts/ibc-reflect-send/schema/account_response.json b/contracts/ibc-reflect-send/schema/account_response.json index d6e05cc5e..894e5b5de 100644 --- a/contracts/ibc-reflect-send/schema/account_response.json +++ b/contracts/ibc-reflect-send/schema/account_response.json @@ -29,6 +29,7 @@ } } }, + "additionalProperties": false, "definitions": { "Coin": { "type": "object", diff --git a/contracts/ibc-reflect-send/schema/admin_response.json b/contracts/ibc-reflect-send/schema/admin_response.json index b0d3272d0..627be7a02 100644 --- a/contracts/ibc-reflect-send/schema/admin_response.json +++ b/contracts/ibc-reflect-send/schema/admin_response.json @@ -9,5 +9,6 @@ "admin": { "type": "string" } - } + }, + "additionalProperties": false } diff --git a/contracts/ibc-reflect-send/schema/execute_msg.json b/contracts/ibc-reflect-send/schema/execute_msg.json index 0741af73c..3bbae221f 100644 --- a/contracts/ibc-reflect-send/schema/execute_msg.json +++ b/contracts/ibc-reflect-send/schema/execute_msg.json @@ -18,7 +18,8 @@ "admin": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -45,7 +46,8 @@ "$ref": "#/definitions/CosmosMsg_for_Empty" } } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -65,7 +67,8 @@ "channel_id": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -92,7 +95,8 @@ "description": "The channel to use for ibctransfer. This is bound to a different port and handled by a different module. It should connect to the same chain as the reflect_channel_id does", "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/ibc-reflect-send/schema/instantiate_msg.json b/contracts/ibc-reflect-send/schema/instantiate_msg.json index 149ba9c4d..4eb2ede31 100644 --- a/contracts/ibc-reflect-send/schema/instantiate_msg.json +++ b/contracts/ibc-reflect-send/schema/instantiate_msg.json @@ -2,5 +2,6 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "description": "This needs no info. Owner of the contract is whoever signed the InstantiateMsg.", - "type": "object" + "type": "object", + "additionalProperties": false } diff --git a/contracts/ibc-reflect-send/schema/list_accounts_response.json b/contracts/ibc-reflect-send/schema/list_accounts_response.json index 7c63981f8..bb03b416b 100644 --- a/contracts/ibc-reflect-send/schema/list_accounts_response.json +++ b/contracts/ibc-reflect-send/schema/list_accounts_response.json @@ -13,6 +13,7 @@ } } }, + "additionalProperties": false, "definitions": { "AccountInfo": { "type": "object", @@ -46,7 +47,8 @@ "$ref": "#/definitions/Coin" } } - } + }, + "additionalProperties": false }, "Coin": { "type": "object", diff --git a/contracts/ibc-reflect-send/schema/query_msg.json b/contracts/ibc-reflect-send/schema/query_msg.json index 17d10a2d1..05a60cc1b 100644 --- a/contracts/ibc-reflect-send/schema/query_msg.json +++ b/contracts/ibc-reflect-send/schema/query_msg.json @@ -9,7 +9,8 @@ ], "properties": { "admin": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -21,7 +22,8 @@ ], "properties": { "list_accounts": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -41,7 +43,8 @@ "channel_id": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/ibc-reflect-send/src/msg.rs b/contracts/ibc-reflect-send/src/msg.rs index ac69b36d6..a04ca4d66 100644 --- a/contracts/ibc-reflect-send/src/msg.rs +++ b/contracts/ibc-reflect-send/src/msg.rs @@ -1,16 +1,13 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{Coin, CosmosMsg, Empty, Timestamp}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; use crate::state::AccountData; /// This needs no info. Owner of the contract is whoever signed the InstantiateMsg. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub struct InstantiateMsg {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ExecuteMsg { /// Changes the admin UpdateAdmin { @@ -37,28 +34,31 @@ pub enum ExecuteMsg { }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { // Returns current admin + #[returns(AdminResponse)] Admin {}, // Shows all open accounts (incl. remote info) + #[returns(ListAccountsResponse)] ListAccounts {}, // Get account for one channel + #[returns(AccountInfo)] Account { channel_id: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct AdminResponse { pub admin: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct ListAccountsResponse { pub accounts: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct AccountInfo { pub channel_id: String, /// last block balance was updated (0 is never) @@ -80,7 +80,7 @@ impl AccountInfo { } } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct AccountResponse { /// last block balance was updated (0 is never) pub last_update_time: Timestamp, diff --git a/contracts/ibc-reflect/Cargo.toml b/contracts/ibc-reflect/Cargo.toml index 0622414f3..99775b8f5 100644 --- a/contracts/ibc-reflect/Cargo.toml +++ b/contracts/ibc-reflect/Cargo.toml @@ -32,6 +32,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator", "ibc3"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } schemars = "0.8.1" @@ -39,4 +40,3 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator", "stargate"] } -cosmwasm-schema = { path = "../../packages/schema" } diff --git a/contracts/ibc-reflect/schema/acknowledgement_msg_balances.json b/contracts/ibc-reflect/schema/acknowledgement_msg_balances.json index cf09b7c4c..20e956cd3 100644 --- a/contracts/ibc-reflect/schema/acknowledgement_msg_balances.json +++ b/contracts/ibc-reflect/schema/acknowledgement_msg_balances.json @@ -47,7 +47,8 @@ "$ref": "#/definitions/Coin" } } - } + }, + "additionalProperties": false }, "Coin": { "type": "object", diff --git a/contracts/ibc-reflect/schema/acknowledgement_msg_who_am_i.json b/contracts/ibc-reflect/schema/acknowledgement_msg_who_am_i.json index bfbabf683..57c0933f8 100644 --- a/contracts/ibc-reflect/schema/acknowledgement_msg_who_am_i.json +++ b/contracts/ibc-reflect/schema/acknowledgement_msg_who_am_i.json @@ -40,7 +40,8 @@ "account": { "type": "string" } - } + }, + "additionalProperties": false } } } diff --git a/contracts/ibc-reflect/schema/instantiate_msg.json b/contracts/ibc-reflect/schema/instantiate_msg.json index 9bcdcf288..1320f1a0b 100644 --- a/contracts/ibc-reflect/schema/instantiate_msg.json +++ b/contracts/ibc-reflect/schema/instantiate_msg.json @@ -12,5 +12,6 @@ "format": "uint64", "minimum": 0.0 } - } + }, + "additionalProperties": false } diff --git a/contracts/ibc-reflect/schema/packet_msg.json b/contracts/ibc-reflect/schema/packet_msg.json index 1517ce559..71e3519d0 100644 --- a/contracts/ibc-reflect/schema/packet_msg.json +++ b/contracts/ibc-reflect/schema/packet_msg.json @@ -20,7 +20,8 @@ "$ref": "#/definitions/CosmosMsg_for_Empty" } } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -32,7 +33,8 @@ ], "properties": { "who_am_i": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false @@ -44,7 +46,8 @@ ], "properties": { "balances": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/ibc-reflect/schema/query_msg.json b/contracts/ibc-reflect/schema/query_msg.json index 9a89af3f7..2fb7b34e6 100644 --- a/contracts/ibc-reflect/schema/query_msg.json +++ b/contracts/ibc-reflect/schema/query_msg.json @@ -18,7 +18,8 @@ "channel_id": { "type": "string" } - } + }, + "additionalProperties": false } }, "additionalProperties": false @@ -31,7 +32,8 @@ ], "properties": { "list_accounts": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/ibc-reflect/src/msg.rs b/contracts/ibc-reflect/src/msg.rs index 0a43def07..9e9551be0 100644 --- a/contracts/ibc-reflect/src/msg.rs +++ b/contracts/ibc-reflect/src/msg.rs @@ -1,48 +1,47 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{Coin, ContractResult, CosmosMsg}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; /// Just needs to know the code_id of a reflect contract to spawn sub-accounts -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg { pub reflect_code_id: u64, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { /// Returns (reflect) account that is attached to this channel, /// or none. + #[returns(AccountResponse)] Account { channel_id: String }, /// Returns all (channel, reflect_account) pairs. /// No pagination - this is a test contract + #[returns(ListAccountsResponse)] ListAccounts {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct AccountResponse { pub account: Option, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct ListAccountsResponse { pub accounts: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct AccountInfo { pub account: String, pub channel_id: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ReflectExecuteMsg { ReflectMsg { msgs: Vec }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum PacketMsg { Dispatch { msgs: Vec }, WhoAmI {}, @@ -59,14 +58,14 @@ pub type DispatchResponse = (); /// This is the success response we send on ack for PacketMsg::WhoAmI. /// Return the caller's account address on the remote chain -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct WhoAmIResponse { pub account: String, } /// This is the success response we send on ack for PacketMsg::Balance. /// Just acknowledge success or error -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct BalancesResponse { pub account: String, pub balances: Vec, diff --git a/contracts/queue/Cargo.toml b/contracts/queue/Cargo.toml index 07012987e..84a5d4d79 100644 --- a/contracts/queue/Cargo.toml +++ b/contracts/queue/Cargo.toml @@ -34,10 +34,10 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] library = [] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] } diff --git a/contracts/queue/examples/schema.rs b/contracts/queue/examples/schema.rs index c603a8862..9e9cc138a 100644 --- a/contracts/queue/examples/schema.rs +++ b/contracts/queue/examples/schema.rs @@ -1,25 +1,12 @@ -use std::env::current_dir; -use std::fs::create_dir_all; +use cosmwasm_schema::write_api; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; - -use queue::msg::{ - CountResponse, ExecuteMsg, InstantiateMsg, ListResponse, MigrateMsg, QueryMsg, SumResponse, -}; -use queue::state::Item; +use queue::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(MigrateMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); - export_schema(&schema_for!(Item), &out_dir); - export_schema(&schema_for!(CountResponse), &out_dir); - export_schema(&schema_for!(SumResponse), &out_dir); - export_schema(&schema_for!(ListResponse), &out_dir); + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + migrate: MigrateMsg, + } } diff --git a/contracts/queue/schema/count_response.json b/contracts/queue/schema/count_response.json deleted file mode 100644 index bbd84024b..000000000 --- a/contracts/queue/schema/count_response.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "CountResponse", - "type": "object", - "required": [ - "count" - ], - "properties": { - "count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } -} diff --git a/contracts/queue/schema/execute_msg.json b/contracts/queue/schema/execute_msg.json deleted file mode 100644 index 432d1e7e7..000000000 --- a/contracts/queue/schema/execute_msg.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "enqueue" - ], - "properties": { - "enqueue": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int32" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "dequeue" - ], - "properties": { - "dequeue": { - "type": "object" - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/queue/schema/instantiate_msg.json b/contracts/queue/schema/instantiate_msg.json deleted file mode 100644 index 44588cf22..000000000 --- a/contracts/queue/schema/instantiate_msg.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object" -} diff --git a/contracts/queue/schema/item.json b/contracts/queue/schema/item.json deleted file mode 100644 index 6a3cf9792..000000000 --- a/contracts/queue/schema/item.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Item", - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int32" - } - } -} diff --git a/contracts/queue/schema/list_response.json b/contracts/queue/schema/list_response.json deleted file mode 100644 index 8ce9047d8..000000000 --- a/contracts/queue/schema/list_response.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ListResponse", - "type": "object", - "required": [ - "early", - "empty", - "late" - ], - "properties": { - "early": { - "description": "List all IDs lower than 0x20", - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "empty": { - "description": "List an empty range, both bounded", - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "late": { - "description": "List all IDs starting from 0x20", - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } -} diff --git a/contracts/queue/schema/migrate_msg.json b/contracts/queue/schema/migrate_msg.json deleted file mode 100644 index 87b18ea76..000000000 --- a/contracts/queue/schema/migrate_msg.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "type": "object" -} diff --git a/contracts/queue/schema/query_msg.json b/contracts/queue/schema/query_msg.json deleted file mode 100644 index 8d1d2914d..000000000 --- a/contracts/queue/schema/query_msg.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "count" - ], - "properties": { - "count": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "sum" - ], - "properties": { - "sum": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "reducer" - ], - "properties": { - "reducer": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "list" - ], - "properties": { - "list": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Opens the given number of iterators for no reason other than testing. Returns and `Empty` response.", - "type": "object", - "required": [ - "open_iterators" - ], - "properties": { - "open_iterators": { - "type": "object", - "required": [ - "count" - ], - "properties": { - "count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/queue/schema/queue.json b/contracts/queue/schema/queue.json new file mode 100644 index 000000000..f46c4f00e --- /dev/null +++ b/contracts/queue/schema/queue.json @@ -0,0 +1,249 @@ +{ + "contract_name": "queue", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "enqueue" + ], + "properties": { + "enqueue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "dequeue" + ], + "properties": { + "dequeue": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "sum" + ], + "properties": { + "sum": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "reducer" + ], + "properties": { + "reducer": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Opens the given number of iterators for no reason other than testing. Returns and `Empty` response.", + "type": "object", + "required": [ + "open_iterators" + ], + "properties": { + "open_iterators": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "count": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CountResponse", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "list": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListResponse", + "type": "object", + "required": [ + "early", + "empty", + "late" + ], + "properties": { + "early": { + "description": "List all IDs lower than 0x20", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "empty": { + "description": "List an empty range, both bounded", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "late": { + "description": "List all IDs starting from 0x20", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "additionalProperties": false + }, + "open_iterators": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Empty", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "reducer": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReducerResponse", + "type": "object", + "required": [ + "counters" + ], + "properties": { + "counters": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "integer", + "format": "int32" + }, + { + "type": "integer", + "format": "int32" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false + }, + "sum": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SumResponse", + "type": "object", + "required": [ + "sum" + ], + "properties": { + "sum": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/queue/schema/sum_response.json b/contracts/queue/schema/sum_response.json deleted file mode 100644 index 089f2381b..000000000 --- a/contracts/queue/schema/sum_response.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SumResponse", - "type": "object", - "required": [ - "sum" - ], - "properties": { - "sum": { - "type": "integer", - "format": "int32" - } - } -} diff --git a/contracts/queue/src/msg.rs b/contracts/queue/src/msg.rs index a3084e237..91ad02e97 100644 --- a/contracts/queue/src/msg.rs +++ b/contracts/queue/src/msg.rs @@ -1,8 +1,6 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; +use cosmwasm_schema::{cw_serde, QueryResponses}; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ExecuteMsg { // Enqueue will add some value to the end of list Enqueue { value: i32 }, @@ -10,47 +8,50 @@ pub enum ExecuteMsg { Dequeue {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct MigrateMsg {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { // how many items are in the queue + #[returns(CountResponse)] Count {}, // total of all values in the queue + #[returns(SumResponse)] Sum {}, // Reducer holds open two iterators at once + #[returns(ReducerResponse)] Reducer {}, + #[returns(ListResponse)] List {}, /// Opens the given number of iterators for no reason other than testing. /// Returns and `Empty` response. - OpenIterators { - count: u32, - }, + #[returns(cosmwasm_std::Empty)] + OpenIterators { count: u32 }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct CountResponse { pub count: u32, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct SumResponse { pub sum: i32, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] // the Vec contains pairs for every element in the queue // (value of item i, sum of all elements where value > value[i]) pub struct ReducerResponse { pub counters: Vec<(i32, i32)>, } -#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +#[cw_serde] pub struct ListResponse { /// List an empty range, both bounded pub empty: Vec, diff --git a/contracts/reflect/Cargo.toml b/contracts/reflect/Cargo.toml index 3484a853c..6e66eded1 100644 --- a/contracts/reflect/Cargo.toml +++ b/contracts/reflect/Cargo.toml @@ -33,6 +33,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate"] } cosmwasm-storage = { path = "../../packages/storage", default-features = false } schemars = "0.8.1" @@ -41,4 +42,3 @@ thiserror = "1.0" [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["stargate"] } -cosmwasm-schema = { path = "../../packages/schema" } diff --git a/contracts/reflect/examples/schema.rs b/contracts/reflect/examples/schema.rs index cc86ed17d..755185e6f 100644 --- a/contracts/reflect/examples/schema.rs +++ b/contracts/reflect/examples/schema.rs @@ -1,34 +1,11 @@ -use std::env::current_dir; -use std::fs::create_dir_all; +use cosmwasm_schema::write_api; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; -use cosmwasm_std::Response; - -use reflect::msg::{ - CapitalizedResponse, ChainResponse, CustomMsg, ExecuteMsg, InstantiateMsg, OwnerResponse, - QueryMsg, RawResponse, -}; -use reflect::state::State; +use reflect::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - // messages - export_schema(&schema_for!(CustomMsg), &out_dir); - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(Response), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); - - // The possible return types for QueryMsg cases - export_schema(&schema_for!(OwnerResponse), &out_dir); - export_schema(&schema_for!(CapitalizedResponse), &out_dir); - export_schema(&schema_for!(ChainResponse), &out_dir); - export_schema(&schema_for!(RawResponse), &out_dir); - - // state - export_schema(&schema_for!(State), &out_dir); + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + } } diff --git a/contracts/reflect/schema/capitalized_response.json b/contracts/reflect/schema/capitalized_response.json deleted file mode 100644 index 9940dba3e..000000000 --- a/contracts/reflect/schema/capitalized_response.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "CapitalizedResponse", - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string" - } - } -} diff --git a/contracts/reflect/schema/chain_response.json b/contracts/reflect/schema/chain_response.json deleted file mode 100644 index a836c62bd..000000000 --- a/contracts/reflect/schema/chain_response.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ChainResponse", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/Binary" - } - }, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } -} diff --git a/contracts/reflect/schema/custom_msg.json b/contracts/reflect/schema/custom_msg.json deleted file mode 100644 index f63ee99ba..000000000 --- a/contracts/reflect/schema/custom_msg.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "CustomMsg", - "description": "CustomMsg is an override of CosmosMsg::Custom to show this works and can be extended in the contract", - "oneOf": [ - { - "type": "object", - "required": [ - "debug" - ], - "properties": { - "debug": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "raw" - ], - "properties": { - "raw": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } -} diff --git a/contracts/reflect/schema/execute_msg.json b/contracts/reflect/schema/execute_msg.json deleted file mode 100644 index 73d19edd0..000000000 --- a/contracts/reflect/schema/execute_msg.json +++ /dev/null @@ -1,850 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "reflect_msg" - ], - "properties": { - "reflect_msg": { - "type": "object", - "required": [ - "msgs" - ], - "properties": { - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_CustomMsg" - } - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "reflect_sub_msg" - ], - "properties": { - "reflect_sub_msg": { - "type": "object", - "required": [ - "msgs" - ], - "properties": { - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/SubMsg_for_CustomMsg" - } - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "change_owner" - ], - "properties": { - "change_owner": { - "type": "object", - "required": [ - "owner" - ], - "properties": { - "owner": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ], - "definitions": { - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_CustomMsg": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/CustomMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "CustomMsg": { - "description": "CustomMsg is an override of CosmosMsg::Custom to show this works and can be extended in the contract", - "oneOf": [ - { - "type": "object", - "required": [ - "debug" - ], - "properties": { - "debug": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "raw" - ], - "properties": { - "raw": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - ] - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "set_withdraw_address" - ], - "properties": { - "set_withdraw_address": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The `withdraw_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "withdraw_delegator_reward" - ], - "properties": { - "withdraw_delegator_reward": { - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "The `validator_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "GovMsg": { - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "$ref": "#/definitions/VoteOption" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "exisiting channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ReplyOn": { - "description": "Use this to define when the contract gets a response callback. If you only need it for errors or success you can select just those in order to save gas.", - "type": "string", - "enum": [ - "always", - "error", - "success", - "never" - ] - }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "delegate" - ], - "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "undelegate" - ], - "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "SubMsg_for_CustomMsg": { - "description": "A submessage that will guarantee a `reply` call on success or error, depending on the `reply_on` setting. If you do not need to process the result, use regular messages instead.\n\nNote: On error the submessage execution will revert any partial state changes due to this message, but not revert any state changes in the calling contract. If this is required, it must be done manually in the `reply` entry point.", - "type": "object", - "required": [ - "id", - "msg", - "reply_on" - ], - "properties": { - "gas_limit": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "id": { - "description": "An arbitrary ID chosen by the contract. This is typically used to match `Reply`s in the `reply` entry point to the submessage.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "msg": { - "$ref": "#/definitions/CosmosMsg_for_CustomMsg" - }, - "reply_on": { - "$ref": "#/definitions/ReplyOn" - } - } - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readbale label for the contract", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/contracts/reflect/schema/instantiate_msg.json b/contracts/reflect/schema/instantiate_msg.json deleted file mode 100644 index 44588cf22..000000000 --- a/contracts/reflect/schema/instantiate_msg.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object" -} diff --git a/contracts/reflect/schema/owner_response.json b/contracts/reflect/schema/owner_response.json deleted file mode 100644 index 0ec640981..000000000 --- a/contracts/reflect/schema/owner_response.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "OwnerResponse", - "type": "object", - "required": [ - "owner" - ], - "properties": { - "owner": { - "type": "string" - } - } -} diff --git a/contracts/reflect/schema/query_msg.json b/contracts/reflect/schema/query_msg.json deleted file mode 100644 index 8de592c95..000000000 --- a/contracts/reflect/schema/query_msg.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "owner" - ], - "properties": { - "owner": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "This will call out to SpecialQuery::Capitalized", - "type": "object", - "required": [ - "capitalized" - ], - "properties": { - "capitalized": { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Queries the blockchain and returns the result untouched", - "type": "object", - "required": [ - "chain" - ], - "properties": { - "chain": { - "type": "object", - "required": [ - "request" - ], - "properties": { - "request": { - "$ref": "#/definitions/QueryRequest_for_SpecialQuery" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Queries another contract and returns the data", - "type": "object", - "required": [ - "raw" - ], - "properties": { - "raw": { - "type": "object", - "required": [ - "contract", - "key" - ], - "properties": { - "contract": { - "type": "string" - }, - "key": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "If there was a previous ReflectSubMsg with this ID, returns cosmwasm_std::Reply", - "type": "object", - "required": [ - "sub_msg_result" - ], - "properties": { - "sub_msg_result": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - } - ], - "definitions": { - "BankQuery": { - "oneOf": [ - { - "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", - "type": "object", - "required": [ - "balance" - ], - "properties": { - "balance": { - "type": "object", - "required": [ - "address", - "denom" - ], - "properties": { - "address": { - "type": "string" - }, - "denom": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", - "type": "object", - "required": [ - "all_balances" - ], - "properties": { - "all_balances": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - }, - "IbcQuery": { - "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", - "oneOf": [ - { - "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", - "type": "object", - "required": [ - "port_id" - ], - "properties": { - "port_id": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", - "type": "object", - "required": [ - "list_channels" - ], - "properties": { - "list_channels": { - "type": "object", - "properties": { - "port_id": { - "type": [ - "string", - "null" - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", - "type": "object", - "required": [ - "channel" - ], - "properties": { - "channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "port_id": { - "type": [ - "string", - "null" - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "QueryRequest_for_SpecialQuery": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/SpecialQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingQuery" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "this is the expected protobuf message type (not any), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmQuery" - } - }, - "additionalProperties": false - } - ] - }, - "SpecialQuery": { - "description": "An implementation of QueryRequest::Custom to show this works and can be extended in the contract", - "oneOf": [ - { - "type": "object", - "required": [ - "ping" - ], - "properties": { - "ping": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "capitalized" - ], - "properties": { - "capitalized": { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "StakingQuery": { - "oneOf": [ - { - "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", - "type": "object", - "required": [ - "bonded_denom" - ], - "properties": { - "bonded_denom": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "AllDelegations will return all delegations by the delegator", - "type": "object", - "required": [ - "all_delegations" - ], - "properties": { - "all_delegations": { - "type": "object", - "required": [ - "delegator" - ], - "properties": { - "delegator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", - "type": "object", - "required": [ - "delegation" - ], - "properties": { - "delegation": { - "type": "object", - "required": [ - "delegator", - "validator" - ], - "properties": { - "delegator": { - "type": "string" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", - "type": "object", - "required": [ - "all_validators" - ], - "properties": { - "all_validators": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "WasmQuery": { - "oneOf": [ - { - "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", - "type": "object", - "required": [ - "smart" - ], - "properties": { - "smart": { - "type": "object", - "required": [ - "contract_addr", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded QueryMsg struct", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", - "type": "object", - "required": [ - "raw" - ], - "properties": { - "raw": { - "type": "object", - "required": [ - "contract_addr", - "key" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "key": { - "description": "Key is the raw key used in the contracts Storage", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "returns a ContractInfoResponse with metadata on the contract from the runtime", - "type": "object", - "required": [ - "contract_info" - ], - "properties": { - "contract_info": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/contracts/reflect/schema/raw_response.json b/contracts/reflect/schema/raw_response.json deleted file mode 100644 index 06d1400f3..000000000 --- a/contracts/reflect/schema/raw_response.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RawResponse", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "description": "The returned value of the raw query. Empty data can be the result of a non-existent key or an empty value. We cannot differentiate those two cases in cross contract queries.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } -} diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json new file mode 100644 index 000000000..a2b6c8ebd --- /dev/null +++ b/contracts/reflect/schema/reflect.json @@ -0,0 +1,1612 @@ +{ + "contract_name": "reflect", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "reflect_msg" + ], + "properties": { + "reflect_msg": { + "type": "object", + "required": [ + "msgs" + ], + "properties": { + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_CustomMsg" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "reflect_sub_msg" + ], + "properties": { + "reflect_sub_msg": { + "type": "object", + "required": [ + "msgs" + ], + "properties": { + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/SubMsg_for_CustomMsg" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "change_owner" + ], + "properties": { + "change_owner": { + "type": "object", + "required": [ + "owner" + ], + "properties": { + "owner": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_CustomMsg": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/CustomMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "additionalProperties": false + } + ] + }, + "CustomMsg": { + "description": "CustomMsg is an override of CosmosMsg::Custom to show this works and can be extended in the contract", + "oneOf": [ + { + "type": "object", + "required": [ + "debug" + ], + "properties": { + "debug": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + } + ] + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "GovMsg": { + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "vote": { + "$ref": "#/definitions/VoteOption" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "exisiting channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "revision": { + "description": "the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + }, + "ReplyOn": { + "description": "Use this to define when the contract gets a response callback. If you only need it for errors or success you can select just those in order to save gas.", + "type": "string", + "enum": [ + "always", + "error", + "success", + "never" + ] + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsg_for_CustomMsg": { + "description": "A submessage that will guarantee a `reply` call on success or error, depending on the `reply_on` setting. If you do not need to process the result, use regular messages instead.\n\nNote: On error the submessage execution will revert any partial state changes due to this message, but not revert any state changes in the calling contract. If this is required, it must be done manually in the `reply` entry point.", + "type": "object", + "required": [ + "id", + "msg", + "reply_on" + ], + "properties": { + "gas_limit": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "id": { + "description": "An arbitrary ID chosen by the contract. This is typically used to match `Reply`s in the `reply` entry point to the submessage.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "msg": { + "$ref": "#/definitions/CosmosMsg_for_CustomMsg" + }, + "reply_on": { + "$ref": "#/definitions/ReplyOn" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readbale label for the contract", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "owner" + ], + "properties": { + "owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "This will call out to SpecialQuery::Capitalized", + "type": "object", + "required": [ + "capitalized" + ], + "properties": { + "capitalized": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Queries the blockchain and returns the result untouched", + "type": "object", + "required": [ + "chain" + ], + "properties": { + "chain": { + "type": "object", + "required": [ + "request" + ], + "properties": { + "request": { + "$ref": "#/definitions/QueryRequest_for_SpecialQuery" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Queries another contract and returns the data", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract", + "key" + ], + "properties": { + "contract": { + "type": "string" + }, + "key": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "If there was a previous ReflectSubMsg with this ID, returns cosmwasm_std::Reply", + "type": "object", + "required": [ + "sub_msg_result" + ], + "properties": { + "sub_msg_result": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "QueryRequest_for_SpecialQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/SpecialQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "SpecialQuery": { + "description": "An implementation of QueryRequest::Custom to show this works and can be extended in the contract", + "oneOf": [ + { + "type": "object", + "required": [ + "ping" + ], + "properties": { + "ping": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "capitalized" + ], + "properties": { + "capitalized": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "returns a ContractInfoResponse with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + } + } + }, + "migrate": null, + "sudo": null, + "responses": { + "capitalized": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CapitalizedResponse", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + }, + "additionalProperties": false + }, + "chain": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ChainResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "owner": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OwnerResponse", + "type": "object", + "required": [ + "owner" + ], + "properties": { + "owner": { + "type": "string" + } + }, + "additionalProperties": false + }, + "raw": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RawResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "The returned value of the raw query. Empty data can be the result of a non-existent key or an empty value. We cannot differentiate those two cases in cross contract queries.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + } + } + }, + "sub_msg_result": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Reply", + "description": "The result object returned to `reply`. We always get the ID from the submessage back and then must handle success and error cases ourselves.", + "type": "object", + "required": [ + "id", + "result" + ], + "properties": { + "id": { + "description": "The ID that the contract set when emitting the `SubMsg`. Use this to identify which submessage triggered the `reply`.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "result": { + "$ref": "#/definitions/SubMsgResult" + } + }, + "definitions": { + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/master/core/events.html [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "SubMsgResult": { + "description": "This is the result type that is returned from a sub message execution.\n\nWe use a custom type here instead of Rust's Result because we want to be able to define the serialization, which is a public interface. Every language that compiles to Wasm and runs in the ComsWasm VM needs to create the same JSON representation.\n\nUntil version 1.0.0-beta5, `ContractResult` was used instead of this type. Once serialized, the two types are the same. However, in the Rust type system we want different types for clarity and documenation reasons.\n\n# Examples\n\nSuccess:\n\n``` # use cosmwasm_std::{to_vec, Binary, Event, SubMsgResponse, SubMsgResult}; let response = SubMsgResponse { data: Some(Binary::from_base64(\"MTIzCg==\").unwrap()), events: vec![Event::new(\"wasm\").add_attribute(\"fo\", \"ba\")], }; let result: SubMsgResult = SubMsgResult::Ok(response); assert_eq!(to_vec(&result).unwrap(), br#\"{\"ok\":{\"events\":[{\"type\":\"wasm\",\"attributes\":[{\"key\":\"fo\",\"value\":\"ba\"}]}],\"data\":\"MTIzCg==\"}}\"#); ```\n\nFailure:\n\n``` # use cosmwasm_std::{to_vec, SubMsgResult, Response}; let error_msg = String::from(\"Something went wrong\"); let result = SubMsgResult::Err(error_msg); assert_eq!(to_vec(&result).unwrap(), br#\"{\"error\":\"Something went wrong\"}\"#); ```", + "oneOf": [ + { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "$ref": "#/definitions/SubMsgResponse" + } + }, + "additionalProperties": false + }, + { + "description": "An error type that every custom error created by contract developers can be converted to. This could potientially have more structure, but String is the easiest.", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + } + } + } + } +} diff --git a/contracts/reflect/schema/response_for__custom_msg.json b/contracts/reflect/schema/response_for__custom_msg.json deleted file mode 100644 index 12316cf67..000000000 --- a/contracts/reflect/schema/response_for__custom_msg.json +++ /dev/null @@ -1,860 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Response_for_CustomMsg", - "description": "A response of a contract entry point, such as `instantiate`, `execute` or `migrate`.\n\nThis type can be constructed directly at the end of the call. Alternatively a mutable response instance can be created early in the contract's logic and incrementally be updated.\n\n## Examples\n\nDirect:\n\n``` # use cosmwasm_std::{Binary, DepsMut, Env, MessageInfo}; # type InstantiateMsg = (); # use cosmwasm_std::{attr, Response, StdResult};\n\npub fn instantiate( deps: DepsMut, _env: Env, _info: MessageInfo, msg: InstantiateMsg, ) -> StdResult { // ...\n\nOk(Response::new().add_attribute(\"action\", \"instantiate\")) } ```\n\nMutating:\n\n``` # use cosmwasm_std::{coins, BankMsg, Binary, DepsMut, Env, MessageInfo, SubMsg}; # type InstantiateMsg = (); # type MyError = (); # use cosmwasm_std::Response;\n\npub fn instantiate( deps: DepsMut, _env: Env, info: MessageInfo, msg: InstantiateMsg, ) -> Result { let mut response = Response::new() .add_attribute(\"Let the\", \"hacking begin\") .add_message(BankMsg::Send { to_address: String::from(\"recipient\"), amount: coins(128, \"uint\"), }) .add_attribute(\"foo\", \"bar\") .set_data(b\"the result data\"); Ok(response) } ```", - "type": "object", - "required": [ - "attributes", - "events", - "messages" - ], - "properties": { - "attributes": { - "description": "The attributes that will be emitted as part of a \"wasm\" event.\n\nMore info about events (and their attributes) can be found in [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html", - "type": "array", - "items": { - "$ref": "#/definitions/Attribute" - } - }, - "data": { - "description": "The binary payload to include in the response.", - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - }, - "events": { - "description": "Extra, custom events separate from the main `wasm` one. These will have `wasm-` prepended to the type.\n\nMore info about events can be found in [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html", - "type": "array", - "items": { - "$ref": "#/definitions/Event" - } - }, - "messages": { - "description": "Optional list of messages to pass. These will be executed in order. If the ReplyOn variant matches the result (Always, Success on Ok, Error on Err), the runtime will invoke this contract's `reply` entry point after execution. Otherwise, they act like \"fire and forget\". Use `SubMsg::new` to create messages with the older \"fire and forget\" semantics.", - "type": "array", - "items": { - "$ref": "#/definitions/SubMsg_for_CustomMsg" - } - } - }, - "definitions": { - "Attribute": { - "description": "An key value pair that is used in the context of event attributes in logs", - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_CustomMsg": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/CustomMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "CustomMsg": { - "description": "CustomMsg is an override of CosmosMsg::Custom to show this works and can be extended in the contract", - "oneOf": [ - { - "type": "object", - "required": [ - "debug" - ], - "properties": { - "debug": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "raw" - ], - "properties": { - "raw": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - ] - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "set_withdraw_address" - ], - "properties": { - "set_withdraw_address": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The `withdraw_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "withdraw_delegator_reward" - ], - "properties": { - "withdraw_delegator_reward": { - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "The `validator_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Event": { - "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/master/core/events.html [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", - "type": "object", - "required": [ - "attributes", - "type" - ], - "properties": { - "attributes": { - "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html", - "type": "array", - "items": { - "$ref": "#/definitions/Attribute" - } - }, - "type": { - "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", - "type": "string" - } - } - }, - "GovMsg": { - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "$ref": "#/definitions/VoteOption" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "exisiting channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ReplyOn": { - "description": "Use this to define when the contract gets a response callback. If you only need it for errors or success you can select just those in order to save gas.", - "type": "string", - "enum": [ - "always", - "error", - "success", - "never" - ] - }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "delegate" - ], - "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "undelegate" - ], - "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "SubMsg_for_CustomMsg": { - "description": "A submessage that will guarantee a `reply` call on success or error, depending on the `reply_on` setting. If you do not need to process the result, use regular messages instead.\n\nNote: On error the submessage execution will revert any partial state changes due to this message, but not revert any state changes in the calling contract. If this is required, it must be done manually in the `reply` entry point.", - "type": "object", - "required": [ - "id", - "msg", - "reply_on" - ], - "properties": { - "gas_limit": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "id": { - "description": "An arbitrary ID chosen by the contract. This is typically used to match `Reply`s in the `reply` entry point to the submessage.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "msg": { - "$ref": "#/definitions/CosmosMsg_for_CustomMsg" - }, - "reply_on": { - "$ref": "#/definitions/ReplyOn" - } - } - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readbale label for the contract", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/contracts/reflect/schema/state.json b/contracts/reflect/schema/state.json deleted file mode 100644 index 1c10ba441..000000000 --- a/contracts/reflect/schema/state.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "State", - "type": "object", - "required": [ - "owner" - ], - "properties": { - "owner": { - "$ref": "#/definitions/Addr" - } - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - } - } -} diff --git a/contracts/reflect/src/msg.rs b/contracts/reflect/src/msg.rs index 4ff280a81..89af0172c 100644 --- a/contracts/reflect/src/msg.rs +++ b/contracts/reflect/src/msg.rs @@ -1,63 +1,53 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{Binary, CosmosMsg, CustomQuery, QueryRequest, SubMsg}; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ExecuteMsg { ReflectMsg { msgs: Vec> }, ReflectSubMsg { msgs: Vec> }, ChangeOwner { owner: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { + #[returns(OwnerResponse)] Owner {}, /// This will call out to SpecialQuery::Capitalized - Capitalized { - text: String, - }, + #[returns(CapitalizedResponse)] + Capitalized { text: String }, /// Queries the blockchain and returns the result untouched - Chain { - request: QueryRequest, - }, + #[returns(ChainResponse)] + Chain { request: QueryRequest }, /// Queries another contract and returns the data - Raw { - contract: String, - key: Binary, - }, + #[returns(RawResponse)] + Raw { contract: String, key: Binary }, /// If there was a previous ReflectSubMsg with this ID, returns cosmwasm_std::Reply - SubMsgResult { - id: u64, - }, + #[returns(cosmwasm_std::Reply)] + SubMsgResult { id: u64 }, } // We define a custom struct for each query response -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct OwnerResponse { pub owner: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub struct CapitalizedResponse { pub text: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub struct ChainResponse { pub data: Binary, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub struct RawResponse { /// The returned value of the raw query. Empty data can be the /// result of a non-existent key or an empty value. We cannot @@ -65,8 +55,7 @@ pub struct RawResponse { pub data: Binary, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] /// CustomMsg is an override of CosmosMsg::Custom to show this works and can be extended in the contract pub enum CustomMsg { Debug(String), @@ -81,8 +70,7 @@ impl From for CosmosMsg { } } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] /// An implementation of QueryRequest::Custom to show this works and can be extended in the contract pub enum SpecialQuery { Ping {}, @@ -91,8 +79,7 @@ pub enum SpecialQuery { impl CustomQuery for SpecialQuery {} -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] /// The response data for all `SpecialQuery`s pub struct SpecialResponse { pub msg: String, diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index e0c7bb277..93380313f 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -32,6 +32,7 @@ cranelift = ["cosmwasm-vm/cranelift"] backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] +cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking"] } cosmwasm-storage = { path = "../../packages/storage", default-features = false } schemars = "0.8.1" @@ -40,4 +41,3 @@ snafu = "0.6" [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["staking"] } -cosmwasm-schema = { path = "../../packages/schema" } diff --git a/contracts/staking/examples/schema.rs b/contracts/staking/examples/schema.rs index 780fc0c0e..a19d26634 100644 --- a/contracts/staking/examples/schema.rs +++ b/contracts/staking/examples/schema.rs @@ -1,31 +1,11 @@ -use std::env::current_dir; -use std::fs::create_dir_all; +use cosmwasm_schema::write_api; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; - -use staking::msg::{ - BalanceResponse, ClaimsResponse, ExecuteMsg, InstantiateMsg, InvestmentResponse, QueryMsg, - TokenInfoResponse, -}; -use staking::state::{InvestmentInfo, Supply, TokenInfo}; +use staking::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { - let mut out_dir = current_dir().unwrap(); - out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - // messages - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); - export_schema(&schema_for!(BalanceResponse), &out_dir); - export_schema(&schema_for!(ClaimsResponse), &out_dir); - export_schema(&schema_for!(InvestmentResponse), &out_dir); - export_schema(&schema_for!(TokenInfoResponse), &out_dir); - - // state - export_schema(&schema_for!(InvestmentInfo), &out_dir); - export_schema(&schema_for!(TokenInfo), &out_dir); - export_schema(&schema_for!(Supply), &out_dir); + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + } } diff --git a/contracts/staking/schema/balance_response.json b/contracts/staking/schema/balance_response.json deleted file mode 100644 index 4e1a0be2b..000000000 --- a/contracts/staking/schema/balance_response.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "BalanceResponse", - "type": "object", - "required": [ - "balance" - ], - "properties": { - "balance": { - "$ref": "#/definitions/Uint128" - } - }, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/claims_response.json b/contracts/staking/schema/claims_response.json deleted file mode 100644 index a072a4ce7..000000000 --- a/contracts/staking/schema/claims_response.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ClaimsResponse", - "type": "object", - "required": [ - "claims" - ], - "properties": { - "claims": { - "$ref": "#/definitions/Uint128" - } - }, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/execute_msg.json b/contracts/staking/schema/execute_msg.json deleted file mode 100644 index f4db13ce9..000000000 --- a/contracts/staking/schema/execute_msg.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Transfer moves the derivative token", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "recipient" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "recipient": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Bond will bond all staking tokens sent with the message and release derivative tokens", - "type": "object", - "required": [ - "bond" - ], - "properties": { - "bond": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Unbond will \"burn\" the given amount of derivative tokens and send the unbonded staking tokens to the message sender (after exit tax is deducted)", - "type": "object", - "required": [ - "unbond" - ], - "properties": { - "unbond": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Claim is used to claim your native tokens that you previously \"unbonded\" after the chain-defined waiting period (eg. 3 weeks)", - "type": "object", - "required": [ - "claim" - ], - "properties": { - "claim": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Reinvest will check for all accumulated rewards, withdraw them, and re-bond them to the same validator. Anyone can call this, which updates the value of the token (how much under custody).", - "type": "object", - "required": [ - "reinvest" - ], - "properties": { - "reinvest": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "_BondAllTokens can only be called by the contract itself, after all rewards have been withdrawn. This is an example of using \"callbacks\" in message flows. This can only be invoked by the contract itself as a return from Reinvest", - "type": "object", - "required": [ - "__bond_all_tokens" - ], - "properties": { - "__bond_all_tokens": { - "type": "object" - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/instantiate_msg.json b/contracts/staking/schema/instantiate_msg.json deleted file mode 100644 index e17d7a05e..000000000 --- a/contracts/staking/schema/instantiate_msg.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "decimals", - "exit_tax", - "min_withdrawal", - "name", - "symbol", - "validator" - ], - "properties": { - "decimals": { - "description": "decimal places of the derivative token (for UI) TODO: does this make sense? Do we need to normalize on this? We don't even know the decimals of the native token", - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "exit_tax": { - "description": "this is how much the owner takes as a cut when someone unbonds TODO", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "min_withdrawal": { - "description": "This is the minimum amount we will pull out to reinvest, as well as a minumum that can be unbonded (to avoid needless staking tx)", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "name": { - "description": "name of the derivative token (FIXME: auto-generate?)", - "type": "string" - }, - "symbol": { - "description": "symbol / ticker of the derivative token", - "type": "string" - }, - "validator": { - "description": "This is the validator that all tokens will be bonded to", - "type": "string" - } - }, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/investment_info.json b/contracts/staking/schema/investment_info.json deleted file mode 100644 index 73f6e3004..000000000 --- a/contracts/staking/schema/investment_info.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InvestmentInfo", - "description": "Investment info is fixed at initialization, and is used to control the function of the contract", - "type": "object", - "required": [ - "bond_denom", - "exit_tax", - "min_withdrawal", - "owner", - "validator" - ], - "properties": { - "bond_denom": { - "description": "this is the denomination we can stake (and only one we accept for payments)", - "type": "string" - }, - "exit_tax": { - "description": "this is how much the owner takes as a cut when someone unbonds", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "min_withdrawal": { - "description": "This is the minimum amount we will pull out to reinvest, as well as a minumum that can be unbonded (to avoid needless staking tx)", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "owner created the contract and takes a cut", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "validator": { - "description": "All tokens are bonded to this validator addr_humanize/addr_canonicalize doesn't work for validator addrresses (e.g. cosmosvaloper1...)", - "type": "string" - } - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/investment_response.json b/contracts/staking/schema/investment_response.json deleted file mode 100644 index 88a62af43..000000000 --- a/contracts/staking/schema/investment_response.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InvestmentResponse", - "type": "object", - "required": [ - "exit_tax", - "min_withdrawal", - "nominal_value", - "owner", - "staked_tokens", - "token_supply", - "validator" - ], - "properties": { - "exit_tax": { - "description": "this is how much the owner takes as a cut when someone unbonds", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "min_withdrawal": { - "description": "This is the minimum amount we will pull out to reinvest, as well as a minumum that can be unbonded (to avoid needless staking tx)", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "nominal_value": { - "$ref": "#/definitions/Decimal" - }, - "owner": { - "description": "owner created the contract and takes a cut", - "type": "string" - }, - "staked_tokens": { - "$ref": "#/definitions/Coin" - }, - "token_supply": { - "$ref": "#/definitions/Uint128" - }, - "validator": { - "description": "All tokens are bonded to this validator", - "type": "string" - } - }, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/query_msg.json b/contracts/staking/schema/query_msg.json deleted file mode 100644 index 9cd04d6af..000000000 --- a/contracts/staking/schema/query_msg.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "Balance shows the number of staking derivatives", - "type": "object", - "required": [ - "balance" - ], - "properties": { - "balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Claims shows the number of tokens this address can access when they are done unbonding", - "type": "object", - "required": [ - "claims" - ], - "properties": { - "claims": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "TokenInfo shows the metadata of the token for UIs", - "type": "object", - "required": [ - "token_info" - ], - "properties": { - "token_info": { - "type": "object" - } - }, - "additionalProperties": false - }, - { - "description": "Investment shows info on total staking tokens under custody, with which validator, as well as how many derivative tokens are lists. It also shows with the exit tax.", - "type": "object", - "required": [ - "investment" - ], - "properties": { - "investment": { - "type": "object" - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/staking/schema/staking.json b/contracts/staking/schema/staking.json new file mode 100644 index 000000000..3f395ac41 --- /dev/null +++ b/contracts/staking/schema/staking.json @@ -0,0 +1,406 @@ +{ + "contract_name": "staking", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "decimals", + "exit_tax", + "min_withdrawal", + "name", + "symbol", + "validator" + ], + "properties": { + "decimals": { + "description": "decimal places of the derivative token (for UI) TODO: does this make sense? Do we need to normalize on this? We don't even know the decimals of the native token", + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "exit_tax": { + "description": "this is how much the owner takes as a cut when someone unbonds TODO", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "min_withdrawal": { + "description": "This is the minimum amount we will pull out to reinvest, as well as a minumum that can be unbonded (to avoid needless staking tx)", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "name": { + "description": "name of the derivative token (FIXME: auto-generate?)", + "type": "string" + }, + "symbol": { + "description": "symbol / ticker of the derivative token", + "type": "string" + }, + "validator": { + "description": "This is the validator that all tokens will be bonded to", + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Decimal": { + "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", + "type": "string" + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Transfer moves the derivative token", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "recipient" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "recipient": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Bond will bond all staking tokens sent with the message and release derivative tokens", + "type": "object", + "required": [ + "bond" + ], + "properties": { + "bond": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Unbond will \"burn\" the given amount of derivative tokens and send the unbonded staking tokens to the message sender (after exit tax is deducted)", + "type": "object", + "required": [ + "unbond" + ], + "properties": { + "unbond": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim is used to claim your native tokens that you previously \"unbonded\" after the chain-defined waiting period (eg. 3 weeks)", + "type": "object", + "required": [ + "claim" + ], + "properties": { + "claim": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Reinvest will check for all accumulated rewards, withdraw them, and re-bond them to the same validator. Anyone can call this, which updates the value of the token (how much under custody).", + "type": "object", + "required": [ + "reinvest" + ], + "properties": { + "reinvest": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "_BondAllTokens can only be called by the contract itself, after all rewards have been withdrawn. This is an example of using \"callbacks\" in message flows. This can only be invoked by the contract itself as a return from Reinvest", + "type": "object", + "required": [ + "__bond_all_tokens" + ], + "properties": { + "__bond_all_tokens": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Balance shows the number of staking derivatives", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claims shows the number of tokens this address can access when they are done unbonding", + "type": "object", + "required": [ + "claims" + ], + "properties": { + "claims": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "TokenInfo shows the metadata of the token for UIs", + "type": "object", + "required": [ + "token_info" + ], + "properties": { + "token_info": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Investment shows info on total staking tokens under custody, with which validator, as well as how many derivative tokens are lists. It also shows with the exit tax.", + "type": "object", + "required": [ + "investment" + ], + "properties": { + "investment": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": null, + "sudo": null, + "responses": { + "balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false, + "definitions": { + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "claims": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ClaimsResponse", + "type": "object", + "required": [ + "claims" + ], + "properties": { + "claims": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false, + "definitions": { + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "investment": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InvestmentResponse", + "type": "object", + "required": [ + "exit_tax", + "min_withdrawal", + "nominal_value", + "owner", + "staked_tokens", + "token_supply", + "validator" + ], + "properties": { + "exit_tax": { + "description": "this is how much the owner takes as a cut when someone unbonds", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "min_withdrawal": { + "description": "This is the minimum amount we will pull out to reinvest, as well as a minumum that can be unbonded (to avoid needless staking tx)", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "nominal_value": { + "$ref": "#/definitions/Decimal" + }, + "owner": { + "description": "owner created the contract and takes a cut", + "type": "string" + }, + "staked_tokens": { + "$ref": "#/definitions/Coin" + }, + "token_supply": { + "$ref": "#/definitions/Uint128" + }, + "validator": { + "description": "All tokens are bonded to this validator", + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Decimal": { + "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", + "type": "string" + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } + }, + "token_info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TokenInfoResponse", + "description": "TokenInfoResponse is info to display the derivative token in a UI", + "type": "object", + "required": [ + "decimals", + "name", + "symbol" + ], + "properties": { + "decimals": { + "description": "decimal places of the derivative token (for UI)", + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "name": { + "description": "name of the derivative token", + "type": "string" + }, + "symbol": { + "description": "symbol / ticker of the derivative token", + "type": "string" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/staking/schema/supply.json b/contracts/staking/schema/supply.json deleted file mode 100644 index 08d0c2b7a..000000000 --- a/contracts/staking/schema/supply.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Supply", - "description": "Supply is dynamic and tracks the current supply of staked and ERC20 tokens.", - "type": "object", - "required": [ - "bonded", - "claims", - "issued" - ], - "properties": { - "bonded": { - "description": "bonded is how many native tokens exist bonded to the validator", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "claims": { - "description": "claims is how many tokens need to be reserved paying back those who unbonded", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "issued": { - "description": "issued is how many derivative tokens this contract has issued", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/token_info.json b/contracts/staking/schema/token_info.json deleted file mode 100644 index 532908242..000000000 --- a/contracts/staking/schema/token_info.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "TokenInfo", - "description": "Info to display the derivative token in a UI", - "type": "object", - "required": [ - "decimals", - "name", - "symbol" - ], - "properties": { - "decimals": { - "description": "decimal places of the derivative token (for UI)", - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "name": { - "description": "name of the derivative token", - "type": "string" - }, - "symbol": { - "description": "symbol / ticker of the derivative token", - "type": "string" - } - } -} diff --git a/contracts/staking/schema/token_info_response.json b/contracts/staking/schema/token_info_response.json deleted file mode 100644 index 63bf00454..000000000 --- a/contracts/staking/schema/token_info_response.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "TokenInfoResponse", - "description": "TokenInfoResponse is info to display the derivative token in a UI", - "type": "object", - "required": [ - "decimals", - "name", - "symbol" - ], - "properties": { - "decimals": { - "description": "decimal places of the derivative token (for UI)", - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "name": { - "description": "name of the derivative token", - "type": "string" - }, - "symbol": { - "description": "symbol / ticker of the derivative token", - "type": "string" - } - } -} diff --git a/contracts/staking/src/msg.rs b/contracts/staking/src/msg.rs index 060359718..68f2ed42a 100644 --- a/contracts/staking/src/msg.rs +++ b/contracts/staking/src/msg.rs @@ -1,9 +1,8 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{Coin, Decimal, Uint128}; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InstantiateMsg { /// name of the derivative token (FIXME: auto-generate?) pub name: String, @@ -25,8 +24,7 @@ pub struct InstantiateMsg { pub min_withdrawal: Uint128, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] pub enum ExecuteMsg { /// Transfer moves the derivative token Transfer { recipient: String, amount: Uint128 }, @@ -48,33 +46,37 @@ pub enum ExecuteMsg { _BondAllTokens {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] +#[cw_serde] +#[derive(QueryResponses)] pub enum QueryMsg { /// Balance shows the number of staking derivatives + #[returns(BalanceResponse)] Balance { address: String }, /// Claims shows the number of tokens this address can access when they are done unbonding + #[returns(ClaimsResponse)] Claims { address: String }, /// TokenInfo shows the metadata of the token for UIs + #[returns(TokenInfoResponse)] TokenInfo {}, /// Investment shows info on total staking tokens under custody, /// with which validator, as well as how many derivative tokens are lists. /// It also shows with the exit tax. + #[returns(InvestmentResponse)] Investment {}, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct BalanceResponse { pub balance: Uint128, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct ClaimsResponse { pub claims: Uint128, } /// TokenInfoResponse is info to display the derivative token in a UI -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct TokenInfoResponse { /// name of the derivative token pub name: String, @@ -84,7 +86,7 @@ pub struct TokenInfoResponse { pub decimals: u8, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[cw_serde] pub struct InvestmentResponse { pub token_supply: Uint128, pub staked_tokens: Coin, From aeec6173b15516de4f9cbfaa7581ce205466f975 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 15:13:16 +0200 Subject: [PATCH 110/344] Update MIGRATING.md with new version number Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- MIGRATING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIGRATING.md b/MIGRATING.md index 6b554a984..36ae99288 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -4,7 +4,7 @@ This guide explains what is needed to upgrade contracts when migrating over major releases of `cosmwasm`. Note that you can also view the [complete CHANGELOG](./CHANGELOG.md) to understand the differences. -## 1.0.0 -> ? +## 1.0.0 -> 1.1.0 - There are changes to how we generate schemas, resulting in less boilerplace maintenance for smart contract devs. The changes are backwards-compatible - From e117fea05869bf1cd46018a810fc01b67e4142d2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 15:16:40 +0200 Subject: [PATCH 111/344] MIGRATING.md update --- MIGRATING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MIGRATING.md b/MIGRATING.md index 36ae99288..7adbf8bf8 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -7,9 +7,8 @@ major releases of `cosmwasm`. Note that you can also view the ## 1.0.0 -> 1.1.0 - There are changes to how we generate schemas, resulting in less boilerplace - maintenance for smart contract devs. The changes are backwards-compatible - - old contracts will continue working for a while, but it's highly recommended - to migrate now. + maintenance for smart contract devs. Old contracts will continue working for a + while, but it's highly recommended to migrate now. Your contract should have a `cosmwasm_schema` dependency in its `Cargo.toml` file. Move it from `dev-dependencies`to regular `dependencies`. @@ -86,6 +85,10 @@ major releases of `cosmwasm`. Note that you can also view the } ``` +This changes the format of the schemas generated by the contract. They're now in +one structured, unified file (parseable by machines) rather than a bunch of +arbitrary ones. + ## 1.0.0-beta -> 1.0.0 - The minimum Rust supported version is 1.56.1. Verify your Rust version is >= From 9de76247f99cf7b1e52face36df3e19239b9be14 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:20:50 +0100 Subject: [PATCH 112/344] add bank supply query --- packages/std/src/mock.rs | 63 +++++++++++++++++++++++++++++++--- packages/std/src/query/bank.rs | 11 ++++++ packages/std/src/query/mod.rs | 2 +- 3 files changed, 71 insertions(+), 5 deletions(-) diff --git a/packages/std/src/mock.rs b/packages/std/src/mock.rs index 3b0db5c1c..0ab1235c4 100644 --- a/packages/std/src/mock.rs +++ b/packages/std/src/mock.rs @@ -15,8 +15,10 @@ use crate::ibc::{ IbcEndpoint, IbcOrder, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcTimeoutBlock, }; +use crate::math::Uint128; use crate::query::{ - AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery, + AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, SupplyResponse, + WasmQuery, }; #[cfg(feature = "staking")] use crate::query::{ @@ -564,20 +566,44 @@ impl Default for WasmQuerier { #[derive(Clone, Default)] pub struct BankQuerier { + supplies: HashMap, balances: HashMap>, } impl BankQuerier { pub fn new(balances: &[(&str, &[Coin])]) -> Self { - let mut map = HashMap::new(); + let mut supplies_map = HashMap::new(); + let mut balances_map = HashMap::new(); for (addr, coins) in balances.iter() { - map.insert(addr.to_string(), coins.to_vec()); + balances_map.insert(addr.to_string(), coins.to_vec()); + for coin in coins.iter() { + *supplies_map + .entry(coin.denom.clone()) + .or_insert_with(Uint128::zero) += coin.amount; + } + } + BankQuerier { + supplies: supplies_map, + balances: balances_map, } - BankQuerier { balances: map } } pub fn query(&self, request: &BankQuery) -> QuerierResult { let contract_result: ContractResult = match request { + BankQuery::Supply { denom } => { + let amount = self + .supplies + .get(denom) + .cloned() + .unwrap_or_else(Uint128::zero); + let bank_res = SupplyResponse { + amount: Coin { + amount, + denom: denom.to_string(), + }, + }; + to_binary(&bank_res).into() + } BankQuery::Balance { address, denom } => { // proper error on not found, serialize result on found let amount = self @@ -1060,6 +1086,35 @@ mod tests { assert_eq!(res.unwrap_err(), VerificationError::InvalidPubkeyFormat); } + #[test] + fn bank_querier_supply() { + let addr1 = String::from("foo"); + let balance1 = vec![coin(123, "ELF"), coin(777, "FLY")]; + + let addr2 = String::from("bar"); + let balance2 = coins(321, "ELF"); + + let bank = BankQuerier::new(&[(&addr1, &balance1), (&addr2, &balance2)]); + + let elf = bank + .query(&BankQuery::Supply { + denom: "ELF".to_string(), + }) + .unwrap() + .unwrap(); + let res: SupplyResponse = from_binary(&elf).unwrap(); + assert_eq!(res.amount, coin(444, "ELF")); + + let fly = bank + .query(&BankQuery::Supply { + denom: "FLY".to_string(), + }) + .unwrap() + .unwrap(); + let res: SupplyResponse = from_binary(&fly).unwrap(); + assert_eq!(res.amount, coin(777, "FLY")); + } + #[test] fn bank_querier_all_balances() { let addr = String::from("foobar"); diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 08824323b..031557124 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -7,6 +7,9 @@ use crate::Coin; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum BankQuery { + /// This calls into the native bank module for querying the total supply on one denomination. + /// Return value is SupplyResponse + Supply { denom: String }, /// This calls into the native bank module for one denomination /// Return value is BalanceResponse Balance { address: String, denom: String }, @@ -16,6 +19,14 @@ pub enum BankQuery { AllBalances { address: String }, } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct SupplyResponse { + /// Always returns a Coin with the requested denom. + /// This may be of 0 amount if no such funds. + pub amount: Coin, +} + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct BalanceResponse { diff --git a/packages/std/src/query/mod.rs b/packages/std/src/query/mod.rs index 0fb490dc5..d56af4006 100644 --- a/packages/std/src/query/mod.rs +++ b/packages/std/src/query/mod.rs @@ -10,7 +10,7 @@ mod ibc; mod staking; mod wasm; -pub use bank::{AllBalanceResponse, BalanceResponse, BankQuery}; +pub use bank::{AllBalanceResponse, BalanceResponse, BankQuery, SupplyResponse}; #[cfg(feature = "stargate")] pub use ibc::{ChannelResponse, IbcQuery, ListChannelsResponse, PortIdResponse}; #[cfg(feature = "staking")] From 42894a69e15941f07088cb07e0045615dcff4615 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 12 Jul 2022 18:30:50 +0200 Subject: [PATCH 113/344] std: debug fmt interprets WasmMsg binary data as string --- Cargo.lock | 12 ++++++ contracts/burner/Cargo.lock | 12 ++++++ contracts/crypto-verify/Cargo.lock | 12 ++++++ contracts/floaty/Cargo.lock | 12 ++++++ contracts/hackatom/Cargo.lock | 12 ++++++ contracts/ibc-reflect-send/Cargo.lock | 12 ++++++ contracts/ibc-reflect/Cargo.lock | 12 ++++++ contracts/queue/Cargo.lock | 12 ++++++ contracts/reflect/Cargo.lock | 12 ++++++ contracts/staking/Cargo.lock | 12 ++++++ packages/std/Cargo.toml | 7 ++-- packages/std/src/results/cosmos_msg.rs | 52 +++++++++++++++++++++++++- 12 files changed, 174 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef3d6b129..d28714c54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,6 +314,7 @@ dependencies = [ "cosmwasm-crypto", "cosmwasm-derive", "cosmwasm-schema", + "derivative", "forward_ref", "hex", "hex-literal", @@ -623,6 +624,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index c7b5cf948..26973772e 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -195,6 +195,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -429,6 +430,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 5c1fede9c..551a5c75d 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -197,6 +197,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -456,6 +457,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 834452bdf..81ea85949 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -426,6 +427,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index e9b733959..50be189db 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -213,6 +213,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -455,6 +456,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 5b9b188ac..190f4eb38 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -426,6 +427,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 90a361830..99f5692a8 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -426,6 +427,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index bd2edf8b0..f23d32af1 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -418,6 +419,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 8739c04c7..feae7a205 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -426,6 +427,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 200549bb6..55873af0e 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -184,6 +184,7 @@ dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "derivative", "forward_ref", "schemars", "serde", @@ -426,6 +427,17 @@ dependencies = [ "const-oid", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 5c5f99f62..f5bbbdaa7 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -37,12 +37,13 @@ ibc3 = ["stargate"] [dependencies] base64 = "0.13.0" cosmwasm-derive = { path = "../derive", version = "1.0.0" } -uint = "0.9.3" -serde-json-wasm = { version = "0.4.1" } +derivative = "2" +forward_ref = "1" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } +serde-json-wasm = { version = "0.4.1" } thiserror = "1.0" -forward_ref = "1" +uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cosmwasm-crypto = { path = "../crypto", version = "1.0.0" } diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index 12de9d10e..950439a51 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -1,3 +1,4 @@ +use derivative::Derivative; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::fmt; @@ -110,11 +111,19 @@ pub enum DistributionMsg { }, } +fn binary_to_string(data: &Binary, fmt: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { + match std::str::from_utf8(data.as_slice()) { + Ok(s) => fmt.write_str(s), + Err(_) => write!(fmt, "{:?}", data), + } +} + /// The message types of the wasm module. /// /// See https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Derivative, PartialEq, JsonSchema)] +#[derivative(Debug)] #[serde(rename_all = "snake_case")] pub enum WasmMsg { /// Dispatches a call to another contract at a known address (with known ABI). @@ -124,6 +133,7 @@ pub enum WasmMsg { Execute { contract_addr: String, /// msg is the json-encoded ExecuteMsg struct (as raw Binary) + #[derivative(Debug(format_with = "binary_to_string"))] msg: Binary, funds: Vec, }, @@ -135,6 +145,7 @@ pub enum WasmMsg { admin: Option, code_id: u64, /// msg is the JSON-encoded InstantiateMsg struct (as raw Binary) + #[derivative(Debug(format_with = "binary_to_string"))] msg: Binary, funds: Vec, /// A human-readbale label for the contract @@ -152,6 +163,7 @@ pub enum WasmMsg { /// the code_id of the new logic to place in the given contract new_code_id: u64, /// msg is the json-encoded MigrateMsg struct that will be passed to the new code + #[derivative(Debug(format_with = "binary_to_string"))] msg: Binary, }, /// Sets a new admin (for migrate) on the given contract. @@ -259,7 +271,7 @@ impl From for CosmosMsg { #[cfg(test)] mod tests { use super::*; - use crate::coins; + use crate::{coin, coins}; #[test] fn from_bank_msg_works() { @@ -272,4 +284,40 @@ mod tests { _ => panic!("must encode in Bank variant"), } } + + #[cosmwasm_schema::cw_serde] + enum ExecuteMsg { + Mint { coin: Coin }, + } + + #[test] + fn wasm_msg_debug_decodes_binary_string_when_possible() { + let msg = WasmMsg::Execute { + contract_addr: "joe".to_string(), + msg: to_binary(&ExecuteMsg::Mint { + coin: coin(10, "BTC"), + }) + .unwrap(), + funds: vec![], + }; + + assert_eq!( + format!("{:?}", msg), + "Execute { contract_addr: \"joe\", msg: {\"mint\":{\"coin\":{\"denom\":\"BTC\",\"amount\":\"10\"}}}, funds: [] }" + ); + } + + #[test] + fn wasm_msg_debug_dumps_binary_when_not_utf8() { + let msg = WasmMsg::Execute { + contract_addr: "joe".to_string(), + msg: Binary::from([0, 159, 146, 150]), + funds: vec![], + }; + + assert_eq!( + format!("{:?}", msg), + "Execute { contract_addr: \"joe\", msg: Binary(009f9296), funds: [] }" + ); + } } From eb66d7a2eae258772e1af8db77cd28f41693aec5 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:14:13 +0100 Subject: [PATCH 114/344] export `SupplyResponse` --- packages/std/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index b3072e677..cd0839545 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -48,7 +48,7 @@ pub use crate::math::{ }; pub use crate::query::{ AllBalanceResponse, BalanceResponse, BankQuery, ContractInfoResponse, CustomQuery, - QueryRequest, WasmQuery, + QueryRequest, SupplyResponse, WasmQuery, }; #[cfg(feature = "staking")] pub use crate::query::{ From de275e82a597e162b68501d58730941882626ccb Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:17:25 +0100 Subject: [PATCH 115/344] add a helper function for querying supply --- packages/std/src/traits.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index e99ef08d8..057b96894 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -18,6 +18,7 @@ use crate::query::{ }; use crate::results::{ContractResult, Empty, SystemResult}; use crate::serde::{from_binary, to_binary, to_vec}; +use crate::SupplyResponse; /// Storage provides read and write access to a persistent storage. /// If you only want to provide read access, provide `&Storage` @@ -197,6 +198,15 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { } } + pub fn query_supply(&self, denom: impl Into) -> StdResult { + let request = BankQuery::Supply { + denom: denom.into(), + } + .into(); + let res: SupplyResponse = self.query(&request)?; + Ok(res.amount) + } + pub fn query_balance( &self, address: impl Into, From ddd4e3c6b4d6a11023ac98e1d1a25a853a6ee09f Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 19:35:13 +0100 Subject: [PATCH 116/344] update schema --- contracts/reflect/schema/query_msg.json | 21 +++++++++++++++++++++ packages/std/schema/query_request.json | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/contracts/reflect/schema/query_msg.json b/contracts/reflect/schema/query_msg.json index 8de592c95..63eb7d405 100644 --- a/contracts/reflect/schema/query_msg.json +++ b/contracts/reflect/schema/query_msg.json @@ -108,6 +108,27 @@ "definitions": { "BankQuery": { "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply on one denomination. Return value is SupplyResponse", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", "type": "object", diff --git a/packages/std/schema/query_request.json b/packages/std/schema/query_request.json index 6417cdaa5..c1500291b 100644 --- a/packages/std/schema/query_request.json +++ b/packages/std/schema/query_request.json @@ -42,6 +42,27 @@ "definitions": { "BankQuery": { "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply on one denomination. Return value is SupplyResponse", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", "type": "object", From 787cef005a0d7177f1010fdad2340eee75c652db Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 19:37:44 +0100 Subject: [PATCH 117/344] update import --- packages/std/src/traits.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 057b96894..b0656f6eb 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -14,11 +14,10 @@ use crate::query::{ #[cfg(feature = "staking")] use crate::query::{ AllDelegationsResponse, AllValidatorsResponse, BondedDenomResponse, Delegation, - DelegationResponse, FullDelegation, StakingQuery, Validator, ValidatorResponse, + DelegationResponse, FullDelegation, StakingQuery, SupplyResponse, Validator, ValidatorResponse, }; use crate::results::{ContractResult, Empty, SystemResult}; use crate::serde::{from_binary, to_binary, to_vec}; -use crate::SupplyResponse; /// Storage provides read and write access to a persistent storage. /// If you only want to provide read access, provide `&Storage` From ce2577b6b9d07d3f951da5b0f87d220447e523ba Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Tue, 12 Jul 2022 19:45:36 +0100 Subject: [PATCH 118/344] fix import --- packages/std/src/traits.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index b0656f6eb..e87fc2ef6 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -9,12 +9,13 @@ use crate::errors::{RecoverPubkeyError, StdError, StdResult, VerificationError}; #[cfg(feature = "iterator")] use crate::iterator::{Order, Record}; use crate::query::{ - AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery, + AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, SupplyResponse, + WasmQuery, }; #[cfg(feature = "staking")] use crate::query::{ AllDelegationsResponse, AllValidatorsResponse, BondedDenomResponse, Delegation, - DelegationResponse, FullDelegation, StakingQuery, SupplyResponse, Validator, ValidatorResponse, + DelegationResponse, FullDelegation, StakingQuery, Validator, ValidatorResponse, }; use crate::results::{ContractResult, Empty, SystemResult}; use crate::serde::{from_binary, to_binary, to_vec}; From 7abff6548263870e4143323175b0a934d400833f Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 13 Jul 2022 10:55:51 +0200 Subject: [PATCH 119/344] Inline zero() and one() consistently --- packages/std/src/math/decimal.rs | 2 ++ packages/std/src/math/decimal256.rs | 2 ++ packages/std/src/math/uint128.rs | 1 + packages/std/src/math/uint256.rs | 1 + packages/std/src/math/uint512.rs | 1 + packages/std/src/math/uint64.rs | 1 + 6 files changed, 8 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 826f06d50..1c3db6b78 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -47,11 +47,13 @@ impl Decimal { } /// Create a 1.0 Decimal + #[inline] pub const fn one() -> Self { Self(Self::DECIMAL_FRACTIONAL) } /// Create a 0.0 Decimal + #[inline] pub const fn zero() -> Self { Self(Uint128::zero()) } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index ce76ccb87..7e13dfda0 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -57,11 +57,13 @@ impl Decimal256 { } /// Create a 1.0 Decimal256 + #[inline] pub const fn one() -> Self { Self(Self::DECIMAL_FRACTIONAL) } /// Create a 0.0 Decimal256 + #[inline] pub const fn zero() -> Self { Self(Uint256::zero()) } diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index d2e3cd8e1..fddd98bbd 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -45,6 +45,7 @@ impl Uint128 { } /// Creates a Uint128(0) + #[inline] pub const fn zero() -> Self { Uint128(0) } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 57b3b78c1..1e4349d16 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -62,6 +62,7 @@ impl Uint256 { } /// Creates a Uint256(0) + #[inline] pub const fn zero() -> Self { Uint256(U256::zero()) } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 40e2e55ff..18c6ce527 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -62,6 +62,7 @@ impl Uint512 { } /// Creates a Uint512(0) + #[inline] pub const fn zero() -> Self { Uint512(U512::zero()) } diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index b23e41e70..7267552a7 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -41,6 +41,7 @@ impl Uint64 { } /// Creates a Uint64(0) + #[inline] pub const fn zero() -> Self { Uint64(0) } From d245b9206915321494870a69012c31988b2ffa35 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 13 Jul 2022 11:47:11 +0200 Subject: [PATCH 120/344] Use write_api! in IBC contracts --- contracts/ibc-reflect-send/examples/schema.rs | 24 +- .../schema/account_response.json | 66 -- .../schema/admin_response.json | 14 - .../ibc-reflect-send/schema/execute_msg.json | 817 ------------- .../schema/ibc-reflect-send.json | 1055 +++++++++++++++++ .../schema/instantiate_msg.json | 7 - .../schema/list_accounts_response.json | 85 -- .../ibc-reflect-send/schema/query_msg.json | 53 - contracts/ibc-reflect/examples/schema.rs | 17 +- contracts/ibc-reflect/schema/ibc-reflect.json | 123 ++ .../ibc-reflect/schema/instantiate_msg.json | 17 - contracts/ibc-reflect/schema/query_msg.json | 42 - 12 files changed, 1198 insertions(+), 1122 deletions(-) delete mode 100644 contracts/ibc-reflect-send/schema/account_response.json delete mode 100644 contracts/ibc-reflect-send/schema/admin_response.json delete mode 100644 contracts/ibc-reflect-send/schema/execute_msg.json create mode 100644 contracts/ibc-reflect-send/schema/ibc-reflect-send.json delete mode 100644 contracts/ibc-reflect-send/schema/instantiate_msg.json delete mode 100644 contracts/ibc-reflect-send/schema/list_accounts_response.json delete mode 100644 contracts/ibc-reflect-send/schema/query_msg.json create mode 100644 contracts/ibc-reflect/schema/ibc-reflect.json delete mode 100644 contracts/ibc-reflect/schema/instantiate_msg.json delete mode 100644 contracts/ibc-reflect/schema/query_msg.json diff --git a/contracts/ibc-reflect-send/examples/schema.rs b/contracts/ibc-reflect-send/examples/schema.rs index 9a4aa8012..2f8a8d3e7 100644 --- a/contracts/ibc-reflect-send/examples/schema.rs +++ b/contracts/ibc-reflect-send/examples/schema.rs @@ -1,24 +1,20 @@ use std::env::current_dir; -use std::fs::create_dir_all; -use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; +use cosmwasm_schema::{export_schema, schema_for, write_api}; use ibc_reflect_send::ibc_msg::PacketMsg; -use ibc_reflect_send::msg::{ - AccountResponse, AdminResponse, ExecuteMsg, InstantiateMsg, ListAccountsResponse, QueryMsg, -}; +use ibc_reflect_send::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { + // Clear & write standard API + write_api! { + instantiate: InstantiateMsg, + execute: ExecuteMsg, + query: QueryMsg, + } + + // Schemas for inter-contract communication let mut out_dir = current_dir().unwrap(); out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - export_schema(&schema_for!(ExecuteMsg), &out_dir); - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); export_schema(&schema_for!(PacketMsg), &out_dir); - export_schema(&schema_for!(AdminResponse), &out_dir); - export_schema(&schema_for!(AccountResponse), &out_dir); - export_schema(&schema_for!(ListAccountsResponse), &out_dir); } diff --git a/contracts/ibc-reflect-send/schema/account_response.json b/contracts/ibc-reflect-send/schema/account_response.json deleted file mode 100644 index 894e5b5de..000000000 --- a/contracts/ibc-reflect-send/schema/account_response.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AccountResponse", - "type": "object", - "required": [ - "last_update_time", - "remote_balance" - ], - "properties": { - "last_update_time": { - "description": "last block balance was updated (0 is never)", - "allOf": [ - { - "$ref": "#/definitions/Timestamp" - } - ] - }, - "remote_addr": { - "description": "in normal cases, it should be set, but there is a delay between binding the channel and making a query and in that time it is empty", - "type": [ - "string", - "null" - ] - }, - "remote_balance": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/ibc-reflect-send/schema/admin_response.json b/contracts/ibc-reflect-send/schema/admin_response.json deleted file mode 100644 index 627be7a02..000000000 --- a/contracts/ibc-reflect-send/schema/admin_response.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AdminResponse", - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/ibc-reflect-send/schema/execute_msg.json b/contracts/ibc-reflect-send/schema/execute_msg.json deleted file mode 100644 index 3bbae221f..000000000 --- a/contracts/ibc-reflect-send/schema/execute_msg.json +++ /dev/null @@ -1,817 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Changes the admin", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "send_msgs" - ], - "properties": { - "send_msgs": { - "type": "object", - "required": [ - "channel_id", - "msgs" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "check_remote_balance" - ], - "properties": { - "check_remote_balance": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "If you sent funds to this contract, it will attempt to ibc transfer them to the account on the remote side of this channel. If we don't have the address yet, this fails.", - "type": "object", - "required": [ - "send_funds" - ], - "properties": { - "send_funds": { - "type": "object", - "required": [ - "reflect_channel_id", - "transfer_channel_id" - ], - "properties": { - "reflect_channel_id": { - "description": "The channel id we use above to talk with the reflect contract", - "type": "string" - }, - "transfer_channel_id": { - "description": "The channel to use for ibctransfer. This is bound to a different port and handled by a different module. It should connect to the same chain as the reflect_channel_id does", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "set_withdraw_address" - ], - "properties": { - "set_withdraw_address": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The `withdraw_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "withdraw_delegator_reward" - ], - "properties": { - "withdraw_delegator_reward": { - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "The `validator_address`", - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Empty": { - "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", - "type": "object" - }, - "GovMsg": { - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "$ref": "#/definitions/VoteOption" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "exisiting channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "delegate" - ], - "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "undelegate" - ], - "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readbale label for the contract", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json new file mode 100644 index 000000000..4c8d437f3 --- /dev/null +++ b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json @@ -0,0 +1,1055 @@ +{ + "contract_name": "ibc-reflect-send", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "This needs no info. Owner of the contract is whoever signed the InstantiateMsg.", + "type": "object", + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Changes the admin", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin" + ], + "properties": { + "admin": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "send_msgs" + ], + "properties": { + "send_msgs": { + "type": "object", + "required": [ + "channel_id", + "msgs" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "check_remote_balance" + ], + "properties": { + "check_remote_balance": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "If you sent funds to this contract, it will attempt to ibc transfer them to the account on the remote side of this channel. If we don't have the address yet, this fails.", + "type": "object", + "required": [ + "send_funds" + ], + "properties": { + "send_funds": { + "type": "object", + "required": [ + "reflect_channel_id", + "transfer_channel_id" + ], + "properties": { + "reflect_channel_id": { + "description": "The channel id we use above to talk with the reflect contract", + "type": "string" + }, + "transfer_channel_id": { + "description": "The channel to use for ibctransfer. This is bound to a different port and handled by a different module. It should connect to the same chain as the reflect_channel_id does", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "additionalProperties": false + } + ] + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "GovMsg": { + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "vote": { + "$ref": "#/definitions/VoteOption" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "exisiting channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "revision": { + "description": "the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readbale label for the contract", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "admin" + ], + "properties": { + "admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "list_accounts" + ], + "properties": { + "list_accounts": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "account" + ], + "properties": { + "account": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": null, + "sudo": null, + "responses": { + "account": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AccountInfo", + "type": "object", + "required": [ + "channel_id", + "last_update_time", + "remote_balance" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "last_update_time": { + "description": "last block balance was updated (0 is never)", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "remote_addr": { + "description": "in normal cases, it should be set, but there is a delay between binding the channel and making a query and in that time it is empty", + "type": [ + "string", + "null" + ] + }, + "remote_balance": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "additionalProperties": false, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + }, + "admin": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AdminResponse", + "type": "object", + "required": [ + "admin" + ], + "properties": { + "admin": { + "type": "string" + } + }, + "additionalProperties": false + }, + "list_accounts": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListAccountsResponse", + "type": "object", + "required": [ + "accounts" + ], + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/AccountInfo" + } + } + }, + "additionalProperties": false, + "definitions": { + "AccountInfo": { + "type": "object", + "required": [ + "channel_id", + "last_update_time", + "remote_balance" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "last_update_time": { + "description": "last block balance was updated (0 is never)", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "remote_addr": { + "description": "in normal cases, it should be set, but there is a delay between binding the channel and making a query and in that time it is empty", + "type": [ + "string", + "null" + ] + }, + "remote_balance": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + }, + "additionalProperties": false + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + } + } +} diff --git a/contracts/ibc-reflect-send/schema/instantiate_msg.json b/contracts/ibc-reflect-send/schema/instantiate_msg.json deleted file mode 100644 index 4eb2ede31..000000000 --- a/contracts/ibc-reflect-send/schema/instantiate_msg.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "This needs no info. Owner of the contract is whoever signed the InstantiateMsg.", - "type": "object", - "additionalProperties": false -} diff --git a/contracts/ibc-reflect-send/schema/list_accounts_response.json b/contracts/ibc-reflect-send/schema/list_accounts_response.json deleted file mode 100644 index bb03b416b..000000000 --- a/contracts/ibc-reflect-send/schema/list_accounts_response.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ListAccountsResponse", - "type": "object", - "required": [ - "accounts" - ], - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/definitions/AccountInfo" - } - } - }, - "additionalProperties": false, - "definitions": { - "AccountInfo": { - "type": "object", - "required": [ - "channel_id", - "last_update_time", - "remote_balance" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "last_update_time": { - "description": "last block balance was updated (0 is never)", - "allOf": [ - { - "$ref": "#/definitions/Timestamp" - } - ] - }, - "remote_addr": { - "description": "in normal cases, it should be set, but there is a delay between binding the channel and making a query and in that time it is empty", - "type": [ - "string", - "null" - ] - }, - "remote_balance": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - } - } -} diff --git a/contracts/ibc-reflect-send/schema/query_msg.json b/contracts/ibc-reflect-send/schema/query_msg.json deleted file mode 100644 index 05a60cc1b..000000000 --- a/contracts/ibc-reflect-send/schema/query_msg.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "list_accounts" - ], - "properties": { - "list_accounts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/contracts/ibc-reflect/examples/schema.rs b/contracts/ibc-reflect/examples/schema.rs index 419c7a603..74b340838 100644 --- a/contracts/ibc-reflect/examples/schema.rs +++ b/contracts/ibc-reflect/examples/schema.rs @@ -1,7 +1,7 @@ use std::env::current_dir; -use std::fs::create_dir_all; -use cosmwasm_schema::{export_schema, export_schema_with_title, remove_schemas, schema_for}; +use cosmwasm_schema::{export_schema, export_schema_with_title, schema_for, write_api}; +use cosmwasm_std::Empty; use ibc_reflect::msg::{ AcknowledgementMsg, BalancesResponse, DispatchResponse, InstantiateMsg, PacketMsg, QueryMsg, @@ -9,13 +9,16 @@ use ibc_reflect::msg::{ }; fn main() { + // Clear & write standard API + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + migrate: Empty, + } + + // Schemas for inter-contract communication let mut out_dir = current_dir().unwrap(); out_dir.push("schema"); - create_dir_all(&out_dir).unwrap(); - remove_schemas(&out_dir).unwrap(); - - export_schema(&schema_for!(InstantiateMsg), &out_dir); - export_schema(&schema_for!(QueryMsg), &out_dir); export_schema(&schema_for!(PacketMsg), &out_dir); export_schema_with_title( &schema_for!(AcknowledgementMsg), diff --git a/contracts/ibc-reflect/schema/ibc-reflect.json b/contracts/ibc-reflect/schema/ibc-reflect.json new file mode 100644 index 000000000..dbe9a1c1c --- /dev/null +++ b/contracts/ibc-reflect/schema/ibc-reflect.json @@ -0,0 +1,123 @@ +{ + "contract_name": "ibc-reflect", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Just needs to know the code_id of a reflect contract to spawn sub-accounts", + "type": "object", + "required": [ + "reflect_code_id" + ], + "properties": { + "reflect_code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "execute": null, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Returns (reflect) account that is attached to this channel, or none.", + "type": "object", + "required": [ + "account" + ], + "properties": { + "account": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns all (channel, reflect_account) pairs. No pagination - this is a test contract", + "type": "object", + "required": [ + "list_accounts" + ], + "properties": { + "list_accounts": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "account": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AccountResponse", + "type": "object", + "properties": { + "account": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "list_accounts": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListAccountsResponse", + "type": "object", + "required": [ + "accounts" + ], + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/AccountInfo" + } + } + }, + "additionalProperties": false, + "definitions": { + "AccountInfo": { + "type": "object", + "required": [ + "account", + "channel_id" + ], + "properties": { + "account": { + "type": "string" + }, + "channel_id": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } +} diff --git a/contracts/ibc-reflect/schema/instantiate_msg.json b/contracts/ibc-reflect/schema/instantiate_msg.json deleted file mode 100644 index 1320f1a0b..000000000 --- a/contracts/ibc-reflect/schema/instantiate_msg.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "Just needs to know the code_id of a reflect contract to spawn sub-accounts", - "type": "object", - "required": [ - "reflect_code_id" - ], - "properties": { - "reflect_code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false -} diff --git a/contracts/ibc-reflect/schema/query_msg.json b/contracts/ibc-reflect/schema/query_msg.json deleted file mode 100644 index 2fb7b34e6..000000000 --- a/contracts/ibc-reflect/schema/query_msg.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "Returns (reflect) account that is attached to this channel, or none.", - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Returns all (channel, reflect_account) pairs. No pagination - this is a test contract", - "type": "object", - "required": [ - "list_accounts" - ], - "properties": { - "list_accounts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} From 5d8c91f266a44b80ed30a3b9026ff384e4e7072e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 14:28:07 +0200 Subject: [PATCH 121/344] update `wasmer` to `2.3.0` --- Cargo.lock | 201 +++++++++++++++------ packages/profiler/Cargo.toml | 8 +- packages/profiler/src/operators.rs | 44 ++++- packages/vm/Cargo.toml | 4 +- packages/vm/src/wasm_backend/gatekeeper.rs | 22 ++- 5 files changed, 211 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d28714c54..8f30089db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli", ] [[package]] @@ -240,6 +240,19 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -370,24 +383,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli", "log", "regalloc", "smallvec", @@ -396,31 +409,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -845,21 +857,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - [[package]] name = "group" version = "0.11.0" @@ -1381,9 +1387,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1975,9 +1981,9 @@ checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1987,6 +1993,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -2000,11 +2007,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -2015,20 +2035,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", - "wasmparser 0.78.2", + "wasmparser 0.83.0", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli", "loupe", "more-asserts", "rayon", @@ -2037,18 +2056,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli", "lazy_static", "loupe", "more-asserts", @@ -2056,14 +2075,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -2073,9 +2091,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -2088,6 +2106,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -2095,9 +2114,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -2110,6 +2129,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -2120,12 +2140,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -2133,16 +2152,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -2152,9 +2188,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object", "thiserror", @@ -2164,12 +2200,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -2177,23 +2216,28 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] @@ -2206,9 +2250,9 @@ checksum = "b35c86d22e720a07d954ebbed772d01180501afe7d03d464f413bb5f8914a8d6" [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wast" @@ -2282,6 +2326,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.5.5" diff --git a/packages/profiler/Cargo.toml b/packages/profiler/Cargo.toml index 51bb8d279..4c611faaf 100644 --- a/packages/profiler/Cargo.toml +++ b/packages/profiler/Cargo.toml @@ -14,9 +14,9 @@ cosmwasm-vm = { path = "../vm" } cosmwasm-std = { path = "../std" } loupe = "0.1.3" walrus = "0.19.0" -wasmer = { version = "=2.2.1", default-features = false, features = ["compiler"] } -wasmer-types = "=2.2.1" -wasmer-vm = "=2.2.1" +wasmer = { version = "=2.3.0", default-features = false, features = ["compiler"] } +wasmer-types = "=2.3.0" +wasmer-vm = "=2.3.0" # wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", default-features = false, features = ["compiler"] } # wasmer-types = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c" } # wasmer-vm = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c" } @@ -24,5 +24,5 @@ hackatom = { path = "../../contracts/hackatom", default-features = false } csv = "1.1.6" [dev-dependencies] -wasmer = { version = "=2.2.1", features = ["compiler"] } +wasmer = { version = "=2.3.0", features = ["compiler"] } # wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", features = ["compiler"] } diff --git a/packages/profiler/src/operators.rs b/packages/profiler/src/operators.rs index 60345baf8..b476dcae0 100644 --- a/packages/profiler/src/operators.rs +++ b/packages/profiler/src/operators.rs @@ -15,7 +15,6 @@ pub enum OperatorSymbol { Catch, Throw, Rethrow, - Unwind, End, Br, BrIf, @@ -530,6 +529,25 @@ pub enum OperatorSymbol { F64x2ConvertLowI32x4U, F32x4DemoteF64x2Zero, F64x2PromoteLowF32x4, + + // unsorted + I8x16RelaxedSwizzle, + I32x4RelaxedTruncSatF32x4S, + I32x4RelaxedTruncSatF32x4U, + I32x4RelaxedTruncSatF64x2SZero, + I32x4RelaxedTruncSatF64x2UZero, + F32x4Fma, + F32x4Fms, + F64x2Fma, + F64x2Fms, + I8x16LaneSelect, + I16x8LaneSelect, + I32x4LaneSelect, + I64x2LaneSelect, + F32x4RelaxedMin, + F32x4RelaxedMax, + F64x2RelaxedMin, + F64x2RelaxedMax, } impl From<&Operator<'_>> for OperatorSymbol { @@ -545,7 +563,6 @@ impl From<&Operator<'_>> for OperatorSymbol { Operator::Catch { .. } => OperatorSymbol::Catch, Operator::Throw { .. } => OperatorSymbol::Throw, Operator::Rethrow { .. } => OperatorSymbol::Rethrow, - Operator::Unwind => OperatorSymbol::Unwind, Operator::End => OperatorSymbol::End, Operator::Br { .. } => OperatorSymbol::Br, Operator::BrIf { .. } => OperatorSymbol::BrIf, @@ -1060,6 +1077,29 @@ impl From<&Operator<'_>> for OperatorSymbol { Operator::F64x2ConvertLowI32x4U => OperatorSymbol::F64x2ConvertLowI32x4U, Operator::F32x4DemoteF64x2Zero => OperatorSymbol::F32x4DemoteF64x2Zero, Operator::F64x2PromoteLowF32x4 => OperatorSymbol::F64x2PromoteLowF32x4, + + // unsorted + Operator::I8x16RelaxedSwizzle => OperatorSymbol::I8x16RelaxedSwizzle, + Operator::I32x4RelaxedTruncSatF32x4S => OperatorSymbol::I32x4RelaxedTruncSatF32x4S, + Operator::I32x4RelaxedTruncSatF32x4U => OperatorSymbol::I32x4RelaxedTruncSatF32x4U, + Operator::I32x4RelaxedTruncSatF64x2SZero => { + OperatorSymbol::I32x4RelaxedTruncSatF64x2SZero + } + Operator::I32x4RelaxedTruncSatF64x2UZero => { + OperatorSymbol::I32x4RelaxedTruncSatF64x2UZero + } + Operator::F32x4Fma => OperatorSymbol::F32x4Fma, + Operator::F32x4Fms => OperatorSymbol::F32x4Fms, + Operator::F64x2Fma => OperatorSymbol::F64x2Fma, + Operator::F64x2Fms => OperatorSymbol::F64x2Fms, + Operator::I8x16LaneSelect => OperatorSymbol::I8x16LaneSelect, + Operator::I16x8LaneSelect => OperatorSymbol::I16x8LaneSelect, + Operator::I32x4LaneSelect => OperatorSymbol::I32x4LaneSelect, + Operator::I64x2LaneSelect => OperatorSymbol::I64x2LaneSelect, + Operator::F32x4RelaxedMin => OperatorSymbol::F32x4RelaxedMin, + Operator::F32x4RelaxedMax => OperatorSymbol::F32x4RelaxedMax, + Operator::F64x2RelaxedMin => OperatorSymbol::F64x2RelaxedMin, + Operator::F64x2RelaxedMax => OperatorSymbol::F64x2RelaxedMax, } } } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 42d8f8a92..6caf057ee 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -50,8 +50,8 @@ serde = { version = "1.0.103", default-features = false, features = ["derive", " serde_json = "1.0" sha2 = "0.9.1" thiserror = "1.0" -wasmer = { version = "=2.2.1", default-features = false, features = ["cranelift", "universal", "singlepass"] } -wasmer-middlewares = "=2.2.1" +wasmer = { version = "=2.3.0", default-features = false, features = ["cranelift", "universal", "singlepass"] } +wasmer-middlewares = "=2.3.0" loupe = "0.1.3" # Wasmer git/local (used for quick local debugging or patching) diff --git a/packages/vm/src/wasm_backend/gatekeeper.rs b/packages/vm/src/wasm_backend/gatekeeper.rs index 7d5f625a0..c5c82efaf 100644 --- a/packages/vm/src/wasm_backend/gatekeeper.rs +++ b/packages/vm/src/wasm_backend/gatekeeper.rs @@ -485,7 +485,16 @@ impl FunctionMiddleware for FunctionGatekeeper { | Operator::F64x2ConvertLowI32x4S | Operator::F64x2ConvertLowI32x4U | Operator::F32x4DemoteF64x2Zero - | Operator::F64x2PromoteLowF32x4 => { + | Operator::F64x2PromoteLowF32x4 + | Operator::I8x16RelaxedSwizzle + | Operator::I32x4RelaxedTruncSatF32x4S + | Operator::I32x4RelaxedTruncSatF32x4U + | Operator::I32x4RelaxedTruncSatF64x2SZero + | Operator::I32x4RelaxedTruncSatF64x2UZero + | Operator::I8x16LaneSelect + | Operator::I16x8LaneSelect + | Operator::I32x4LaneSelect + | Operator::I64x2LaneSelect => { if self.config.allow_feature_simd { state.push_operator(operator); Ok(()) @@ -624,7 +633,15 @@ impl FunctionMiddleware for FunctionGatekeeper { | Operator::I32x4TruncSatF32x4S | Operator::I32x4TruncSatF32x4U | Operator::F32x4ConvertI32x4S - | Operator::F32x4ConvertI32x4U => { + | Operator::F32x4ConvertI32x4U + | Operator::F32x4RelaxedMin + | Operator::F32x4RelaxedMax + | Operator::F64x2RelaxedMin + | Operator::F64x2RelaxedMax + | Operator::F32x4Fma + | Operator::F32x4Fms + | Operator::F64x2Fma + | Operator::F64x2Fms => { if self.config.allow_floats { state.push_operator(operator); Ok(()) @@ -656,7 +673,6 @@ impl FunctionMiddleware for FunctionGatekeeper { | Operator::Catch { .. } | Operator::Throw { .. } | Operator::Rethrow { .. } - | Operator::Unwind { .. } | Operator::Delegate { .. } | Operator::CatchAll => { if self.config.allow_feature_exception_handling { From 2f7199bd8b221f0ae5e1cab82a84f1f70091a9a7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 14:55:25 +0200 Subject: [PATCH 122/344] Update contract Cargo.lock files --- contracts/burner/Cargo.lock | 207 +++++++++++++++++++------- contracts/crypto-verify/Cargo.lock | 207 +++++++++++++++++++------- contracts/floaty/Cargo.lock | 207 +++++++++++++++++++------- contracts/hackatom/Cargo.lock | 207 +++++++++++++++++++------- contracts/ibc-reflect-send/Cargo.lock | 207 +++++++++++++++++++------- contracts/ibc-reflect/Cargo.lock | 207 +++++++++++++++++++------- contracts/queue/Cargo.lock | 207 +++++++++++++++++++------- contracts/reflect/Cargo.lock | 207 +++++++++++++++++++------- contracts/staking/Cargo.lock | 207 +++++++++++++++++++------- 9 files changed, 1350 insertions(+), 513 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 26973772e..62c799eb7 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -150,6 +150,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -234,24 +247,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -260,31 +273,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -458,9 +470,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -473,9 +485,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -642,9 +654,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -764,9 +776,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1076,9 +1088,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1529,9 +1541,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1541,6 +1553,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1553,11 +1566,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1568,20 +1594,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1590,18 +1615,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1609,14 +1634,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1626,9 +1650,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1641,6 +1665,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1648,9 +1673,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1663,6 +1688,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1673,12 +1699,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1686,16 +1711,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1705,9 +1747,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1717,12 +1759,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1730,32 +1775,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1789,6 +1839,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 551a5c75d..4ee1ae41f 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -152,6 +152,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -244,24 +257,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -270,31 +283,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -485,9 +497,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -500,9 +512,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -669,9 +681,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -803,9 +815,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1115,9 +1127,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1596,9 +1608,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1608,6 +1620,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1620,11 +1633,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1635,20 +1661,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1657,18 +1682,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1676,14 +1701,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1693,9 +1717,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1708,6 +1732,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1715,9 +1740,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1730,6 +1755,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1740,12 +1766,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1753,16 +1778,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1772,9 +1814,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1784,12 +1826,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1797,32 +1842,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1856,6 +1906,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 81ea85949..d50490adf 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -231,24 +244,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -257,31 +270,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -455,9 +467,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -470,9 +482,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -653,9 +665,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -775,9 +787,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1087,9 +1099,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1540,9 +1552,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1552,6 +1564,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1564,11 +1577,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1579,20 +1605,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1601,18 +1626,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1620,14 +1645,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1637,9 +1661,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1652,6 +1676,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1659,9 +1684,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1674,6 +1699,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1684,12 +1710,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1697,16 +1722,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1716,9 +1758,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1728,12 +1770,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1741,32 +1786,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1800,6 +1850,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 50be189db..eb0b72e94 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -42,9 +42,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -168,6 +168,19 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -260,24 +273,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -286,31 +299,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -484,9 +496,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -499,9 +511,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -668,9 +680,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -805,9 +817,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1117,9 +1129,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1582,9 +1594,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1594,6 +1606,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1606,11 +1619,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1621,20 +1647,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1643,18 +1668,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1662,14 +1687,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1679,9 +1703,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1694,6 +1718,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1701,9 +1726,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1716,6 +1741,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1726,12 +1752,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1739,16 +1764,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1758,9 +1800,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1770,12 +1812,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1783,32 +1828,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1842,6 +1892,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 190f4eb38..efd81002f 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -231,24 +244,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -257,31 +270,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -455,9 +467,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -470,9 +482,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -639,9 +651,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -773,9 +785,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1085,9 +1097,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1538,9 +1550,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1550,6 +1562,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1562,11 +1575,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1577,20 +1603,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1599,18 +1624,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1618,14 +1643,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1635,9 +1659,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1650,6 +1674,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1657,9 +1682,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1672,6 +1697,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1682,12 +1708,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1695,16 +1720,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1714,9 +1756,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1726,12 +1768,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1739,32 +1784,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1798,6 +1848,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 99f5692a8..37516d10e 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -231,24 +244,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -257,31 +270,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -455,9 +467,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -470,9 +482,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -639,9 +651,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -773,9 +785,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1085,9 +1097,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1538,9 +1550,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1550,6 +1562,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1562,11 +1575,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1577,20 +1603,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1599,18 +1624,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1618,14 +1643,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1635,9 +1659,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1650,6 +1674,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1657,9 +1682,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1672,6 +1697,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1682,12 +1708,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1695,16 +1720,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1714,9 +1756,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1726,12 +1768,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1739,32 +1784,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1798,6 +1848,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index f23d32af1..0f80ff386 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -223,24 +236,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -249,31 +262,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -447,9 +459,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -462,9 +474,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -631,9 +643,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -753,9 +765,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1076,9 +1088,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1529,9 +1541,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1541,6 +1553,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1553,11 +1566,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1568,20 +1594,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1590,18 +1615,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1609,14 +1634,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1626,9 +1650,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1641,6 +1665,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1648,9 +1673,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1663,6 +1688,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1673,12 +1699,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1686,16 +1711,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1705,9 +1747,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1717,12 +1759,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1730,32 +1775,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1789,6 +1839,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index feae7a205..025e86361 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -231,24 +244,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -257,31 +270,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -455,9 +467,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -470,9 +482,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -639,9 +651,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -761,9 +773,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1086,9 +1098,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1539,9 +1551,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1551,6 +1563,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1563,11 +1576,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1578,20 +1604,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1600,18 +1625,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1619,14 +1644,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1636,9 +1660,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1651,6 +1675,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1658,9 +1683,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1673,6 +1698,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1683,12 +1709,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1696,16 +1721,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1715,9 +1757,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1727,12 +1769,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1740,32 +1785,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1799,6 +1849,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 55873af0e..914586279 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -139,6 +139,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -231,24 +244,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bea67967505247f54fa2c85cf4f6e0e31c4e5692c9b70e4ae58e339067333" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48194035d2752bdd5bdae429e3ab88676e95f52a2b1355a5d4e809f9e39b1d74" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli 0.26.1", "log", "regalloc", "smallvec", @@ -257,31 +270,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976efb22fcab4f2cd6bd4e9913764616a54d895c1a23530128d04e03633c555f" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dabb5fe66e04d4652e434195b45ae65b5c8172d520247b8f66d8df42b2b45dc" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3329733e4d4b8e91c809efcaa4faee80bf66f20164e3dd16d707346bd3494799" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.76.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -461,9 +473,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "dynasm" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1801e630bd336d0bbbdbf814de6cc749c9a400c7e3d995e6adfd455d0c83c" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -476,9 +488,9 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d428afc93ad288f6dffc1fa5f4a78201ad2eec33c5a522e51c181009eb09061" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", @@ -645,9 +657,9 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", @@ -767,9 +779,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libloading" @@ -1079,9 +1091,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ "log", "rustc-hash", @@ -1566,9 +1578,9 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmer" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f727a39e7161f7438ddb8eafe571b67c576a8c2fb459f666d9053b5bba4afdea" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if", "indexmap", @@ -1578,6 +1590,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-bindgen", + "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass", @@ -1590,11 +1603,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-compiler" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9951599222eb12bd13d4d91bcded0a880e4c22c2dfdabdf5dc7e5e803b7bf3" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" dependencies = [ "enumset", "loupe", @@ -1605,20 +1631,19 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmer-vm", "wasmparser", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c83273bce44e668f3a2b9ccb7f1193db918b1d6806f64acc5ff71f6ece5f20" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.25.0", + "gimli 0.26.1", "loupe", "more-asserts", "rayon", @@ -1627,18 +1652,18 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432e993840cdb8e6875ddc8c9eea64e7a129579b4706bd91b8eb474d9c4a860" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "gimli 0.26.1", "lazy_static", "loupe", "more-asserts", @@ -1646,14 +1671,13 @@ dependencies = [ "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-derive" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458dbd9718a837e6dbc52003aef84487d79eedef5fa28c7d28b6784be98ac08e" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1663,9 +1687,9 @@ dependencies = [ [[package]] name = "wasmer-engine" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed603a6d037ebbb14014d7f739ae996a78455a4b86c41cfa4e81c590a1253b9" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" dependencies = [ "backtrace", "enumset", @@ -1678,6 +1702,7 @@ dependencies = [ "serde_bytes", "target-lexicon", "thiserror", + "wasmer-artifact", "wasmer-compiler", "wasmer-types", "wasmer-vm", @@ -1685,9 +1710,9 @@ dependencies = [ [[package]] name = "wasmer-engine-dylib" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd7fdc60e252a795c849b3f78a81a134783051407e7e279c10b7019139ef8dc" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ "cfg-if", "enum-iterator", @@ -1700,6 +1725,7 @@ dependencies = [ "serde", "tempfile", "tracing", + "wasmer-artifact", "wasmer-compiler", "wasmer-engine", "wasmer-object", @@ -1710,12 +1736,11 @@ dependencies = [ [[package]] name = "wasmer-engine-universal" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcff0cd2c01a8de6009fd863b14ea883132a468a24f2d2ee59dc34453d3a31b5" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ "cfg-if", - "enum-iterator", "enumset", "leb128", "loupe", @@ -1723,16 +1748,33 @@ dependencies = [ "rkyv", "wasmer-compiler", "wasmer-engine", + "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", "winapi", ] +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + [[package]] name = "wasmer-middlewares" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659775db15684f4674c3a8967409682c2eb44f63cc21121fa3dcd975c03ab887" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" dependencies = [ "loupe", "wasmer", @@ -1742,9 +1784,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.3", "thiserror", @@ -1754,12 +1796,15 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659fa3dd6c76f62630deff4ac8c7657b07f0b1e4d7e0f8243a552b9d9b448e24" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ + "backtrace", + "enum-iterator", "indexmap", "loupe", + "more-asserts", "rkyv", "serde", "thiserror", @@ -1767,32 +1812,37 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdc46158517c2769f9938bc222a7d41b3bb330824196279d8aa2d667cd40641" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", "cfg-if", + "corosensei", "enum-iterator", "indexmap", + "lazy_static", "libc", "loupe", + "mach", "memoffset", "more-asserts", "region", "rkyv", + "scopeguard", "serde", "thiserror", + "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" @@ -1826,6 +1876,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + [[package]] name = "zeroize" version = "1.4.1" From 896fee6634956207ee272895f13d545a272bd580 Mon Sep 17 00:00:00 2001 From: joemonem <66594578+joemonem@users.noreply.github.com> Date: Wed, 13 Jul 2022 16:08:17 +0300 Subject: [PATCH 123/344] Update IBC.md --- IBC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IBC.md b/IBC.md index 08cc9ff38..41497bdd4 100644 --- a/IBC.md +++ b/IBC.md @@ -207,7 +207,7 @@ pub fn ibc_channel_close( ### Packet Lifecycle Unfortunately the -[IBC spec on Pakcet Lifecycle](https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#packet-flow--handling) +[IBC spec on Packet Lifecycle](https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#packet-flow--handling) is missing all useful diagrams, but it may provide some theoretical background for this text if you wish to look. From 576fed0e1e2ba9ed7e9a632d7febd59ce9530f75 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 15:10:08 +0200 Subject: [PATCH 124/344] CHANGELOG update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c570d7c..cc03e3f1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ and this project adheres to [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 +### Changed + +- cosmwasm-vm/cosmwasm-profiler: Upgrade Wasmer to 2.3.0. + ## [1.0.0] - 2022-05-14 ### Added From 87628db3bc4ee8ab099373531dc19f4105dd7d58 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 15:31:36 +0200 Subject: [PATCH 125/344] CI: update MSRV from 1.56.1 to 1.59.0 --- .circleci/config.yml | 124 +++++++++++++++++++-------------------- .github/workflows/ci.yml | 2 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 55638fa95..e816ec2f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.56.1", "1.62.0"] + rust-version: ["1.59.0", "1.62.0"] - benchmarking: requires: - package_vm @@ -82,7 +82,7 @@ jobs: command: | wget https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init chmod +x rustup-init - ./rustup-init -y --default-toolchain 1.56.1 --profile minimal + ./rustup-init -y --default-toolchain 1.59.0 --profile minimal - run: name: Version information command: rustc --version; cargo --version; rustup --version; rustup target list --installed @@ -91,7 +91,7 @@ jobs: command: rustup target add wasm32-unknown-unknown && rustup target list --installed - restore_cache: keys: - - cargocache-v2-arm64-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-arm64-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: "contracts/crypto-verify: integration-test" working_directory: ~/project/contracts/crypto-verify @@ -131,11 +131,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-arm64-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-arm64-rust:1.59.0-{{ checksum "Cargo.lock" }} package_crypto: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -143,7 +143,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_crypto-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_crypto-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build working_directory: ~/project/packages/crypto @@ -158,11 +158,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_crypto-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_crypto-rust:1.59.0-{{ checksum "Cargo.lock" }} package_schema: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -170,7 +170,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_schema-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_schema-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build working_directory: ~/project/packages/schema @@ -185,11 +185,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_schema-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_schema-rust:1.59.0-{{ checksum "Cargo.lock" }} package_schema_derive: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -197,7 +197,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_schema_derive-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_schema_derive-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build working_directory: ~/project/packages/schema-derive @@ -212,11 +212,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_schema_derive-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_schema_derive-rust:1.59.0-{{ checksum "Cargo.lock" }} package_std: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: # Limit the number of parallel jobs to avoid OOM crashes during doc testing RUST_TEST_THREADS: 8 @@ -227,7 +227,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_std-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_std-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -274,11 +274,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_std-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_std-rust:1.59.0-{{ checksum "Cargo.lock" }} package_storage: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -286,7 +286,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_storage-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_storage-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build library for native target working_directory: ~/project/packages/storage @@ -305,11 +305,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_storage-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_storage-rust:1.59.0-{{ checksum "Cargo.lock" }} package_vm: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -317,7 +317,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_vm-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_vm-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build working_directory: ~/project/packages/vm @@ -346,11 +346,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_vm-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_vm-rust:1.59.0-{{ checksum "Cargo.lock" }} package_profiler: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -358,7 +358,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_profiler-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_profiler-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build working_directory: ~/project/packages/profiler @@ -373,11 +373,11 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_profiler-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_profiler-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_burner: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/burner @@ -389,7 +389,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_burner-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_burner-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -423,11 +423,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_burner-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_burner-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_crypto_verify: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/crypto-verify @@ -439,7 +439,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_crypto_verify-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_crypto_verify-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -473,11 +473,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_crypto_verify-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_crypto_verify-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_hackatom: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/hackatom @@ -489,7 +489,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_hackatom-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_hackatom-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -523,11 +523,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_hackatom-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_hackatom-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_ibc_reflect: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/ibc-reflect @@ -539,7 +539,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_ibc_reflect-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_ibc_reflect-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -573,11 +573,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_ibc_reflect-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_ibc_reflect-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_ibc_reflect_send: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/ibc-reflect-send @@ -589,7 +589,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_ibc_reflect_send-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_ibc_reflect_send-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -623,11 +623,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_ibc_reflect_send-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_ibc_reflect_send-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_floaty: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/floaty @@ -639,7 +639,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_floaty-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_floaty-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -673,11 +673,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_floaty-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_floaty-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_queue: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/queue @@ -689,7 +689,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_queue-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_queue-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -723,11 +723,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_queue-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_queue-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_reflect: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/reflect @@ -739,7 +739,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_reflect-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_reflect-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -773,11 +773,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_reflect-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_reflect-rust:1.59.0-{{ checksum "Cargo.lock" }} contract_staking: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 working_directory: ~/cosmwasm/contracts/staking @@ -789,7 +789,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-v2-contract_staking-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-contract_staking-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed @@ -823,11 +823,11 @@ jobs: - target/wasm32-unknown-unknown/release/.fingerprint - target/wasm32-unknown-unknown/release/build - target/wasm32-unknown-unknown/release/deps - key: cargocache-v2-contract_staking-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-contract_staking-rust:1.59.0-{{ checksum "Cargo.lock" }} fmt: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -835,7 +835,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-fmt-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-fmt-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Add rustfmt component command: rustup component add rustfmt @@ -876,7 +876,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-fmt-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-fmt-rust:1.59.0-{{ checksum "Cargo.lock" }} fmt_extra: docker: @@ -898,7 +898,7 @@ jobs: deadlinks: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 steps: - checkout - run: @@ -906,7 +906,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-deadlinks-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-deadlinks-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Generate docs command: cargo doc @@ -926,7 +926,7 @@ jobs: - target/debug/build - target/debug/deps - /root/.cache/pip - key: cargocache-v2-deadlinks-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-deadlinks-rust:1.59.0-{{ checksum "Cargo.lock" }} clippy: parameters: @@ -1094,7 +1094,7 @@ jobs: benchmarking: docker: - - image: rust:1.56.1 + - image: rust:1.59.0 environment: RUST_BACKTRACE: 1 steps: @@ -1104,7 +1104,7 @@ jobs: command: rustc --version && cargo --version - restore_cache: keys: - - cargocache-v2-benchmarking-rust:1.56.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-benchmarking-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Run vm benchmarks (Singlepass) working_directory: ~/project/packages/vm @@ -1122,7 +1122,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: cargocache-v2-benchmarking-rust:1.56.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-benchmarking-rust:1.59.0-{{ checksum "Cargo.lock" }} coverage: # https://circleci.com/developer/images?imageType=machine @@ -1187,7 +1187,7 @@ jobs: name: Check development contracts command: | echo "Checking all contracts under ./artifacts" - docker run --volumes-from with_code rust:1.56.1 \ + docker run --volumes-from with_code rust:1.59.0 \ /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./examples/check_contract.sh ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53e11d7cb..def0099f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.56.1 + toolchain: 1.59.0 target: wasm32-unknown-unknown profile: minimal override: true From 8c0f8ccc485bad416a0f14f61e2d69358d7e9d2f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 16:31:40 +0200 Subject: [PATCH 126/344] hackatom: update argon2 test expected gas --- contracts/hackatom/tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/hackatom/tests/integration.rs b/contracts/hackatom/tests/integration.rs index 06d40d8e4..0616340c8 100644 --- a/contracts/hackatom/tests/integration.rs +++ b/contracts/hackatom/tests/integration.rs @@ -331,7 +331,7 @@ fn execute_argon2() { let gas_used = gas_before - deps.get_gas_left(); // Note: the exact gas usage depends on the Rust version used to compile Wasm, // which we only fix when using rust-optimizer, not integration tests. - let expected = 15428758650000; // +/- 20% + let expected = 8635688250000; // +/- 20% assert!(gas_used > expected * 80 / 100, "Gas used: {}", gas_used); assert!(gas_used < expected * 120 / 100, "Gas used: {}", gas_used); } From bfb2d6777e3e285dda4ba9e442561239eb2ed227 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 17:45:34 +0200 Subject: [PATCH 127/344] std: make `abort` feature default --- CHANGELOG.md | 2 ++ packages/std/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc03e3f1c..174b973fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ and this project adheres to ### Changed - cosmwasm-vm/cosmwasm-profiler: Upgrade Wasmer to 2.3.0. +- cosmwasm-std: Enable the `abort` feature by default. This provides more + helpful panic messages via a custom panic handler. ## [1.0.0] - 2022-05-14 diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index f5bbbdaa7..d3ed9ccd8 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" features = ["stargate", "staking", "ibc3"] [features] -default = ["iterator"] +default = ["iterator", "abort"] abort = [] # iterator allows us to iterate over all DB items in a given range # optional as some merkle stores (like tries) don't support this From 1a117a8c9368c257d6855214128756b34974b41e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 17:57:54 +0200 Subject: [PATCH 128/344] std: make Decimal::DECIMAL_PLACES public --- packages/std/src/math/decimal.rs | 44 ++++++++++++++++------------- packages/std/src/math/decimal256.rs | 44 ++++++++++++++++------------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 1c3db6b78..b8cf086bf 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -30,7 +30,7 @@ impl Decimal { const DECIMAL_FRACTIONAL: Uint128 = Uint128::new(1_000_000_000_000_000_000u128); // 1*10**18 const DECIMAL_FRACTIONAL_SQUARED: Uint128 = Uint128::new(1_000_000_000_000_000_000_000_000_000_000_000_000u128); // (1*10**18)**2 = 1*10**36 - const DECIMAL_PLACES: usize = 18; // This needs to be an even number. + pub const DECIMAL_PLACES: u32 = 18; // This needs to be an even number. pub const MAX: Self = Self(Uint128::MAX); @@ -95,9 +95,9 @@ impl Decimal { ) -> Result { let atomics = atomics.into(); const TEN: Uint128 = Uint128::new(10); - Ok(match decimal_places.cmp(&(Self::DECIMAL_PLACES as u32)) { + Ok(match decimal_places.cmp(&(Self::DECIMAL_PLACES)) { Ordering::Less => { - let digits = (Self::DECIMAL_PLACES as u32) - decimal_places; // No overflow because decimal_places < DECIMAL_PLACES + let digits = (Self::DECIMAL_PLACES) - decimal_places; // No overflow because decimal_places < DECIMAL_PLACES let factor = TEN.checked_pow(digits).unwrap(); // Safe because digits <= 17 Self( atomics @@ -107,7 +107,7 @@ impl Decimal { } Ordering::Equal => Self(atomics), Ordering::Greater => { - let digits = decimal_places - (Self::DECIMAL_PLACES as u32); // No overflow because decimal_places > DECIMAL_PLACES + let digits = decimal_places - (Self::DECIMAL_PLACES); // No overflow because decimal_places > DECIMAL_PLACES if let Ok(factor) = TEN.checked_pow(digits) { Self(atomics.checked_div(factor).unwrap()) // Safe because factor cannot be zero } else { @@ -183,7 +183,7 @@ impl Decimal { /// See also [`Decimal::atomics()`]. #[inline] pub const fn decimal_places(&self) -> u32 { - Self::DECIMAL_PLACES as u32 + Self::DECIMAL_PLACES } /// Rounds value down after decimal places. @@ -313,12 +313,10 @@ impl Decimal { /// Precision *must* be a number between 0 and 9 (inclusive). /// /// Returns `None` if the internal multiplication overflows. - fn sqrt_with_precision(&self, precision: usize) -> Option { - let precision = precision as u32; - + fn sqrt_with_precision(&self, precision: u32) -> Option { let inner_mul = 100u128.pow(precision); self.0.checked_mul(inner_mul.into()).ok().map(|inner| { - let outer_mul = 10u128.pow(Self::DECIMAL_PLACES as u32 / 2 - precision); + let outer_mul = 10u128.pow(Self::DECIMAL_PLACES / 2 - precision); Decimal(inner.isqrt().checked_mul(Uint128::from(outer_mul)).unwrap()) }) } @@ -406,15 +404,20 @@ impl FromStr for Decimal { let fractional = fractional_part .parse::() .map_err(|_| StdError::generic_err("Error parsing fractional"))?; - let exp = - (Self::DECIMAL_PLACES.checked_sub(fractional_part.len())).ok_or_else(|| { - StdError::generic_err(format!( - "Cannot parse more than {} fractional digits", - Self::DECIMAL_PLACES - )) - })?; + let exp = (Self::DECIMAL_PLACES.checked_sub( + fractional_part + .len() + .try_into() + .map_err(|_| StdError::generic_err("fractional too long"))?, + )) + .ok_or_else(|| { + StdError::generic_err(format!( + "Cannot parse more than {} fractional digits", + Self::DECIMAL_PLACES + )) + })?; debug_assert!(exp <= Self::DECIMAL_PLACES); - let fractional_factor = Uint128::from(10u128.pow(exp as u32)); + let fractional_factor = Uint128::from(10u128.pow(exp)); atomics = atomics .checked_add( // The inner multiplication can't overflow because @@ -440,8 +443,11 @@ impl fmt::Display for Decimal { if fractional.is_zero() { write!(f, "{}", whole) } else { - let fractional_string = - format!("{:0>padding$}", fractional, padding = Self::DECIMAL_PLACES); + let fractional_string = format!( + "{:0>padding$}", + fractional, + padding = Self::DECIMAL_PLACES as usize + ); f.write_str(&whole.to_string())?; f.write_char('.')?; f.write_str(fractional_string.trim_end_matches('0'))?; diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 7e13dfda0..c53397a79 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -30,7 +30,6 @@ pub struct Decimal256(#[schemars(with = "String")] Uint256); pub struct Decimal256RangeExceeded; impl Decimal256 { - const DECIMAL_PLACES: usize = 18; const DECIMAL_FRACTIONAL: Uint256 = // 1*10**18 Uint256::from_be_bytes([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 224, 182, @@ -41,6 +40,7 @@ impl Decimal256 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 151, 206, 123, 201, 7, 21, 179, 75, 159, 16, 0, 0, 0, 0, ]); + pub const DECIMAL_PLACES: u32 = 18; pub const MAX: Self = Self(Uint256::MAX); @@ -108,9 +108,9 @@ impl Decimal256 { ) -> Result { let atomics = atomics.into(); let ten = Uint256::from(10u64); // TODO: make const - Ok(match decimal_places.cmp(&(Self::DECIMAL_PLACES as u32)) { + Ok(match decimal_places.cmp(&(Self::DECIMAL_PLACES)) { Ordering::Less => { - let digits = (Self::DECIMAL_PLACES as u32) - decimal_places; // No overflow because decimal_places < DECIMAL_PLACES + let digits = (Self::DECIMAL_PLACES) - decimal_places; // No overflow because decimal_places < DECIMAL_PLACES let factor = ten.checked_pow(digits).unwrap(); // Safe because digits <= 17 Self( atomics @@ -120,7 +120,7 @@ impl Decimal256 { } Ordering::Equal => Self(atomics), Ordering::Greater => { - let digits = decimal_places - (Self::DECIMAL_PLACES as u32); // No overflow because decimal_places > DECIMAL_PLACES + let digits = decimal_places - (Self::DECIMAL_PLACES); // No overflow because decimal_places > DECIMAL_PLACES if let Ok(factor) = ten.checked_pow(digits) { Self(atomics.checked_div(factor).unwrap()) // Safe because factor cannot be zero } else { @@ -196,7 +196,7 @@ impl Decimal256 { /// See also [`Decimal256::atomics()`]. #[inline] pub const fn decimal_places(&self) -> u32 { - Self::DECIMAL_PLACES as u32 + Self::DECIMAL_PLACES } /// Rounds value down after decimal places. @@ -326,12 +326,10 @@ impl Decimal256 { /// Precision *must* be a number between 0 and 9 (inclusive). /// /// Returns `None` if the internal multiplication overflows. - fn sqrt_with_precision(&self, precision: usize) -> Option { - let precision = precision as u32; - + fn sqrt_with_precision(&self, precision: u32) -> Option { let inner_mul = Uint256::from(100u128).pow(precision); self.0.checked_mul(inner_mul).ok().map(|inner| { - let outer_mul = Uint256::from(10u128).pow(Self::DECIMAL_PLACES as u32 / 2 - precision); + let outer_mul = Uint256::from(10u128).pow(Self::DECIMAL_PLACES / 2 - precision); Self(inner.isqrt().checked_mul(outer_mul).unwrap()) }) } @@ -431,15 +429,20 @@ impl FromStr for Decimal256 { let fractional = fractional_part .parse::() .map_err(|_| StdError::generic_err("Error parsing fractional"))?; - let exp = - (Self::DECIMAL_PLACES.checked_sub(fractional_part.len())).ok_or_else(|| { - StdError::generic_err(format!( - "Cannot parse more than {} fractional digits", - Self::DECIMAL_PLACES - )) - })?; + let exp = (Self::DECIMAL_PLACES.checked_sub( + fractional_part + .len() + .try_into() + .map_err(|_| StdError::generic_err("fractional too long"))?, + )) + .ok_or_else(|| { + StdError::generic_err(format!( + "Cannot parse more than {} fractional digits", + Self::DECIMAL_PLACES + )) + })?; debug_assert!(exp <= Self::DECIMAL_PLACES); - let fractional_factor = Uint256::from(10u128).pow(exp as u32); + let fractional_factor = Uint256::from(10u128).pow(exp); atomics = atomics .checked_add( // The inner multiplication can't overflow because @@ -465,8 +468,11 @@ impl fmt::Display for Decimal256 { if fractional.is_zero() { write!(f, "{}", whole) } else { - let fractional_string = - format!("{:0>padding$}", fractional, padding = Self::DECIMAL_PLACES); + let fractional_string = format!( + "{:0>padding$}", + fractional, + padding = Self::DECIMAL_PLACES as usize + ); f.write_str(&whole.to_string())?; f.write_char('.')?; f.write_str(fractional_string.trim_end_matches('0'))?; From 416857f68adaa890d84a77559d49efcab9b3048a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 18:20:10 +0200 Subject: [PATCH 129/344] CHANGELOG update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 174b973fe..42f5bfee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to - cosmwasm-vm/cosmwasm-profiler: Upgrade Wasmer to 2.3.0. - cosmwasm-std: Enable the `abort` feature by default. This provides more helpful panic messages via a custom panic handler. +- cosmwasm-std: Make `Decimal{,256}::DECIMAL_PLACES` a public `u32` value. ## [1.0.0] - 2022-05-14 From ea6ec3051b2d10f65875c03ff01f3a50134013f2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 13 Jul 2022 20:06:40 +0200 Subject: [PATCH 130/344] std: docs for Decimal::DECIMAL_PLACES --- packages/std/src/math/decimal.rs | 25 ++++++++++++------------- packages/std/src/math/decimal256.rs | 25 ++++++++++++------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index b8cf086bf..163271bed 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -30,8 +30,11 @@ impl Decimal { const DECIMAL_FRACTIONAL: Uint128 = Uint128::new(1_000_000_000_000_000_000u128); // 1*10**18 const DECIMAL_FRACTIONAL_SQUARED: Uint128 = Uint128::new(1_000_000_000_000_000_000_000_000_000_000_000_000u128); // (1*10**18)**2 = 1*10**36 - pub const DECIMAL_PLACES: u32 = 18; // This needs to be an even number. + /// The number of decimal places. Since decimal types are fixed-point rather than + /// floating-point, this is a constant. + pub const DECIMAL_PLACES: u32 = 18; // This needs to be an even number. + /// The largest value that can be represented by this decimal type. pub const MAX: Self = Self(Uint128::MAX); /// Creates a Decimal(value) @@ -404,18 +407,14 @@ impl FromStr for Decimal { let fractional = fractional_part .parse::() .map_err(|_| StdError::generic_err("Error parsing fractional"))?; - let exp = (Self::DECIMAL_PLACES.checked_sub( - fractional_part - .len() - .try_into() - .map_err(|_| StdError::generic_err("fractional too long"))?, - )) - .ok_or_else(|| { - StdError::generic_err(format!( - "Cannot parse more than {} fractional digits", - Self::DECIMAL_PLACES - )) - })?; + let exp = (Self::DECIMAL_PLACES.checked_sub(fractional_part.len() as u32)).ok_or_else( + || { + StdError::generic_err(format!( + "Cannot parse more than {} fractional digits", + Self::DECIMAL_PLACES + )) + }, + )?; debug_assert!(exp <= Self::DECIMAL_PLACES); let fractional_factor = Uint128::from(10u128.pow(exp)); atomics = atomics diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index c53397a79..cd7aaa62b 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -40,8 +40,11 @@ impl Decimal256 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 151, 206, 123, 201, 7, 21, 179, 75, 159, 16, 0, 0, 0, 0, ]); - pub const DECIMAL_PLACES: u32 = 18; + /// The number of decimal places. Since decimal types are fixed-point rather than + /// floating-point, this is a constant. + pub const DECIMAL_PLACES: u32 = 18; + /// The largest value that can be represented by this decimal type. pub const MAX: Self = Self(Uint256::MAX); /// Creates a Decimal256 from Uint256 @@ -429,18 +432,14 @@ impl FromStr for Decimal256 { let fractional = fractional_part .parse::() .map_err(|_| StdError::generic_err("Error parsing fractional"))?; - let exp = (Self::DECIMAL_PLACES.checked_sub( - fractional_part - .len() - .try_into() - .map_err(|_| StdError::generic_err("fractional too long"))?, - )) - .ok_or_else(|| { - StdError::generic_err(format!( - "Cannot parse more than {} fractional digits", - Self::DECIMAL_PLACES - )) - })?; + let exp = (Self::DECIMAL_PLACES.checked_sub(fractional_part.len() as u32)).ok_or_else( + || { + StdError::generic_err(format!( + "Cannot parse more than {} fractional digits", + Self::DECIMAL_PLACES + )) + }, + )?; debug_assert!(exp <= Self::DECIMAL_PLACES); let fractional_factor = Uint256::from(10u128).pow(exp); atomics = atomics From c1e0b78f1c277593a43ad558fc4a87e6c7c2e0db Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:29:19 +0100 Subject: [PATCH 131/344] add unit test for bank query helpers --- Cargo.lock | 196 ++++++++++++++++++++++++++- Cargo.toml | 4 +- contracts/bank-query/Cargo.toml | 17 +++ contracts/bank-query/src/contract.rs | 48 +++++++ contracts/bank-query/src/lib.rs | 2 + contracts/bank-query/src/msg.rs | 17 +++ packages/std/src/traits.rs | 20 ++- 7 files changed, 297 insertions(+), 7 deletions(-) create mode 100644 contracts/bank-query/Cargo.toml create mode 100644 contracts/bank-query/src/contract.rs create mode 100644 contracts/bank-query/src/lib.rs create mode 100644 contracts/bank-query/src/msg.rs diff --git a/Cargo.lock b/Cargo.lock index ef3d6b129..2d356f8c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,6 +87,15 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bank-query" +version = "0.0.0" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -128,9 +137,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ + "block-padding", "generic-array", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "bstr" version = "0.2.17" @@ -149,6 +165,17 @@ version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +[[package]] +name = "burner" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-vm", + "schemars", + "serde", +] + [[package]] name = "bytecheck" version = "0.6.8" @@ -176,6 +203,12 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + [[package]] name = "cast" version = "0.2.7" @@ -545,6 +578,23 @@ dependencies = [ "subtle", ] +[[package]] +name = "crypto-verify" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "hex", + "hex-literal", + "rlp", + "schemars", + "serde", + "sha2", + "sha3", +] + [[package]] name = "csv" version = "1.1.6" @@ -632,6 +682,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "dyn-clone" version = "1.0.5" @@ -787,6 +843,20 @@ dependencies = [ "subtle", ] +[[package]] +name = "floaty" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "schemars", + "serde", + "sha2", + "thiserror", +] + [[package]] name = "fnv" version = "1.0.7" @@ -865,6 +935,8 @@ version = "0.0.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", "rust-argon2", "schemars", "serde", @@ -936,6 +1008,30 @@ dependencies = [ "digest", ] +[[package]] +name = "ibc-reflect" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "schemars", + "serde", +] + +[[package]] +name = "ibc-reflect-send" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "schemars", + "serde", +] + [[package]] name = "id-arena" version = "2.2.1" @@ -1011,6 +1107,12 @@ dependencies = [ "sha2", ] +[[package]] +name = "keccak" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" + [[package]] name = "lazy_static" version = "1.4.0" @@ -1286,6 +1388,17 @@ dependencies = [ "syn", ] +[[package]] +name = "queue" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-vm", + "schemars", + "serde", +] + [[package]] name = "quote" version = "1.0.18" @@ -1367,6 +1480,19 @@ dependencies = [ "bitflags", ] +[[package]] +name = "reflect" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "regalloc" version = "0.0.31" @@ -1465,6 +1591,16 @@ dependencies = [ "syn", ] +[[package]] +name = "rlp" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rust-argon2" version = "0.8.3" @@ -1489,6 +1625,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + [[package]] name = "rustc_version" version = "0.4.0" @@ -1576,9 +1718,9 @@ checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" dependencies = [ "serde_derive", ] @@ -1613,9 +1755,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" dependencies = [ "proc-macro2", "quote", @@ -1657,6 +1799,18 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer", + "digest", + "keccak", + "opaque-debug", +] + [[package]] name = "signature" version = "1.4.0" @@ -1673,6 +1827,27 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +[[package]] +name = "snafu" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +dependencies = [ + "doc-comment", + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "spki" version = "0.5.4" @@ -1689,6 +1864,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "staking" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "schemars", + "serde", + "snafu", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 50b55c542..4fe03c247 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = ["packages/*"] -exclude = ["contracts"] +members = ["packages/*", "contracts/*"] +# exclude = ["contracts"] diff --git a/contracts/bank-query/Cargo.toml b/contracts/bank-query/Cargo.toml new file mode 100644 index 000000000..fdad06119 --- /dev/null +++ b/contracts/bank-query/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "bank-query" +version = "0.0.0" +authors = ["larry "] +edition = "2021" +publish = false +license = "Apache-2.0" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } +schemars = "0.8.1" +serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/bank-query/src/contract.rs b/contracts/bank-query/src/contract.rs new file mode 100644 index 000000000..f4d350f1e --- /dev/null +++ b/contracts/bank-query/src/contract.rs @@ -0,0 +1,48 @@ +use cosmwasm_std::{ + entry_point, to_binary, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Deps, DepsMut, + Empty, Env, MessageInfo, QueryRequest, Response, StdError, StdResult, SupplyResponse, +}; + +use crate::msg::QueryMsg; + +#[entry_point] +pub fn instantiate( + _deps: DepsMut, + _env: Env, + _info: MessageInfo, + _msg: Empty, +) -> StdResult { + Ok(Response::new()) +} + +#[entry_point] +pub fn execute(_deps: DepsMut, _env: Env, _info: MessageInfo, _msg: Empty) -> StdResult { + Err(StdError::generic_err("unimplemented")) +} + +#[entry_point] +pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { + match msg { + QueryMsg::Supply { denom } => { + let res: SupplyResponse = deps + .querier + .query(&QueryRequest::Bank(BankQuery::Supply { denom }))?; + + to_binary(&res) + } + QueryMsg::Balance { address, denom } => { + let res: BalanceResponse = deps + .querier + .query(&QueryRequest::Bank(BankQuery::Balance { address, denom }))?; + + to_binary(&res) + } + QueryMsg::AllBalances { address } => { + let res: AllBalanceResponse = deps + .querier + .query(&QueryRequest::Bank(BankQuery::AllBalances { address }))?; + + to_binary(&res) + } + } +} diff --git a/contracts/bank-query/src/lib.rs b/contracts/bank-query/src/lib.rs new file mode 100644 index 000000000..112ecadc8 --- /dev/null +++ b/contracts/bank-query/src/lib.rs @@ -0,0 +1,2 @@ +pub mod contract; +pub mod msg; diff --git a/contracts/bank-query/src/msg.rs b/contracts/bank-query/src/msg.rs new file mode 100644 index 000000000..3c8e05a0d --- /dev/null +++ b/contracts/bank-query/src/msg.rs @@ -0,0 +1,17 @@ +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsg { + Supply { + denom: String + }, + Balance { + address: String, + denom: String, + }, + AllBalances { + address: String, + }, +} diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index e87fc2ef6..a87068354 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -342,7 +342,7 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { mod tests { use super::*; use crate::mock::MockQuerier; - use crate::{coins, from_slice, Uint128}; + use crate::{coin, coins, from_slice, Uint128}; // this is a simple demo helper to prove we can use it fn demo_helper(_querier: &dyn Querier) -> u64 { @@ -381,4 +381,22 @@ mod tests { let balance: BalanceResponse = from_slice(&raw).unwrap(); assert_eq!(balance.amount.amount, Uint128::new(5)); } + + #[test] + fn bank_query_helpers_work() { + let querier: MockQuerier = MockQuerier::new(&[ + ("foo", &[coin(123, "ELF"), coin(777, "FLY")]), + ("bar", &[coin(321, "ELF")]), + ]); + let wrapper = QuerierWrapper::::new(&querier); + + let supply = wrapper.query_supply("ELF").unwrap(); + assert_eq!(supply, coin(444, "ELF")); + + let balance = wrapper.query_balance("foo", "ELF").unwrap(); + assert_eq!(balance, coin(123, "ELF")); + + let all_balances = wrapper.query_all_balances("foo").unwrap(); + assert_eq!(all_balances, vec![coin(123, "ELF"), coin(777, "FLY")]); + } } From 02933970674d8abc3cd7835a4469c52d07457e10 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:31:14 +0100 Subject: [PATCH 132/344] add an entry to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c570d7c..32921e40a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ and this project adheres to - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply of + a native token [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From ecb68ea07dce7340819f79ba2bb16fb8fd6e43e5 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:31:59 +0100 Subject: [PATCH 133/344] Update packages/std/src/query/bank.rs Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- packages/std/src/query/bank.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 031557124..07ab9b8d7 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -7,8 +7,9 @@ use crate::Coin; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum BankQuery { - /// This calls into the native bank module for querying the total supply on one denomination. - /// Return value is SupplyResponse + /// This calls into the native bank module for querying the total supply of one denomination. + /// It does the same as the SupplyOf call in Cosmos SDK's RPC API. + /// Return value is of type SupplyResponse. Supply { denom: String }, /// This calls into the native bank module for one denomination /// Return value is BalanceResponse From 11cd9a56ca723be78858dac2b65c420e1c1e6a13 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:35:04 +0100 Subject: [PATCH 134/344] clarify in comment the case if a denom doesn not exist --- packages/std/src/query/bank.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 07ab9b8d7..bb612ceb2 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -24,7 +24,7 @@ pub enum BankQuery { #[serde(rename_all = "snake_case")] pub struct SupplyResponse { /// Always returns a Coin with the requested denom. - /// This may be of 0 amount if no such funds. + /// This will be of zero amount if the denom does not exist. pub amount: Coin, } From 7d4785345657160b634590ffd18004176215c13b Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:37:33 +0100 Subject: [PATCH 135/344] add a unit test for querying the supply of a non-existing denom --- packages/std/src/mock.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/std/src/mock.rs b/packages/std/src/mock.rs index 0ab1235c4..c9c8ff695 100644 --- a/packages/std/src/mock.rs +++ b/packages/std/src/mock.rs @@ -1113,6 +1113,16 @@ mod tests { .unwrap(); let res: SupplyResponse = from_binary(&fly).unwrap(); assert_eq!(res.amount, coin(777, "FLY")); + + // if a denom does not exist, should return zero amount, instead of throwing an error + let atom = bank + .query(&BankQuery::Supply { + denom: "ATOM".to_string(), + }) + .unwrap() + .unwrap(); + let res: SupplyResponse = from_binary(&atom).unwrap(); + assert_eq!(res.amount, coin(0, "ATOM")); } #[test] From d97d68b6f6ef846f8c88ec4ee1dede8174880af3 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:40:36 +0100 Subject: [PATCH 136/344] revert changes made to `Cargo.toml` (not supposed to be pushed) --- Cargo.lock | 188 ----------------------------------------------------- Cargo.toml | 4 +- 2 files changed, 2 insertions(+), 190 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d356f8c9..6d6316fa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,15 +87,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "bank-query" -version = "0.0.0" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - [[package]] name = "base16ct" version = "0.1.1" @@ -137,16 +128,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "bstr" version = "0.2.17" @@ -165,17 +149,6 @@ version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" -[[package]] -name = "burner" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-vm", - "schemars", - "serde", -] - [[package]] name = "bytecheck" version = "0.6.8" @@ -203,12 +176,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - [[package]] name = "cast" version = "0.2.7" @@ -578,23 +545,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-verify" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "hex", - "hex-literal", - "rlp", - "schemars", - "serde", - "sha2", - "sha3", -] - [[package]] name = "csv" version = "1.1.6" @@ -682,12 +632,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "dyn-clone" version = "1.0.5" @@ -843,20 +787,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "floaty" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "schemars", - "serde", - "sha2", - "thiserror", -] - [[package]] name = "fnv" version = "1.0.7" @@ -935,8 +865,6 @@ version = "0.0.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", "rust-argon2", "schemars", "serde", @@ -1008,30 +936,6 @@ dependencies = [ "digest", ] -[[package]] -name = "ibc-reflect" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "schemars", - "serde", -] - -[[package]] -name = "ibc-reflect-send" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "schemars", - "serde", -] - [[package]] name = "id-arena" version = "2.2.1" @@ -1107,12 +1011,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "keccak" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1388,17 +1286,6 @@ dependencies = [ "syn", ] -[[package]] -name = "queue" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-vm", - "schemars", - "serde", -] - [[package]] name = "quote" version = "1.0.18" @@ -1480,19 +1367,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "reflect" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "regalloc" version = "0.0.31" @@ -1591,16 +1465,6 @@ dependencies = [ "syn", ] -[[package]] -name = "rlp" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" -dependencies = [ - "bytes", - "rustc-hex", -] - [[package]] name = "rust-argon2" version = "0.8.3" @@ -1625,12 +1489,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - [[package]] name = "rustc_version" version = "0.4.0" @@ -1799,18 +1657,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer", - "digest", - "keccak", - "opaque-debug", -] - [[package]] name = "signature" version = "1.4.0" @@ -1827,27 +1673,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "snafu" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" -dependencies = [ - "doc-comment", - "snafu-derive", -] - -[[package]] -name = "snafu-derive" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "spki" version = "0.5.4" @@ -1864,19 +1689,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "staking" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "schemars", - "serde", - "snafu", -] - [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 4fe03c247..50b55c542 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = ["packages/*", "contracts/*"] -# exclude = ["contracts"] +members = ["packages/*"] +exclude = ["contracts"] From f15a25f72ba6a18364e254ddf09e0800834418f5 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:43:12 +0100 Subject: [PATCH 137/344] remove a contract unintentionally pushed (only used for local testing) --- contracts/bank-query/Cargo.toml | 17 ---------- contracts/bank-query/src/contract.rs | 48 ---------------------------- contracts/bank-query/src/lib.rs | 2 -- contracts/bank-query/src/msg.rs | 17 ---------- 4 files changed, 84 deletions(-) delete mode 100644 contracts/bank-query/Cargo.toml delete mode 100644 contracts/bank-query/src/contract.rs delete mode 100644 contracts/bank-query/src/lib.rs delete mode 100644 contracts/bank-query/src/msg.rs diff --git a/contracts/bank-query/Cargo.toml b/contracts/bank-query/Cargo.toml deleted file mode 100644 index fdad06119..000000000 --- a/contracts/bank-query/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "bank-query" -version = "0.0.0" -authors = ["larry "] -edition = "2021" -publish = false -license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -crate-type = ["cdylib", "rlib"] - -[dependencies] -cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } -schemars = "0.8.1" -serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/bank-query/src/contract.rs b/contracts/bank-query/src/contract.rs deleted file mode 100644 index f4d350f1e..000000000 --- a/contracts/bank-query/src/contract.rs +++ /dev/null @@ -1,48 +0,0 @@ -use cosmwasm_std::{ - entry_point, to_binary, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Deps, DepsMut, - Empty, Env, MessageInfo, QueryRequest, Response, StdError, StdResult, SupplyResponse, -}; - -use crate::msg::QueryMsg; - -#[entry_point] -pub fn instantiate( - _deps: DepsMut, - _env: Env, - _info: MessageInfo, - _msg: Empty, -) -> StdResult { - Ok(Response::new()) -} - -#[entry_point] -pub fn execute(_deps: DepsMut, _env: Env, _info: MessageInfo, _msg: Empty) -> StdResult { - Err(StdError::generic_err("unimplemented")) -} - -#[entry_point] -pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { - match msg { - QueryMsg::Supply { denom } => { - let res: SupplyResponse = deps - .querier - .query(&QueryRequest::Bank(BankQuery::Supply { denom }))?; - - to_binary(&res) - } - QueryMsg::Balance { address, denom } => { - let res: BalanceResponse = deps - .querier - .query(&QueryRequest::Bank(BankQuery::Balance { address, denom }))?; - - to_binary(&res) - } - QueryMsg::AllBalances { address } => { - let res: AllBalanceResponse = deps - .querier - .query(&QueryRequest::Bank(BankQuery::AllBalances { address }))?; - - to_binary(&res) - } - } -} diff --git a/contracts/bank-query/src/lib.rs b/contracts/bank-query/src/lib.rs deleted file mode 100644 index 112ecadc8..000000000 --- a/contracts/bank-query/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod contract; -pub mod msg; diff --git a/contracts/bank-query/src/msg.rs b/contracts/bank-query/src/msg.rs deleted file mode 100644 index 3c8e05a0d..000000000 --- a/contracts/bank-query/src/msg.rs +++ /dev/null @@ -1,17 +0,0 @@ -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum QueryMsg { - Supply { - denom: String - }, - Balance { - address: String, - denom: String, - }, - AllBalances { - address: String, - }, -} From 21e505c65d2127eac8826fcbbdad2662b2661dc0 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:45:49 +0100 Subject: [PATCH 138/344] format changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32921e40a..500c206bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ and this project adheres to - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. -- cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply of - a native token +- cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply + of a native token [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From 032c34cfd9741751e30b141163e14a7eb2f0c8c6 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:48:57 +0100 Subject: [PATCH 139/344] revert unintential changes made to `Cargo.toml` --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d6316fa4..ef3d6b129 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1576,9 +1576,9 @@ checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" [[package]] name = "serde" -version = "1.0.103" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] @@ -1613,9 +1613,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", From 2aeca6074f149d721a769779728c6f8578122036 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 00:58:59 +0100 Subject: [PATCH 140/344] update schema --- contracts/reflect/schema/query_msg.json | 2 +- packages/std/schema/query_request.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/reflect/schema/query_msg.json b/contracts/reflect/schema/query_msg.json index 63eb7d405..d542b568c 100644 --- a/contracts/reflect/schema/query_msg.json +++ b/contracts/reflect/schema/query_msg.json @@ -109,7 +109,7 @@ "BankQuery": { "oneOf": [ { - "description": "This calls into the native bank module for querying the total supply on one denomination. Return value is SupplyResponse", + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", "type": "object", "required": [ "supply" diff --git a/packages/std/schema/query_request.json b/packages/std/schema/query_request.json index c1500291b..fd674b44c 100644 --- a/packages/std/schema/query_request.json +++ b/packages/std/schema/query_request.json @@ -43,7 +43,7 @@ "BankQuery": { "oneOf": [ { - "description": "This calls into the native bank module for querying the total supply on one denomination. Return value is SupplyResponse", + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", "type": "object", "required": [ "supply" From 6f125e415dc36026e377f0372ba96cd94e62afa1 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Thu, 14 Jul 2022 01:31:09 +0100 Subject: [PATCH 141/344] updat schema --- contracts/reflect/schema/reflect.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index a2b6c8ebd..6ade7f08c 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -976,6 +976,27 @@ "definitions": { "BankQuery": { "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", "type": "object", From abe4a4f865c2a6302f4206bb9110d0a2039a5d1f Mon Sep 17 00:00:00 2001 From: Simon Warta <2603011+webmaster128@users.noreply.github.com> Date: Thu, 14 Jul 2022 08:54:14 +0200 Subject: [PATCH 142/344] Update packages/std/src/query/bank.rs --- packages/std/src/query/bank.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index bb612ceb2..7008f97df 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -22,6 +22,7 @@ pub enum BankQuery { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] +#[non_exhaustive] pub struct SupplyResponse { /// Always returns a Coin with the requested denom. /// This will be of zero amount if the denom does not exist. From dd24f20d8a0a1907e2c0015c926211d33d1fbb91 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Thu, 14 Jul 2022 09:07:43 +0200 Subject: [PATCH 143/344] Uint/Decimal: Implement const MIN --- CHANGELOG.md | 1 + packages/std/src/math/decimal.rs | 2 ++ packages/std/src/math/decimal256.rs | 2 ++ packages/std/src/math/uint128.rs | 1 + packages/std/src/math/uint256.rs | 1 + packages/std/src/math/uint512.rs | 1 + packages/std/src/math/uint64.rs | 1 + 7 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f5bfee3..27ec8119e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to - cosmwasm-std: Implement `ceil`/`floor` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. +- cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 163271bed..a97bf29ea 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -36,6 +36,8 @@ impl Decimal { pub const DECIMAL_PLACES: u32 = 18; // This needs to be an even number. /// The largest value that can be represented by this decimal type. pub const MAX: Self = Self(Uint128::MAX); + /// The smallest value that can be represented by this decimal type. + pub const MIN: Self = Self(Uint128::MIN); /// Creates a Decimal(value) /// This is equivalent to `Decimal::from_atomics(value, 18)` but usable in a const context. diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index cd7aaa62b..eed988c18 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -46,6 +46,8 @@ impl Decimal256 { pub const DECIMAL_PLACES: u32 = 18; /// The largest value that can be represented by this decimal type. pub const MAX: Self = Self(Uint256::MAX); + /// The smallest value that can be represented by this decimal type. + pub const MIN: Self = Self(Uint256::MIN); /// Creates a Decimal256 from Uint256 /// This is equivalent to `Decimal256::from_atomics(value, 18)` but usable in a const context. diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index fddd98bbd..150166810 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -36,6 +36,7 @@ pub struct Uint128(#[schemars(with = "String")] u128); impl Uint128 { pub const MAX: Self = Self(u128::MAX); + pub const MIN: Self = Self(u128::MIN); /// Creates a Uint128(value). /// diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 1e4349d16..e1c14ac94 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -52,6 +52,7 @@ pub struct Uint256(#[schemars(with = "String")] U256); impl Uint256 { pub const MAX: Uint256 = Uint256(U256::MAX); + pub const MIN: Uint256 = Uint256(U256::zero()); /// Creates a Uint256(value) from a big endian representation. It's just an alias for /// [`Uint256::from_be_bytes`]. diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 18c6ce527..2a66189b4 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -54,6 +54,7 @@ pub struct Uint512(#[schemars(with = "String")] U512); impl Uint512 { pub const MAX: Uint512 = Uint512(U512::MAX); + pub const MIN: Uint512 = Uint512(U512::zero()); /// Creates a Uint512(value) from a big endian representation. It's just an alias for /// `from_big_endian`. diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 7267552a7..3b1df29d1 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -32,6 +32,7 @@ pub struct Uint64(#[schemars(with = "String")] u64); impl Uint64 { pub const MAX: Self = Self(u64::MAX); + pub const MIN: Self = Self(u64::MIN); /// Creates a Uint64(value). /// From 3175271a67ade708a576026ac041518433a9ee1b Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Wed, 13 Jul 2022 18:38:30 +0200 Subject: [PATCH 144/344] Decimal/256: Implement checked_div_euclid --- packages/std/src/math/decimal.rs | 25 +++++++++++++++++++++++-- packages/std/src/math/decimal256.rs | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index a97bf29ea..d3e445aca 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -289,6 +289,10 @@ impl Decimal { Decimal::checked_from_ratio(self.numerator(), other.numerator()) } + pub fn checked_div_euclid(self, other: Self) -> Result { + Ok(self.checked_div(other)?.floor()) + } + pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -1880,12 +1884,29 @@ mod tests { ); assert!(matches!( Decimal::MAX.checked_div(Decimal::zero()), - Err(CheckedFromRatioError::DivideByZero { .. }) + Err(CheckedFromRatioError::DivideByZero { }) )); assert!(matches!( Decimal::MAX.checked_div(Decimal::percent(1)), - Err(CheckedFromRatioError::Overflow { .. }) + Err(CheckedFromRatioError::Overflow { }) + )); + + assert!(matches!( + Decimal::MAX.checked_div_euclid(Decimal::zero()), + Err(CheckedFromRatioError::DivideByZero {}) + )); + assert!(matches!( + Decimal::MAX.checked_div_euclid(Decimal::percent(1)), + Err(CheckedFromRatioError::Overflow {}) )); + assert_eq!( + Decimal::percent(600).checked_div_euclid(Decimal::percent(200)).unwrap(), + Decimal::percent(300), + ); + assert_eq!( + Decimal::percent(1500).checked_div_euclid(Decimal::percent(700)).unwrap(), + Decimal::percent(200), + ); // checked rem assert_eq!( diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index eed988c18..1417910f9 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -302,6 +302,10 @@ impl Decimal256 { Decimal256::checked_from_ratio(self.numerator(), other.numerator()) } + pub fn checked_div_euclid(self, other: Self) -> Result { + Ok(self.checked_div(other)?.floor()) + } + pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -2034,6 +2038,23 @@ mod tests { Err(CheckedFromRatioError::Overflow { .. }) )); + assert!(matches!( + Decimal256::MAX.checked_div_euclid(Decimal256::zero()), + Err(CheckedFromRatioError::DivideByZero {}) + )); + assert!(matches!( + Decimal256::MAX.checked_div_euclid(Decimal256::percent(1)), + Err(CheckedFromRatioError::Overflow {}) + )); + assert_eq!( + Decimal256::percent(600).checked_div_euclid(Decimal256::percent(200)).unwrap(), + Decimal256::percent(300), + ); + assert_eq!( + Decimal256::percent(1500).checked_div_euclid(Decimal256::percent(700)).unwrap(), + Decimal256::percent(200), + ); + // checked rem assert_eq!( Decimal256::percent(402) From a4c4aaae09b8268445b40b6006d201036a035f34 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Wed, 13 Jul 2022 18:43:28 +0200 Subject: [PATCH 145/344] Decimal/256: Implement checked_div_euclid --- packages/std/src/math/decimal.rs | 16 ++++++++++------ packages/std/src/math/decimal256.rs | 10 +++++++--- packages/std/src/math/uint256.rs | 17 +++++++++++++++++ packages/std/src/math/uint512.rs | 26 ++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 9 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index d3e445aca..74a3cc35e 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1884,27 +1884,31 @@ mod tests { ); assert!(matches!( Decimal::MAX.checked_div(Decimal::zero()), - Err(CheckedFromRatioError::DivideByZero { }) + Err(CheckedFromRatioError::DivideByZero {}) )); assert!(matches!( Decimal::MAX.checked_div(Decimal::percent(1)), - Err(CheckedFromRatioError::Overflow { }) + Err(CheckedFromRatioError::Overflow {}) )); - assert!(matches!( + assert!(matches!( Decimal::MAX.checked_div_euclid(Decimal::zero()), Err(CheckedFromRatioError::DivideByZero {}) )); - assert!(matches!( + assert!(matches!( Decimal::MAX.checked_div_euclid(Decimal::percent(1)), Err(CheckedFromRatioError::Overflow {}) )); assert_eq!( - Decimal::percent(600).checked_div_euclid(Decimal::percent(200)).unwrap(), + Decimal::percent(600) + .checked_div_euclid(Decimal::percent(200)) + .unwrap(), Decimal::percent(300), ); assert_eq!( - Decimal::percent(1500).checked_div_euclid(Decimal::percent(700)).unwrap(), + Decimal::percent(1500) + .checked_div_euclid(Decimal::percent(700)) + .unwrap(), Decimal::percent(200), ); diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 1417910f9..e49b96495 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -2042,16 +2042,20 @@ mod tests { Decimal256::MAX.checked_div_euclid(Decimal256::zero()), Err(CheckedFromRatioError::DivideByZero {}) )); - assert!(matches!( + assert!(matches!( Decimal256::MAX.checked_div_euclid(Decimal256::percent(1)), Err(CheckedFromRatioError::Overflow {}) )); assert_eq!( - Decimal256::percent(600).checked_div_euclid(Decimal256::percent(200)).unwrap(), + Decimal256::percent(600) + .checked_div_euclid(Decimal256::percent(200)) + .unwrap(), Decimal256::percent(300), ); assert_eq!( - Decimal256::percent(1500).checked_div_euclid(Decimal256::percent(700)).unwrap(), + Decimal256::percent(1500) + .checked_div_euclid(Decimal256::percent(700)) + .unwrap(), Decimal256::percent(200), ); diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index e1c14ac94..6847039ad 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -251,6 +251,10 @@ impl Uint256 { .ok_or_else(|| DivideByZeroError::new(self)) } + pub fn checked_div_euclid(self, other: Self) -> Result { + self.checked_div(other) + } + pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -1461,6 +1465,19 @@ mod tests { Err(DivideByZeroError { .. }) )); + assert!(matches!( + Uint256::MAX.checked_div_euclid(Uint256::from(0u32)), + Err(DivideByZeroError { .. }) + )); + assert_eq!( + Uint256::from(6u32).checked_div_euclid(Uint256::from(2u32)), + Ok(Uint256::from(3u32)), + ); + assert_eq!( + Uint256::from(7u32).checked_div_euclid(Uint256::from(2u32)), + Ok(Uint256::from(3u32)), + ); + // saturating_* assert_eq!( Uint256::MAX.saturating_add(Uint256::from(1u32)), diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 2a66189b4..ec8a160b5 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -234,6 +234,10 @@ impl Uint512 { .ok_or_else(|| DivideByZeroError::new(self)) } + pub fn checked_div_euclid(self, other: Self) -> Result { + self.checked_div(other) + } + pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -1091,6 +1095,28 @@ mod tests { Uint512::from(6u32).checked_div(Uint512::from(2u32)), Ok(Uint512::from(3u32)), ); + assert!(matches!( + Uint512::MAX.checked_div(Uint512::from(0u32)), + Err(DivideByZeroError { .. }) + )); + assert_eq!( + Uint512::from(6u32).checked_div(Uint512::from(2u32)), + Ok(Uint512::from(3u32)), + ); + + assert!(matches!( + Uint512::MAX.checked_div_euclid(Uint512::from(0u32)), + Err(DivideByZeroError { .. }) + )); + assert_eq!( + Uint512::from(6u32).checked_div_euclid(Uint512::from(2u32)), + Ok(Uint512::from(3u32)), + ); + assert_eq!( + Uint512::from(7u32).checked_div_euclid(Uint512::from(2u32)), + Ok(Uint512::from(3u32)), + ); + assert!(matches!( Uint512::MAX.checked_rem(Uint512::from(0u32)), Err(DivideByZeroError { .. }) From 1b8352bda14c032af1d824c51171cf36853367e9 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Thu, 14 Jul 2022 08:32:11 +0200 Subject: [PATCH 146/344] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27ec8119e..9a05d8a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ and this project adheres to - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types +- cosmwasm-std: Implement `checked_div_euclid` for + `Uint256`/`Uint512`/`Decimal`/`Decimal256` [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 From 7ebbe29c7bde7f88fbdb17d05c2656a1239e5a7e Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Thu, 14 Jul 2022 08:41:25 +0200 Subject: [PATCH 147/344] Decimal: Remove unnecessarily added testcases --- packages/std/src/math/decimal.rs | 1 + packages/std/src/math/decimal256.rs | 1 + packages/std/src/math/uint256.rs | 9 ++++----- packages/std/src/math/uint512.rs | 10 ---------- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 74a3cc35e..ea0639506 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1891,6 +1891,7 @@ mod tests { Err(CheckedFromRatioError::Overflow {}) )); + // checked div euclid assert!(matches!( Decimal::MAX.checked_div_euclid(Decimal::zero()), Err(CheckedFromRatioError::DivideByZero {}) diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index e49b96495..40f8095dd 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -2038,6 +2038,7 @@ mod tests { Err(CheckedFromRatioError::Overflow { .. }) )); + // checked div euclid assert!(matches!( Decimal256::MAX.checked_div_euclid(Decimal256::zero()), Err(CheckedFromRatioError::DivideByZero {}) diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 6847039ad..3d7883b60 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -1460,11 +1460,6 @@ mod tests { Uint256::from(6u32).checked_div(Uint256::from(2u32)), Ok(Uint256::from(3u32)), ); - assert!(matches!( - Uint256::MAX.checked_rem(Uint256::from(0u32)), - Err(DivideByZeroError { .. }) - )); - assert!(matches!( Uint256::MAX.checked_div_euclid(Uint256::from(0u32)), Err(DivideByZeroError { .. }) @@ -1477,6 +1472,10 @@ mod tests { Uint256::from(7u32).checked_div_euclid(Uint256::from(2u32)), Ok(Uint256::from(3u32)), ); + assert!(matches!( + Uint256::MAX.checked_rem(Uint256::from(0u32)), + Err(DivideByZeroError { .. }) + )); // saturating_* assert_eq!( diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index ec8a160b5..e53bad95d 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -1095,15 +1095,6 @@ mod tests { Uint512::from(6u32).checked_div(Uint512::from(2u32)), Ok(Uint512::from(3u32)), ); - assert!(matches!( - Uint512::MAX.checked_div(Uint512::from(0u32)), - Err(DivideByZeroError { .. }) - )); - assert_eq!( - Uint512::from(6u32).checked_div(Uint512::from(2u32)), - Ok(Uint512::from(3u32)), - ); - assert!(matches!( Uint512::MAX.checked_div_euclid(Uint512::from(0u32)), Err(DivideByZeroError { .. }) @@ -1116,7 +1107,6 @@ mod tests { Uint512::from(7u32).checked_div_euclid(Uint512::from(2u32)), Ok(Uint512::from(3u32)), ); - assert!(matches!( Uint512::MAX.checked_rem(Uint512::from(0u32)), Err(DivideByZeroError { .. }) From 3081ece5fc33e58797a6a51dd1e2ac037853b237 Mon Sep 17 00:00:00 2001 From: Assaf Morami Date: Thu, 21 Jul 2022 08:42:58 +0300 Subject: [PATCH 148/344] `s/handle/execute/` in `entry_point!` docs --- packages/derive/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/derive/src/lib.rs b/packages/derive/src/lib.rs index 30afb13f6..29c43fa3e 100644 --- a/packages/derive/src/lib.rs +++ b/packages/derive/src/lib.rs @@ -30,7 +30,7 @@ use std::str::FromStr; /// } /// /// #[entry_point] -/// pub fn handle( +/// pub fn execute( /// deps: DepsMut, /// env: Env, /// info: MessageInfo, From 28aaf3bb627e775781bbb7788ced7c78c0bcd91e Mon Sep 17 00:00:00 2001 From: Hussein Ait-Lahcen Date: Tue, 26 Jul 2022 12:07:37 +0200 Subject: [PATCH 149/344] update README.md The readme `migrate` signature is wrong at it does not accept a `MessageInfo`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95ee1eecf..0d80b3fac 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ functionality: ```rust // in-place contract migrations -extern "C" fn migrate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; +extern "C" fn migrate(env_ptr: u32, msg_ptr: u32) -> u32; // support submessage callbacks extern "C" fn reply(env_ptr: u32, msg_ptr: u32) -> u32; From 8fe4c76d9e293e178a587cf6917784c433e2b04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C8=99u?= Date: Wed, 27 Jul 2022 19:19:13 +0300 Subject: [PATCH 150/344] Bump k256 --- Cargo.lock | 124 ++++++++++++++++--------- packages/crypto/Cargo.toml | 6 +- packages/crypto/src/identity_digest.rs | 14 ++- packages/crypto/src/secp256k1.rs | 4 +- 4 files changed, 92 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f30089db..6635525a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -131,6 +131,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bstr" version = "0.2.17" @@ -230,9 +239,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "constant_time_eq" @@ -259,7 +268,7 @@ version = "1.0.0" dependencies = [ "base64", "criterion", - "digest", + "digest 0.10.3", "ed25519-zebra", "english-numbers", "hex", @@ -268,7 +277,7 @@ dependencies = [ "rand_core 0.6.3", "serde", "serde_json", - "sha2", + "sha2 0.10.2", "thiserror", ] @@ -364,7 +373,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.9", "tempfile", "thiserror", "wasmer", @@ -538,9 +547,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -549,13 +558,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -587,7 +596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -629,11 +638,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -656,6 +666,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.5" @@ -690,9 +711,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -710,7 +731,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.9", "thiserror", "zeroize", ] @@ -723,16 +744,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -803,9 +826,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -868,9 +891,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -886,7 +909,7 @@ dependencies = [ "rust-argon2", "schemars", "serde", - "sha2", + "sha2 0.9.9", "thiserror", ] @@ -946,12 +969,11 @@ checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -1018,15 +1040,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -1208,13 +1229,12 @@ checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1449,9 +1469,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1575,10 +1595,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1668,20 +1689,31 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1693,9 +1725,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 2645aabcd..ec72ef5fc 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -19,9 +19,9 @@ backtraces = [] bench = false [dependencies] -k256 = { version = "0.10.4", features = ["ecdsa"] } +k256 = { version = "0.11", features = ["ecdsa"] } ed25519-zebra = "3" -digest = "0.9" +digest = "0.10" rand_core = { version = "0.6", features = ["getrandom"] } thiserror = "1.0" @@ -29,7 +29,7 @@ thiserror = "1.0" criterion = "0.3" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } serde_json = "1.0" -sha2 = "0.9" +sha2 = "0.10" base64 = "0.13.0" hex = "0.4" hex-literal = "0.3.1" diff --git a/packages/crypto/src/identity_digest.rs b/packages/crypto/src/identity_digest.rs index 5503c45ef..c043f2d76 100644 --- a/packages/crypto/src/identity_digest.rs +++ b/packages/crypto/src/identity_digest.rs @@ -5,7 +5,7 @@ //! Adapted from `sha2` [sha256.rs](https://github.com/RustCrypto/hashes/blob/master/sha2/src/sha256.rs) use digest::consts::U32; use digest::generic_array::GenericArray; -use digest::{FixedOutputDirty, Output, Reset, Update}; +use digest::{FixedOutput, HashMarker, Output, OutputSizeUser, Reset, Update}; /// The 256-bits identity container #[derive(Clone, Default)] @@ -14,20 +14,24 @@ pub struct Identity256 { } impl Update for Identity256 { - fn update(&mut self, hash: impl AsRef<[u8]>) { + fn update(&mut self, hash: &[u8]) { assert_eq!(hash.as_ref().len(), 32); - self.array = *GenericArray::from_slice(hash.as_ref()); + self.array = *GenericArray::from_slice(hash); } } -impl FixedOutputDirty for Identity256 { +impl OutputSizeUser for Identity256 { type OutputSize = U32; +} - fn finalize_into_dirty(&mut self, out: &mut Output) { +impl FixedOutput for Identity256 { + fn finalize_into(self, out: &mut Output) { *out = self.array; } } +impl HashMarker for Identity256 {} + impl Reset for Identity256 { fn reset(&mut self) { *self = Self::default(); diff --git a/packages/crypto/src/secp256k1.rs b/packages/crypto/src/secp256k1.rs index 96009ec04..dda5ce257 100644 --- a/packages/crypto/src/secp256k1.rs +++ b/packages/crypto/src/secp256k1.rs @@ -1,4 +1,4 @@ -use digest::Digest; // trait +use digest::{Digest, Update}; // trait use k256::{ ecdsa::recoverable, ecdsa::signature::{DigestVerifier, Signature as _}, // traits @@ -94,7 +94,7 @@ pub fn secp256k1_recover_pubkey( // Recover let message_digest = Identity256::new().chain(message_hash); let pubkey = extended_signature - .recover_verify_key_from_digest(message_digest) + .recover_verifying_key_from_digest(message_digest) .map_err(|e| CryptoError::generic_err(e.to_string()))?; let encoded: Vec = pubkey.to_encoded_point(false).as_bytes().into(); Ok(encoded) From d8ce794806105b1c703c7141b4dcce6857d7dff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C8=99u?= Date: Thu, 28 Jul 2022 13:16:45 +0300 Subject: [PATCH 151/344] Update contracts lock files --- contracts/burner/Cargo.lock | 139 +++++++++++++++--------- contracts/crypto-verify/Cargo.lock | 145 +++++++++++++++++--------- contracts/floaty/Cargo.lock | 141 ++++++++++++++++--------- contracts/hackatom/Cargo.lock | 141 ++++++++++++++++--------- contracts/ibc-reflect-send/Cargo.lock | 139 +++++++++++++++--------- contracts/ibc-reflect/Cargo.lock | 139 +++++++++++++++--------- contracts/queue/Cargo.lock | 139 +++++++++++++++--------- contracts/reflect/Cargo.lock | 139 +++++++++++++++--------- contracts/staking/Cargo.lock | 139 +++++++++++++++--------- 9 files changed, 815 insertions(+), 446 deletions(-) diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 62c799eb7..6b5998f88 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -146,9 +155,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -167,7 +176,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -230,7 +239,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -245,6 +254,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -365,9 +383,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -376,13 +394,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -392,7 +410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -435,11 +453,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -462,6 +481,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -496,9 +526,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -516,7 +546,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -529,16 +559,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -594,9 +626,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -665,9 +697,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -709,12 +741,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -751,15 +782,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -926,13 +956,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1129,9 +1158,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1225,10 +1254,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1302,20 +1332,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1327,9 +1368,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1445,9 +1486,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1884,6 +1925,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 4ee1ae41f..33d2d5c9a 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -83,6 +83,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "block-padding" version = "0.2.1" @@ -148,9 +157,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -169,7 +178,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -240,7 +249,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -255,6 +264,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -375,9 +393,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -386,13 +404,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -408,7 +426,7 @@ dependencies = [ "rlp", "schemars", "serde", - "sha2", + "sha2 0.9.5", "sha3", ] @@ -419,7 +437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -462,11 +480,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -489,6 +508,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -523,9 +553,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -543,7 +573,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -556,16 +586,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -621,9 +653,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -692,9 +724,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -742,12 +774,11 @@ checksum = "21e4590e13640f19f249fe3e4eca5113bc4289f2497710378190e7f4bd96f45b" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -784,15 +815,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -965,13 +995,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1168,9 +1197,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1280,10 +1309,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1357,32 +1387,43 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "sha3" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" dependencies = [ - "block-buffer", - "digest", + "block-buffer 0.9.0", + "digest 0.9.0", "keccak", "opaque-debug", ] [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1394,9 +1435,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1512,9 +1553,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1951,6 +1992,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index d50490adf..3ae3ef05b 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -227,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -242,6 +251,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -362,9 +380,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -373,13 +391,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -389,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -432,11 +450,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -459,6 +478,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -493,9 +523,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -513,7 +543,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -526,16 +556,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -591,9 +623,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -609,7 +641,7 @@ dependencies = [ "cosmwasm-vm", "schemars", "serde", - "sha2", + "sha2 0.9.5", "thiserror", ] @@ -676,9 +708,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -720,12 +752,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -762,15 +793,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -937,13 +967,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1140,9 +1169,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1236,10 +1265,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1313,20 +1343,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1338,9 +1379,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1456,9 +1497,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1895,6 +1936,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index eb0b72e94..46fd5b79f 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -105,6 +105,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -158,9 +167,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "constant_time_eq" @@ -185,7 +194,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -256,7 +265,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -271,6 +280,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -391,9 +409,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -402,13 +420,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -418,7 +436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -461,11 +479,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -488,6 +507,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -522,9 +552,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -542,7 +572,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -555,16 +585,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -620,9 +652,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -691,9 +723,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -711,7 +743,7 @@ dependencies = [ "rust-argon2", "schemars", "serde", - "sha2", + "sha2 0.9.5", "thiserror", ] @@ -750,12 +782,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -792,15 +823,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -967,13 +997,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1170,9 +1199,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1278,10 +1307,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1355,20 +1385,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1380,9 +1421,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1498,9 +1539,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1937,6 +1978,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index efd81002f..1c1895313 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -227,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -242,6 +251,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -362,9 +380,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -373,13 +391,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -389,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -432,11 +450,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -459,6 +478,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -493,9 +523,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -513,7 +543,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -526,16 +556,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -591,9 +623,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -662,9 +694,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -706,12 +738,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -760,15 +791,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -935,13 +965,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1138,9 +1167,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1234,10 +1263,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1311,20 +1341,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1336,9 +1377,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1454,9 +1495,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1893,6 +1934,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 37516d10e..2b443d9ca 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -227,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -242,6 +251,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -362,9 +380,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -373,13 +391,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -389,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -432,11 +450,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -459,6 +478,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -493,9 +523,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -513,7 +543,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -526,16 +556,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -591,9 +623,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -662,9 +694,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -706,12 +738,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -760,15 +791,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -935,13 +965,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1138,9 +1167,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1234,10 +1263,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1311,20 +1341,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1336,9 +1377,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1454,9 +1495,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1893,6 +1934,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 0f80ff386..b120dccee 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -219,7 +228,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -234,6 +243,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -354,9 +372,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -365,13 +383,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -381,7 +399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -424,11 +442,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -451,6 +470,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -485,9 +515,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -505,7 +535,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -518,16 +548,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -583,9 +615,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -654,9 +686,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -698,12 +730,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -740,15 +771,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -915,13 +945,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1129,9 +1158,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1225,10 +1254,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1302,20 +1332,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1327,9 +1368,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1445,9 +1486,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1884,6 +1925,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 025e86361..335008124 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -227,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -242,6 +251,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -362,9 +380,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -373,13 +391,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -389,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -432,11 +450,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -459,6 +478,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "dyn-clone" version = "1.0.4" @@ -493,9 +523,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -513,7 +543,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -526,16 +556,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -591,9 +623,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -662,9 +694,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -706,12 +738,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -748,15 +779,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -923,13 +953,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1139,9 +1168,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1235,10 +1264,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1312,20 +1342,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1337,9 +1378,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1455,9 +1496,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1894,6 +1935,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 914586279..35c7a4c0c 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -82,6 +82,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.7.1" @@ -135,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "corosensei" @@ -156,7 +165,7 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.0.0" dependencies = [ - "digest", + "digest 0.10.3", "ed25519-zebra", "k256", "rand_core 0.6.3", @@ -227,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2", + "sha2 0.9.5", "thiserror", "wasmer", "wasmer-middlewares", @@ -242,6 +251,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-bforest" version = "0.82.3" @@ -362,9 +380,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", "rand_core 0.6.3", @@ -373,13 +391,13 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "subtle", + "typenum", ] [[package]] @@ -389,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ "byteorder", - "digest", + "digest 0.9.0", "rand_core 0.5.1", "subtle", "zeroize", @@ -432,11 +450,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -459,6 +478,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -499,9 +529,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" dependencies = [ "der", "elliptic-curve", @@ -519,7 +549,7 @@ dependencies = [ "hex", "rand_core 0.6.3", "serde", - "sha2", + "sha2 0.9.5", "thiserror", "zeroize", ] @@ -532,16 +562,18 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array", "group", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -597,9 +629,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "ff" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ "rand_core 0.6.3", "subtle", @@ -668,9 +700,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", "rand_core 0.6.3", @@ -712,12 +744,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest", + "digest 0.10.3", ] [[package]] @@ -754,15 +785,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", - "sha2", + "sha2 0.10.2", ] [[package]] @@ -929,13 +959,12 @@ checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -1132,9 +1161,9 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" dependencies = [ "crypto-bigint", "hmac", @@ -1228,10 +1257,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array", "pkcs8", @@ -1305,20 +1335,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.1.5", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "signature" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" dependencies = [ - "digest", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -1351,9 +1392,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -1482,9 +1523,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1921,6 +1962,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.4.1" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" From f64697ab1ab238bd415035a572a009ce2cbabf15 Mon Sep 17 00:00:00 2001 From: Jakub Bogucki Date: Sun, 31 Jul 2022 17:59:53 +0200 Subject: [PATCH 152/344] Uint256/512: Implement checked_div_euclid --- CHANGELOG.md | 3 +-- packages/std/src/math/decimal.rs | 26 -------------------------- packages/std/src/math/decimal256.rs | 26 -------------------------- 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a05d8a7a..1cd7c8e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,8 +20,7 @@ and this project adheres to - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types -- cosmwasm-std: Implement `checked_div_euclid` for - `Uint256`/`Uint512`/`Decimal`/`Decimal256` +- cosmwasm-std: Implement `checked_div_euclid` for `Uint256`/`Uint512` [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index ea0639506..1bb985d62 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -289,10 +289,6 @@ impl Decimal { Decimal::checked_from_ratio(self.numerator(), other.numerator()) } - pub fn checked_div_euclid(self, other: Self) -> Result { - Ok(self.checked_div(other)?.floor()) - } - pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -1891,28 +1887,6 @@ mod tests { Err(CheckedFromRatioError::Overflow {}) )); - // checked div euclid - assert!(matches!( - Decimal::MAX.checked_div_euclid(Decimal::zero()), - Err(CheckedFromRatioError::DivideByZero {}) - )); - assert!(matches!( - Decimal::MAX.checked_div_euclid(Decimal::percent(1)), - Err(CheckedFromRatioError::Overflow {}) - )); - assert_eq!( - Decimal::percent(600) - .checked_div_euclid(Decimal::percent(200)) - .unwrap(), - Decimal::percent(300), - ); - assert_eq!( - Decimal::percent(1500) - .checked_div_euclid(Decimal::percent(700)) - .unwrap(), - Decimal::percent(200), - ); - // checked rem assert_eq!( Decimal::percent(402) diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 40f8095dd..eed988c18 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -302,10 +302,6 @@ impl Decimal256 { Decimal256::checked_from_ratio(self.numerator(), other.numerator()) } - pub fn checked_div_euclid(self, other: Self) -> Result { - Ok(self.checked_div(other)?.floor()) - } - pub fn checked_rem(self, other: Self) -> Result { self.0 .checked_rem(other.0) @@ -2038,28 +2034,6 @@ mod tests { Err(CheckedFromRatioError::Overflow { .. }) )); - // checked div euclid - assert!(matches!( - Decimal256::MAX.checked_div_euclid(Decimal256::zero()), - Err(CheckedFromRatioError::DivideByZero {}) - )); - assert!(matches!( - Decimal256::MAX.checked_div_euclid(Decimal256::percent(1)), - Err(CheckedFromRatioError::Overflow {}) - )); - assert_eq!( - Decimal256::percent(600) - .checked_div_euclid(Decimal256::percent(200)) - .unwrap(), - Decimal256::percent(300), - ); - assert_eq!( - Decimal256::percent(1500) - .checked_div_euclid(Decimal256::percent(700)) - .unwrap(), - Decimal256::percent(200), - ); - // checked rem assert_eq!( Decimal256::percent(402) From f62a957a0118f7609fb5d52f2bea59dfdf470fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C8=99u?= Date: Mon, 1 Aug 2022 11:52:38 +0300 Subject: [PATCH 153/344] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27ec8119e..e5df11e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ and this project adheres to - cosmwasm-std: Enable the `abort` feature by default. This provides more helpful panic messages via a custom panic handler. - cosmwasm-std: Make `Decimal{,256}::DECIMAL_PLACES` a public `u32` value. +- cosmwasm-crypto: Bumped `k256` `0.10.4 -> 0.11` and `digest` `0.9 -> 0.10` + ([#1374]). + +[#1374]: https://github.com/CosmWasm/cosmwasm/pull/1374 ## [1.0.0] - 2022-05-14 From 4911ab7b09953b90a78707d77d1fc9d3760e692f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 8 Aug 2022 15:28:57 +0200 Subject: [PATCH 154/344] std: implement query_wasm_contract_info --- packages/std/src/traits.rs | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index e99ef08d8..fde724972 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -18,6 +18,7 @@ use crate::query::{ }; use crate::results::{ContractResult, Empty, SystemResult}; use crate::serde::{from_binary, to_binary, to_vec}; +use crate::ContractInfoResponse; /// Storage provides read and write access to a persistent storage. /// If you only want to provide read access, provide `&Storage` @@ -275,6 +276,17 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { } } + pub fn query_wasm_contract_info( + &self, + contract_addr: impl Into, + ) -> StdResult { + let request = WasmQuery::ContractInfo { + contract_addr: contract_addr.into(), + } + .into(); + self.query(&request) + } + #[cfg(feature = "staking")] pub fn query_all_validators(&self) -> StdResult> { let request = StakingQuery::AllValidators {}.into(); @@ -371,4 +383,72 @@ mod tests { let balance: BalanceResponse = from_slice(&raw).unwrap(); assert_eq!(balance.amount.amount, Uint128::new(5)); } + + #[test] + fn contract_info() { + const ACCT: &str = "foobar"; + fn mock_resp() -> ContractInfoResponse { + ContractInfoResponse { + code_id: 0, + creator: "creator".to_string(), + admin: None, + pinned: false, + ibc_port: None, + } + } + + let mut querier: MockQuerier = MockQuerier::new(&[(ACCT, &coins(5, "BTC"))]); + querier.update_wasm(|q| -> QuerierResult { + if q == &(WasmQuery::ContractInfo { + contract_addr: ACCT.to_string(), + }) { + SystemResult::Ok(ContractResult::Ok(to_binary(&mock_resp()).unwrap())) + } else { + SystemResult::Err(crate::SystemError::NoSuchContract { + addr: ACCT.to_string(), + }) + } + }); + let wrapper = QuerierWrapper::::new(&querier); + + let contract_info = wrapper.query_wasm_contract_info(ACCT).unwrap(); + assert_eq!(contract_info, mock_resp()); + } + + #[test] + fn contract_info_err() { + const ACCT: &str = "foobar"; + fn mock_resp() -> ContractInfoResponse { + ContractInfoResponse { + code_id: 0, + creator: "creator".to_string(), + admin: None, + pinned: false, + ibc_port: None, + } + } + + let mut querier: MockQuerier = MockQuerier::new(&[(ACCT, &coins(5, "BTC"))]); + querier.update_wasm(|q| -> QuerierResult { + if q == &(WasmQuery::ContractInfo { + contract_addr: ACCT.to_string(), + }) { + SystemResult::Ok(ContractResult::Ok(to_binary(&mock_resp()).unwrap())) + } else { + SystemResult::Err(crate::SystemError::NoSuchContract { + addr: ACCT.to_string(), + }) + } + }); + let wrapper = QuerierWrapper::::new(&querier); + + let err = wrapper.query_wasm_contract_info("unknown").unwrap_err(); + assert!(matches!( + err, + StdError::GenericErr { + msg, + .. + } if msg == "Querier system error: No such contract: foobar" + )); + } } From 8e3d2a8faf79eee25a535bafd2a521dd258ba4ba Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 8 Aug 2022 22:21:55 +0200 Subject: [PATCH 155/344] document QuerierWrapper::query_wasm_contract_info --- CHANGELOG.md | 2 ++ packages/std/src/traits.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5df11e8f..e665461c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ and this project adheres to - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types +- cosmwasm-std: Add `QuerierWrapper::query_wasm_contract_info` - this is just a + convenience helper for querying `WasmQuery::ContractInfo`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index fde724972..0e1602318 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -276,6 +276,7 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { } } + /// Given a contract address, query information about that contract. pub fn query_wasm_contract_info( &self, contract_addr: impl Into, From addbd3f638622233d94040564d3c1a1952c8b7bc Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 15 Aug 2022 13:38:54 +0200 Subject: [PATCH 156/344] std: implement PartialEq for LHS refs of math types --- packages/std/src/math/decimal.rs | 6 ++++++ packages/std/src/math/decimal256.rs | 6 ++++++ packages/std/src/math/uint128.rs | 6 ++++++ packages/std/src/math/uint256.rs | 6 ++++++ packages/std/src/math/uint512.rs | 6 ++++++ packages/std/src/math/uint64.rs | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index f01eb869c..ad74c3309 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -624,6 +624,12 @@ impl PartialEq<&Decimal> for Decimal { } } +impl PartialEq for &Decimal { + fn eq(&self, rhs: &Decimal) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index e83a35ba8..98b563aa6 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -649,6 +649,12 @@ impl PartialEq<&Decimal256> for Decimal256 { } } +impl PartialEq for &Decimal256 { + fn eq(&self, rhs: &Decimal256) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 681c945cc..1e9658f68 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -517,6 +517,12 @@ impl PartialEq<&Uint128> for Uint128 { } } +impl PartialEq for &Uint128 { + fn eq(&self, rhs: &Uint128) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 30fc9984b..d1dd9348e 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -614,6 +614,12 @@ impl PartialEq<&Uint256> for Uint256 { } } +impl PartialEq for &Uint256 { + fn eq(&self, rhs: &Uint256) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 0714f3400..67be194d9 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -575,6 +575,12 @@ impl PartialEq<&Uint512> for Uint512 { } } +impl PartialEq for &Uint512 { + fn eq(&self, rhs: &Uint512) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 1b377bfbc..04107c7e5 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -471,6 +471,12 @@ impl PartialEq<&Uint64> for Uint64 { } } +impl PartialEq for &Uint64 { + fn eq(&self, rhs: &Uint64) -> bool { + *self == rhs + } +} + #[cfg(test)] mod tests { use super::*; From b4846f45397824142fd181dbc757f6cfccde9c6f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 15 Aug 2022 14:16:37 +0200 Subject: [PATCH 157/344] std: partialeq tests for math types --- packages/std/src/math/decimal.rs | 20 ++++++++++++++++++++ packages/std/src/math/decimal256.rs | 20 ++++++++++++++++++++ packages/std/src/math/uint128.rs | 15 +++++++++++++++ packages/std/src/math/uint256.rs | 21 +++++++++++++++++++++ packages/std/src/math/uint512.rs | 21 +++++++++++++++++++++ packages/std/src/math/uint64.rs | 15 +++++++++++++++ 6 files changed, 112 insertions(+) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index ad74c3309..86d1717b8 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1942,4 +1942,24 @@ mod tests { Err(RoundUpOverflowError { .. }) )); } + + #[test] + fn decimal_partial_eq() { + let test_cases = [ + ("1", "1", true), + ("0.5", "0.5", true), + ("0.5", "0.51", false), + ("0", "0.00000", true), + ] + .into_iter() + .map(|(lhs, rhs, expected)| (dec(lhs), dec(rhs), expected)); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index 98b563aa6..6eb6bb77e 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -2089,4 +2089,24 @@ mod tests { ); assert_eq!(Decimal256::MAX.checked_ceil(), Err(RoundUpOverflowError)); } + + #[test] + fn decimal256_partial_eq() { + let test_cases = [ + ("1", "1", true), + ("0.5", "0.5", true), + ("0.5", "0.51", false), + ("0", "0.00000", true), + ] + .into_iter() + .map(|(lhs, rhs, expected)| (dec(lhs), dec(rhs), expected)); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 1e9658f68..4aad9be53 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -994,4 +994,19 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + fn uint128_partial_eq() { + let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] + .into_iter() + .map(|(lhs, rhs, expected)| (Uint128::new(lhs), Uint128::new(rhs), expected)); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index d1dd9348e..7e794d281 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -1545,4 +1545,25 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + fn uint256_partial_eq() { + let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] + .into_iter() + .map(|(lhs, rhs, expected)| { + ( + Uint256::from(lhs as u64), + Uint256::from(rhs as u64), + expected, + ) + }); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 67be194d9..f47913ae7 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -1180,4 +1180,25 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + fn uint512_partial_eq() { + let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] + .into_iter() + .map(|(lhs, rhs, expected)| { + ( + Uint512::from(lhs as u64), + Uint512::from(rhs as u64), + expected, + ) + }); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 04107c7e5..c46956bde 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -907,4 +907,19 @@ mod tests { assert_eq!(a.abs_diff(b), expected); assert_eq!(b.abs_diff(a), expected); } + + #[test] + fn uint64_partial_eq() { + let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] + .into_iter() + .map(|(lhs, rhs, expected)| (Uint64::new(lhs), Uint64::new(rhs), expected)); + + #[allow(clippy::op_ref)] + for (lhs, rhs, expected) in test_cases { + assert_eq!(lhs == rhs, expected); + assert_eq!(&lhs == rhs, expected); + assert_eq!(lhs == &rhs, expected); + assert_eq!(&lhs == &rhs, expected); + } + } } From 4a24c8f8738fc70ecb2ad5ef1450cd50f7120a1e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 15 Aug 2022 14:41:25 +0200 Subject: [PATCH 158/344] std: avoid unnecessary unchecked cast in tests --- packages/std/src/math/uint256.rs | 8 ++------ packages/std/src/math/uint512.rs | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index 0d58d3e21..b7677c011 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -1580,12 +1580,8 @@ mod tests { fn uint256_partial_eq() { let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] .into_iter() - .map(|(lhs, rhs, expected)| { - ( - Uint256::from(lhs as u64), - Uint256::from(rhs as u64), - expected, - ) + .map(|(lhs, rhs, expected): (u64, u64, bool)| { + (Uint256::from(lhs), Uint256::from(rhs), expected) }); #[allow(clippy::op_ref)] diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index f232903df..75556c1d8 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -1215,12 +1215,8 @@ mod tests { fn uint512_partial_eq() { let test_cases = [(1, 1, true), (42, 42, true), (42, 24, false), (0, 0, true)] .into_iter() - .map(|(lhs, rhs, expected)| { - ( - Uint512::from(lhs as u64), - Uint512::from(rhs as u64), - expected, - ) + .map(|(lhs, rhs, expected): (u64, u64, bool)| { + (Uint512::from(lhs), Uint512::from(rhs), expected) }); #[allow(clippy::op_ref)] From 61b1874230963f30337662df79ce5ccc0a98ab27 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 15 Aug 2022 13:50:27 +0200 Subject: [PATCH 159/344] Use clippy from Rust 1.63.0 in CI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e816ec2f6..fe4a15e9c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.59.0", "1.62.0"] + rust-version: ["1.59.0", "1.63.0"] - benchmarking: requires: - package_vm From 50d4c4f2529c23e694f6c01b46a9a80223f6cfa5 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Tue, 16 Aug 2022 17:59:02 +0200 Subject: [PATCH 160/344] Added deprecation message in check_contract. --- packages/vm/examples/check_contract.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vm/examples/check_contract.sh b/packages/vm/examples/check_contract.sh index e9c0ca5da..76055c913 100755 --- a/packages/vm/examples/check_contract.sh +++ b/packages/vm/examples/check_contract.sh @@ -16,6 +16,8 @@ if [ "$PROFILE" = "release" ]; then else cargo build --features iterator --example $PROG fi +echo "\`check_contract\` will be removed from the next version of \`cosmwasm-vm\` - please use \`cw-check-contract\` instead." >&2 +echo "> cargo install cw-check-contract" >&2 for W in $@; do echo -n "Checking $(basename "$W")... " From b6dd8b158d449c847c4bcbad0946f3b91fde54de Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 16 Aug 2022 18:01:24 +0200 Subject: [PATCH 161/344] Disable clippy's derive_partial_eq_without_eq for #[cw_serde] --- devtools/check_workspace.sh | 1 + devtools/test_workspace.sh | 1 + packages/schema-derive/src/cw_serde.rs | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/devtools/check_workspace.sh b/devtools/check_workspace.sh index bf04f90bb..f35dafb7c 100755 --- a/devtools/check_workspace.sh +++ b/devtools/check_workspace.sh @@ -17,4 +17,5 @@ cargo fmt ) (cd packages/storage && cargo build && cargo clippy --all-targets --features iterator -- -D warnings) (cd packages/schema && cargo build && cargo clippy --all-targets -- -D warnings) +(cd packages/schema-derive && cargo build && cargo clippy --all-targets -- -D warnings) (cd packages/vm && cargo build --features iterator,stargate && cargo clippy --all-targets --features iterator,stargate -- -D warnings) diff --git a/devtools/test_workspace.sh b/devtools/test_workspace.sh index b2d3a1771..0fdcfb201 100755 --- a/devtools/test_workspace.sh +++ b/devtools/test_workspace.sh @@ -7,4 +7,5 @@ cargo fmt (cd packages/std && cargo test --features iterator) (cd packages/storage && cargo test --features iterator) (cd packages/schema && cargo test) +(cd packages/schema-derive && cargo test) (cd packages/vm && cargo test --features iterator,stargate) diff --git a/packages/schema-derive/src/cw_serde.rs b/packages/schema-derive/src/cw_serde.rs index 98e430dad..b259bee20 100644 --- a/packages/schema-derive/src/cw_serde.rs +++ b/packages/schema-derive/src/cw_serde.rs @@ -11,6 +11,7 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { PartialEq, schemars::JsonSchema )] + #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining #[serde(deny_unknown_fields)] #input }, @@ -23,6 +24,7 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { PartialEq, schemars::JsonSchema )] + #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining #[serde(deny_unknown_fields, rename_all = "snake_case")] #input }, @@ -52,6 +54,7 @@ mod tests { PartialEq, schemars::JsonSchema )] + #[allow(clippy::derive_partial_eq_without_eq)] #[serde(deny_unknown_fields)] pub struct InstantiateMsg { pub verifier: String, @@ -82,6 +85,7 @@ mod tests { PartialEq, schemars::JsonSchema )] + #[allow(clippy::derive_partial_eq_without_eq)] #[serde(deny_unknown_fields, rename_all = "snake_case")] pub enum SudoMsg { StealFunds { From d3c68236ed418e77f423801bf2984f41d115c9cd Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 16 Aug 2022 17:54:34 +0200 Subject: [PATCH 162/344] Add Eq implementations suggested by clippy --- contracts/floaty/src/state.rs | 2 +- contracts/hackatom/src/state.rs | 2 +- contracts/ibc-reflect-send/src/ibc_msg.rs | 6 ++-- contracts/ibc-reflect-send/src/state.rs | 4 +-- contracts/ibc-reflect/src/state.rs | 2 +- contracts/queue/src/state.rs | 2 +- contracts/reflect/src/state.rs | 2 +- contracts/staking/src/state.rs | 6 ++-- packages/profiler/src/code_blocks.rs | 2 +- packages/profiler/src/operators.rs | 2 +- packages/schema/src/query_response.rs | 2 +- packages/schema/tests/idl.rs | 10 +++---- packages/std/src/coins.rs | 2 +- packages/std/src/errors/system_error.rs | 2 +- packages/std/src/ibc.rs | 32 ++++++++++----------- packages/std/src/math/decimal.rs | 2 +- packages/std/src/math/decimal256.rs | 2 +- packages/std/src/query/bank.rs | 6 ++-- packages/std/src/query/ibc.rs | 8 +++--- packages/std/src/query/mod.rs | 2 +- packages/std/src/query/staking.rs | 18 ++++++------ packages/std/src/query/wasm.rs | 4 +-- packages/std/src/results/contract_result.rs | 2 +- packages/std/src/results/cosmos_msg.rs | 14 ++++----- packages/std/src/results/empty.rs | 2 +- packages/std/src/results/events.rs | 4 +-- packages/std/src/results/response.rs | 2 +- packages/std/src/results/submessages.rs | 10 +++---- packages/std/src/results/system_result.rs | 2 +- packages/std/src/types.rs | 10 +++---- packages/vm/src/backend.rs | 4 +-- packages/vm/src/cache.rs | 2 +- packages/vm/src/environment.rs | 4 +-- 33 files changed, 88 insertions(+), 88 deletions(-) diff --git a/contracts/floaty/src/state.rs b/contracts/floaty/src/state.rs index b1e8196be..0b6962d0a 100644 --- a/contracts/floaty/src/state.rs +++ b/contracts/floaty/src/state.rs @@ -5,7 +5,7 @@ use cosmwasm_std::Addr; pub const CONFIG_KEY: &[u8] = b"config"; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct State { pub verifier: Addr, pub beneficiary: Addr, diff --git a/contracts/hackatom/src/state.rs b/contracts/hackatom/src/state.rs index b1e8196be..0b6962d0a 100644 --- a/contracts/hackatom/src/state.rs +++ b/contracts/hackatom/src/state.rs @@ -5,7 +5,7 @@ use cosmwasm_std::Addr; pub const CONFIG_KEY: &[u8] = b"config"; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct State { pub verifier: Addr, pub beneficiary: Addr, diff --git a/contracts/ibc-reflect-send/src/ibc_msg.rs b/contracts/ibc-reflect-send/src/ibc_msg.rs index 94c55fdac..d395388c3 100644 --- a/contracts/ibc-reflect-send/src/ibc_msg.rs +++ b/contracts/ibc-reflect-send/src/ibc_msg.rs @@ -3,7 +3,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; /// This is the message we send over the IBC channel -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum PacketMsg { Dispatch { msgs: Vec }, @@ -21,14 +21,14 @@ pub type DispatchResponse = (); /// This is the success response we send on ack for PacketMsg::WhoAmI. /// Return the caller's account address on the remote chain -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct WhoAmIResponse { pub account: String, } /// This is the success response we send on ack for PacketMsg::Balance. /// Just acknowledge success or error -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct BalancesResponse { pub account: String, pub balances: Vec, diff --git a/contracts/ibc-reflect-send/src/state.rs b/contracts/ibc-reflect-send/src/state.rs index 56b2cf2ee..a44d66b1d 100644 --- a/contracts/ibc-reflect-send/src/state.rs +++ b/contracts/ibc-reflect-send/src/state.rs @@ -9,12 +9,12 @@ use cosmwasm_storage::{ pub const KEY_CONFIG: &[u8] = b"config"; pub const PREFIX_ACCOUNTS: &[u8] = b"accounts"; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Config { pub admin: Addr, } -#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq)] pub struct AccountData { /// last block balance was updated (0 is never) pub last_update_time: Timestamp, diff --git a/contracts/ibc-reflect/src/state.rs b/contracts/ibc-reflect/src/state.rs index 1488959f3..9b0bbfe52 100644 --- a/contracts/ibc-reflect/src/state.rs +++ b/contracts/ibc-reflect/src/state.rs @@ -11,7 +11,7 @@ pub const KEY_CONFIG: &[u8] = b"config"; pub const KEY_PENDING_CHANNEL: &[u8] = b"pending"; pub const PREFIX_ACCOUNTS: &[u8] = b"accounts"; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Config { pub reflect_code_id: u64, } diff --git a/contracts/queue/src/state.rs b/contracts/queue/src/state.rs index 6808fb336..6f4a2848f 100644 --- a/contracts/queue/src/state.rs +++ b/contracts/queue/src/state.rs @@ -2,7 +2,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; // we store one entry for each item in the queue -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Item { pub value: i32, } diff --git a/contracts/reflect/src/state.rs b/contracts/reflect/src/state.rs index 57b475dac..b1d52aa3e 100644 --- a/contracts/reflect/src/state.rs +++ b/contracts/reflect/src/state.rs @@ -10,7 +10,7 @@ use cosmwasm_storage::{ const CONFIG_KEY: &[u8] = b"config"; const RESULT_PREFIX: &[u8] = b"result"; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct State { pub owner: Addr, } diff --git a/contracts/staking/src/state.rs b/contracts/staking/src/state.rs index 665b6125f..99a9f3b9d 100644 --- a/contracts/staking/src/state.rs +++ b/contracts/staking/src/state.rs @@ -33,7 +33,7 @@ pub fn claims_read(storage: &dyn Storage) -> ReadonlyBucket { } /// Investment info is fixed at initialization, and is used to control the function of the contract -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct InvestmentInfo { /// owner created the contract and takes a cut pub owner: Addr, @@ -50,7 +50,7 @@ pub struct InvestmentInfo { } /// Info to display the derivative token in a UI -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct TokenInfo { /// name of the derivative token pub name: String, @@ -61,7 +61,7 @@ pub struct TokenInfo { } /// Supply is dynamic and tracks the current supply of staked and ERC20 tokens. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Default, JsonSchema)] pub struct Supply { /// issued is how many derivative tokens this contract has issued pub issued: Uint128, diff --git a/packages/profiler/src/code_blocks.rs b/packages/profiler/src/code_blocks.rs index cda54aade..937c14d65 100644 --- a/packages/profiler/src/code_blocks.rs +++ b/packages/profiler/src/code_blocks.rs @@ -69,7 +69,7 @@ impl BlockStore { } /// Represents a non-branching Wasm code block. -#[derive(Debug, MemoryUsage, Hash, PartialEq)] +#[derive(Debug, MemoryUsage, Hash, PartialEq, Eq)] pub struct CodeBlock { inner: Vec, } diff --git a/packages/profiler/src/operators.rs b/packages/profiler/src/operators.rs index b476dcae0..10298a602 100644 --- a/packages/profiler/src/operators.rs +++ b/packages/profiler/src/operators.rs @@ -3,7 +3,7 @@ use std::hash::Hash; use loupe::MemoryUsage; use wasmer::wasmparser::Operator; -#[derive(Debug, Clone, Hash, PartialEq, MemoryUsage)] +#[derive(Debug, Clone, Hash, PartialEq, Eq, MemoryUsage)] pub enum OperatorSymbol { Unreachable, Nop, diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 29162c169..7ad5cc1a0 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -77,7 +77,7 @@ fn check_api_integrity( Ok(()) } -#[derive(Debug, Error, PartialEq)] +#[derive(Debug, Error, PartialEq, Eq)] pub enum IntegrityError { #[error("the structure of the QueryMsg schema was unexpected")] InvalidQueryMsgSchema, diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 841237f91..4919e8f77 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -5,7 +5,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct InstantiateMsg { pub admin: String, pub cap: u128, @@ -13,26 +13,26 @@ pub struct InstantiateMsg { // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum ExecuteMsg { Mint { amount: u128 }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] pub enum QueryMsg { #[returns(u128)] Balance { account: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum SudoMsg { SetAdmin { new_admin: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct MigrateMsg { pub admin: String, pub cap: u128, diff --git a/packages/std/src/coins.rs b/packages/std/src/coins.rs index a84799b3d..289911dee 100644 --- a/packages/std/src/coins.rs +++ b/packages/std/src/coins.rs @@ -4,7 +4,7 @@ use std::fmt; use crate::math::Uint128; -#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, JsonSchema)] pub struct Coin { pub denom: String, pub amount: Uint128, diff --git a/packages/std/src/errors/system_error.rs b/packages/std/src/errors/system_error.rs index e6480ae0c..27cd40f12 100644 --- a/packages/std/src/errors/system_error.rs +++ b/packages/std/src/errors/system_error.rs @@ -12,7 +12,7 @@ use crate::Binary; /// /// Such errors are only created by the VM. The error type is defined in the standard library, to ensure /// the contract understands the error format without creating a dependency on cosmwasm-vm. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] #[non_exhaustive] pub enum SystemError { diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index 8f2505a4e..5765135a2 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -18,7 +18,7 @@ use crate::timestamp::Timestamp; /// These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts /// (contracts that directly speak the IBC protocol via 6 entry points) #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum IbcMsg { /// Sends bank tokens owned by the contract to the given address on another chain. @@ -51,7 +51,7 @@ pub enum IbcMsg { CloseChannel { channel_id: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct IbcEndpoint { pub port_id: String, pub channel_id: String, @@ -60,7 +60,7 @@ pub struct IbcEndpoint { /// In IBC each package must set at least one type of timeout: /// the timestamp or the block height. Using this rather complex enum instead of /// two timeout fields we ensure that at least one timeout is set. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct IbcTimeout { // use private fields to enforce the use of constructors, which ensure that at least one is set @@ -115,7 +115,7 @@ impl From for IbcTimeout { /// IbcChannel defines all information on a channel. /// This is generally used in the hand-shake process, but can be queried directly. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcChannel { pub endpoint: IbcEndpoint, @@ -150,7 +150,7 @@ impl IbcChannel { /// IbcOrder defines if a channel is ORDERED or UNORDERED /// Values come from https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/core/channel/v1/channel.proto#L69-L80 /// Naming comes from the protobuf files and go translations. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub enum IbcOrder { #[serde(rename = "ORDER_UNORDERED")] Unordered, @@ -193,7 +193,7 @@ impl Ord for IbcTimeoutBlock { } } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcPacket { /// The raw data sent from the other side in the packet @@ -226,7 +226,7 @@ impl IbcPacket { } } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcAcknowledgement { pub data: Binary, @@ -247,7 +247,7 @@ impl IbcAcknowledgement { } /// The message that is passed into `ibc_channel_open` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] #[non_exhaustive] pub enum IbcChannelOpenMsg { @@ -306,14 +306,14 @@ pub type IbcChannelOpenResponse = (); #[cfg(feature = "ibc3")] pub type IbcChannelOpenResponse = Option; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Ibc3ChannelOpenResponse { /// We can set the channel version to a different one than we were called with pub version: String, } /// The message that is passed into `ibc_channel_connect` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] #[non_exhaustive] pub enum IbcChannelConnectMsg { @@ -366,7 +366,7 @@ impl From for IbcChannel { } /// The message that is passed into `ibc_channel_close` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] #[non_exhaustive] pub enum IbcChannelCloseMsg { @@ -403,7 +403,7 @@ impl From for IbcChannel { } /// The message that is passed into `ibc_packet_receive` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcPacketReceiveMsg { pub packet: IbcPacket, @@ -424,7 +424,7 @@ impl IbcPacketReceiveMsg { } /// The message that is passed into `ibc_packet_ack` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcPacketAckMsg { pub acknowledgement: IbcAcknowledgement, @@ -457,7 +457,7 @@ impl IbcPacketAckMsg { } /// The message that is passed into `ibc_packet_timeout` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcPacketTimeoutMsg { pub packet: IbcPacket, @@ -484,7 +484,7 @@ impl IbcPacketTimeoutMsg { /// Callbacks that have return values (like receive_packet) /// or that cannot redispatch messages (like the handshake callbacks) /// will use other Response types -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcBasicResponse { /// Optional list of messages to pass. These will be executed in order. @@ -626,7 +626,7 @@ impl IbcBasicResponse { // Where the acknowledgement bytes contain an encoded error message to be returned to // the calling chain. (Returning ContractResult::Err will abort processing of this packet // and not inform the calling chain). -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct IbcReceiveResponse { /// The bytes we return to the contract that sent the packet. diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 5c808104a..45883adce 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -22,7 +22,7 @@ use super::{Uint128, Uint256}; #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, JsonSchema)] pub struct Decimal(#[schemars(with = "String")] Uint128); -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Debug, PartialEq, Eq)] #[error("Decimal range exceeded")] pub struct DecimalRangeExceeded; diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index f52be3264..c305f3e24 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -25,7 +25,7 @@ use super::Uint256; #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, JsonSchema)] pub struct Decimal256(#[schemars(with = "String")] Uint256); -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Debug, PartialEq, Eq)] #[error("Decimal256 range exceeded")] pub struct Decimal256RangeExceeded; diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 08824323b..51f274d1f 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use crate::Coin; #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum BankQuery { /// This calls into the native bank module for one denomination @@ -16,7 +16,7 @@ pub enum BankQuery { AllBalances { address: String }, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct BalanceResponse { /// Always returns a Coin with the requested denom. @@ -24,7 +24,7 @@ pub struct BalanceResponse { pub amount: Coin, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct AllBalanceResponse { /// Returns all non-zero coins held by this account. diff --git a/packages/std/src/query/ibc.rs b/packages/std/src/query/ibc.rs index 287008f8c..0164de330 100644 --- a/packages/std/src/query/ibc.rs +++ b/packages/std/src/query/ibc.rs @@ -8,7 +8,7 @@ use crate::ibc::IbcChannel; /// These are queries to the various IBC modules to see the state of the contract's /// IBC connection. These will return errors if the contract is not "ibc enabled" #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum IbcQuery { /// Gets the Port ID the current contract is bound to. @@ -32,17 +32,17 @@ pub enum IbcQuery { // TODO: Add more } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct PortIdResponse { pub port_id: String, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct ListChannelsResponse { pub channels: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct ChannelResponse { pub channel: Option, } diff --git a/packages/std/src/query/mod.rs b/packages/std/src/query/mod.rs index 0fb490dc5..8293734bd 100644 --- a/packages/std/src/query/mod.rs +++ b/packages/std/src/query/mod.rs @@ -21,7 +21,7 @@ pub use staking::{ pub use wasm::{ContractInfoResponse, WasmQuery}; #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum QueryRequest { Bank(BankQuery), diff --git a/packages/std/src/query/staking.rs b/packages/std/src/query/staking.rs index 0300e1e94..fa513ac52 100644 --- a/packages/std/src/query/staking.rs +++ b/packages/std/src/query/staking.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize}; use crate::{Addr, Coin, Decimal}; #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum StakingQuery { /// Returns the denomination that can be bonded (if there are multiple native tokens on the chain) @@ -34,14 +34,14 @@ pub enum StakingQuery { } /// BondedDenomResponse is data format returned from StakingRequest::BondedDenom query -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct BondedDenomResponse { pub denom: String, } /// DelegationsResponse is data format returned from StakingRequest::AllDelegations query -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct AllDelegationsResponse { pub delegations: Vec, @@ -50,7 +50,7 @@ pub struct AllDelegationsResponse { /// Delegation is basic (cheap to query) data about a delegation. /// /// Instances are created in the querier. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Delegation { pub delegator: Addr, /// A validator address (e.g. cosmosvaloper1...) @@ -70,7 +70,7 @@ impl From for Delegation { } /// DelegationResponse is data format returned from StakingRequest::Delegation query -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct DelegationResponse { pub delegation: Option, @@ -80,7 +80,7 @@ pub struct DelegationResponse { /// is expensive to query. /// /// Instances are created in the querier. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct FullDelegation { pub delegator: Addr, /// A validator address (e.g. cosmosvaloper1...) @@ -96,19 +96,19 @@ pub struct FullDelegation { } /// The data format returned from StakingRequest::AllValidators query -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct AllValidatorsResponse { pub validators: Vec, } /// The data format returned from StakingRequest::Validator query -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct ValidatorResponse { pub validator: Option, } /// Instances are created in the querier. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Validator { /// A validator address (e.g. cosmosvaloper1...) pub address: String, diff --git a/packages/std/src/query/wasm.rs b/packages/std/src/query/wasm.rs index 4d5455b3d..cbac89983 100644 --- a/packages/std/src/query/wasm.rs +++ b/packages/std/src/query/wasm.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use crate::Binary; #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum WasmQuery { /// this queries the public API of another contract at a known address (with known ABI) @@ -27,7 +27,7 @@ pub enum WasmQuery { } #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct ContractInfoResponse { pub code_id: u64, /// address that instantiated this contract diff --git a/packages/std/src/results/contract_result.rs b/packages/std/src/results/contract_result.rs index 778db581b..380ecaecc 100644 --- a/packages/std/src/results/contract_result.rs +++ b/packages/std/src/results/contract_result.rs @@ -29,7 +29,7 @@ use std::fmt; /// let result: ContractResult = ContractResult::Err(error_msg); /// assert_eq!(to_vec(&result).unwrap(), br#"{"error":"Something went wrong"}"#); /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum ContractResult { Ok(S), diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index 950439a51..a7aed1657 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -19,7 +19,7 @@ pub trait CustomMsg: Serialize + Clone + fmt::Debug + PartialEq + JsonSchema {} impl CustomMsg for Empty {} #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] // See https://github.com/serde-rs/serde/issues/1296 why we cannot add De-Serialize trait bounds to T pub enum CosmosMsg { @@ -49,7 +49,7 @@ pub enum CosmosMsg { /// /// See https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum BankMsg { /// Sends native tokens from the contract to the given address. @@ -71,7 +71,7 @@ pub enum BankMsg { /// See https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto #[cfg(feature = "staking")] #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum StakingMsg { /// This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). @@ -94,7 +94,7 @@ pub enum StakingMsg { /// See https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto #[cfg(feature = "staking")] #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum DistributionMsg { /// This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). @@ -122,7 +122,7 @@ fn binary_to_string(data: &Binary, fmt: &mut std::fmt::Formatter) -> Result<(), /// /// See https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto #[non_exhaustive] -#[derive(Serialize, Deserialize, Clone, Derivative, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Derivative, PartialEq, Eq, JsonSchema)] #[derivative(Debug)] #[serde(rename_all = "snake_case")] pub enum WasmMsg { @@ -178,7 +178,7 @@ pub enum WasmMsg { } #[cfg(feature = "stargate")] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum GovMsg { /// This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address. @@ -186,7 +186,7 @@ pub enum GovMsg { } #[cfg(feature = "stargate")] -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum VoteOption { Yes, diff --git a/packages/std/src/results/empty.rs b/packages/std/src/results/empty.rs index 8aff8c82f..56ccf3586 100644 --- a/packages/std/src/results/empty.rs +++ b/packages/std/src/results/empty.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; /// It is designed to be expressable in correct JSON and JSON Schema but /// contains no meaningful data. Previously we used enums without cases, /// but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451) -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, Default)] pub struct Empty {} #[cfg(test)] diff --git a/packages/std/src/results/events.rs b/packages/std/src/results/events.rs index 961441e29..3cad5ed35 100644 --- a/packages/std/src/results/events.rs +++ b/packages/std/src/results/events.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// /// [*Cosmos SDK* event]: https://docs.cosmos.network/master/core/events.html /// [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70 -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct Event { /// The event type. This is renamed to "ty" because "type" is reserved in Rust. This sucks, we know. @@ -55,7 +55,7 @@ impl Event { } /// An key value pair that is used in the context of event attributes in logs -#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, JsonSchema)] pub struct Attribute { pub key: String, pub value: String, diff --git a/packages/std/src/results/response.rs b/packages/std/src/results/response.rs index 6c24eb628..7e29fe5bd 100644 --- a/packages/std/src/results/response.rs +++ b/packages/std/src/results/response.rs @@ -59,7 +59,7 @@ use super::{Attribute, CosmosMsg, Empty, Event, SubMsg}; /// Ok(response) /// } /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] pub struct Response { /// Optional list of messages to pass. These will be executed in order. diff --git a/packages/std/src/results/submessages.rs b/packages/std/src/results/submessages.rs index 1df1b19af..bab8fa3dd 100644 --- a/packages/std/src/results/submessages.rs +++ b/packages/std/src/results/submessages.rs @@ -8,7 +8,7 @@ use super::{CosmosMsg, Empty, Event}; /// Use this to define when the contract gets a response callback. /// If you only need it for errors or success you can select just those in order /// to save gas. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum ReplyOn { /// Always perform a callback after SubMsg is processed @@ -27,7 +27,7 @@ pub enum ReplyOn { /// Note: On error the submessage execution will revert any partial state changes due to this message, /// but not revert any state changes in the calling contract. If this is required, it must be done /// manually in the `reply` entry point. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct SubMsg { /// An arbitrary ID chosen by the contract. /// This is typically used to match `Reply`s in the `reply` entry point to the submessage. @@ -95,7 +95,7 @@ impl SubMsg { /// The result object returned to `reply`. We always get the ID from the submessage /// back and then must handle success and error cases ourselves. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Reply { /// The ID that the contract set when emitting the `SubMsg`. /// Use this to identify which submessage triggered the `reply`. @@ -135,7 +135,7 @@ pub struct Reply { /// let result = SubMsgResult::Err(error_msg); /// assert_eq!(to_vec(&result).unwrap(), br#"{"error":"Something went wrong"}"#); /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum SubMsgResult { Ok(SubMsgResponse), @@ -191,7 +191,7 @@ impl From for Result { /// The information we get back from a successful sub message execution, /// with full Cosmos SDK events. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct SubMsgResponse { pub events: Vec, pub data: Option, diff --git a/packages/std/src/results/system_result.rs b/packages/std/src/results/system_result.rs index 5a5ee4d52..9cc7a4858 100644 --- a/packages/std/src/results/system_result.rs +++ b/packages/std/src/results/system_result.rs @@ -29,7 +29,7 @@ use super::super::errors::SystemError; /// let result: SystemResult = SystemResult::Err(error); /// assert_eq!(to_vec(&result).unwrap(), br#"{"error":{"unknown":{}}}"#); /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum SystemResult { Ok(S), diff --git a/packages/std/src/types.rs b/packages/std/src/types.rs index fcc8ba02f..5140f5f38 100644 --- a/packages/std/src/types.rs +++ b/packages/std/src/types.rs @@ -5,7 +5,7 @@ use crate::addresses::Addr; use crate::coins::Coin; use crate::timestamp::Timestamp; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Env { pub block: BlockInfo, /// Information on the transaction this message was executed in. @@ -15,7 +15,7 @@ pub struct Env { pub contract: ContractInfo, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct TransactionInfo { /// The position of this transaction in the block. The first /// transaction has index 0. @@ -26,7 +26,7 @@ pub struct TransactionInfo { pub index: u32, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct BlockInfo { /// The height of a block is the number of blocks preceding it in the blockchain. pub height: u64, @@ -87,7 +87,7 @@ pub struct BlockInfo { /// /// [MsgInstantiateContract]: https://github.com/CosmWasm/wasmd/blob/v0.15.0/x/wasm/internal/types/tx.proto#L47-L61 /// [MsgExecuteContract]: https://github.com/CosmWasm/wasmd/blob/v0.15.0/x/wasm/internal/types/tx.proto#L68-L78 -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct MessageInfo { /// The `sender` field from `MsgInstantiateContract` and `MsgExecuteContract`. /// You can think of this as the address that initiated the action (i.e. the message). What that @@ -105,7 +105,7 @@ pub struct MessageInfo { pub funds: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct ContractInfo { pub address: Addr, } diff --git a/packages/vm/src/backend.rs b/packages/vm/src/backend.rs index ca29b345c..ea9a08500 100644 --- a/packages/vm/src/backend.rs +++ b/packages/vm/src/backend.rs @@ -10,7 +10,7 @@ use cosmwasm_std::{Order, Record}; /// A structure that represents gas cost to be deducted from the remaining gas. /// This is always needed when computations are performed outside of /// Wasm execution, such as calling crypto APIs or calls into the blockchain. -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct GasInfo { /// The gas cost of a computation that was executed already but not yet charged. /// @@ -157,7 +157,7 @@ pub trait Querier { /// attached. pub type BackendResult = (core::result::Result, GasInfo); -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Debug, PartialEq, Eq)] #[non_exhaustive] pub enum BackendError { #[error("Panic in FFI call")] diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index d3f50777c..da65e90d8 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -75,7 +75,7 @@ pub struct Cache { instantiation_lock: Mutex<()>, } -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub struct AnalysisReport { pub has_ibc_entry_points: bool, pub required_features: HashSet, diff --git a/packages/vm/src/environment.rs b/packages/vm/src/environment.rs index fb71d064c..e915c151f 100644 --- a/packages/vm/src/environment.rs +++ b/packages/vm/src/environment.rs @@ -16,7 +16,7 @@ pub enum Never {} /** gas config data */ -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct GasConfig { /// Gas costs of VM (not Backend) provided functionality /// secp256k1 signature verification cost @@ -52,7 +52,7 @@ impl Default for GasConfig { /** context data **/ -#[derive(Clone, PartialEq, Debug, Default)] +#[derive(Clone, PartialEq, Eq, Debug, Default)] pub struct GasState { /// Gas limit for the computation, including internally and externally used gas. /// This is set when the Environment is created and never mutated. From a81e91e5cf808f56d1a384485cc0c62550cc8608 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 11:28:47 +0200 Subject: [PATCH 163/344] Error message in rs file and removed check_contract.sh --- .circleci/config.yml | 2 +- packages/vm/examples/check_contract.rs | 3 +++ packages/vm/examples/check_contract.sh | 25 ------------------------- 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100755 packages/vm/examples/check_contract.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index e816ec2f6..631e372b1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1188,7 +1188,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./examples/check_contract.sh ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo install cw-check-contract; cw-check_contract ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/packages/vm/examples/check_contract.rs b/packages/vm/examples/check_contract.rs index 6473e27e3..30d05e8aa 100644 --- a/packages/vm/examples/check_contract.rs +++ b/packages/vm/examples/check_contract.rs @@ -9,6 +9,9 @@ use cosmwasm_vm::internals::{check_wasm, compile}; const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; pub fn main() { + eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cw-check-contract` instead."); + eprintln!("> cargo install cw-check-contract"); + let matches = App::new("Contract checking") .version("0.1.0") .long_about("Checks the given wasm file (memories, exports, imports, supported features, and non-determinism).") diff --git a/packages/vm/examples/check_contract.sh b/packages/vm/examples/check_contract.sh deleted file mode 100755 index 76055c913..000000000 --- a/packages/vm/examples/check_contract.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e - -WASMS="$@" -[ -z "$WASMS" ] && echo "Usage: $0 .wasm..." && exit 1 - -PROFILE="debug" - -PROG=$(basename $0 .sh) -BASE_DIR=$(dirname $0)/.. - -BIN="$BASE_DIR/../../target/$PROFILE/examples/$PROG" - -if [ "$PROFILE" = "release" ]; then - cargo build --release --features iterator --example $PROG -else - cargo build --features iterator --example $PROG -fi -echo "\`check_contract\` will be removed from the next version of \`cosmwasm-vm\` - please use \`cw-check-contract\` instead." >&2 -echo "> cargo install cw-check-contract" >&2 - -for W in $@; do - echo -n "Checking $(basename "$W")... " - $BIN $W -done From 170a47f60cb0e0ad7b615c607a7539f8a80d68cd Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 16 Aug 2022 12:28:07 +0200 Subject: [PATCH 164/344] Rename methods from features to capabilities --- CHANGELOG.md | 9 +++ contracts/hackatom/tests/integration.rs | 2 +- contracts/staking/tests/integration.rs | 4 +- docs/FEATURES.md | 8 +-- packages/vm/benches/main.rs | 8 +-- packages/vm/examples/check_contract.rs | 29 +++++----- packages/vm/examples/multi_threaded_cache.rs | 5 +- packages/vm/src/cache.rs | 42 +++++++------- packages/vm/src/compatibility.rs | 59 +++++++++++--------- packages/vm/src/features.rs | 40 ++++++------- packages/vm/src/instance.rs | 20 +++---- packages/vm/src/lib.rs | 2 +- packages/vm/src/testing/instance.rs | 12 ++-- 13 files changed, 128 insertions(+), 112 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63a616271..86f1d04c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,15 @@ and this project adheres to - cosmwasm-std: Make `Decimal{,256}::DECIMAL_PLACES` a public `u32` value. - cosmwasm-crypto: Bumped `k256` `0.10.4 -> 0.11` and `digest` `0.9 -> 0.10` ([#1374]). +- cosmwasm-vm: Rename features to capabilities, including + 1. `features_from_csv` to `capabilities_from_csv`; + 2. `CacheOptions::supported_features` to + `CacheOptions::supported_capabilities`; + 3. `MockInstanceOptions::supported_features` to + `MockInstanceOptions::supported_capabilities` + 4. `Instance::required_features` to `Instance::required_capabilities` + 5. `AnalysisReport::required_features` to + `AnalysisReport::required_capabilities`. [#1374]: https://github.com/CosmWasm/cosmwasm/pull/1374 diff --git a/contracts/hackatom/tests/integration.rs b/contracts/hackatom/tests/integration.rs index 0616340c8..172fae02b 100644 --- a/contracts/hackatom/tests/integration.rs +++ b/contracts/hackatom/tests/integration.rs @@ -54,7 +54,7 @@ fn make_init_msg() -> (InstantiateMsg, String) { #[test] fn proper_initialization() { let mut deps = mock_instance(WASM, &[]); - assert_eq!(deps.required_features().len(), 0); + assert_eq!(deps.required_capabilities().len(), 0); let verifier = String::from("verifies"); let beneficiary = String::from("benefits"); diff --git a/contracts/staking/tests/integration.rs b/contracts/staking/tests/integration.rs index c638be08f..cec0aba12 100644 --- a/contracts/staking/tests/integration.rs +++ b/contracts/staking/tests/integration.rs @@ -86,8 +86,8 @@ fn proper_initialization() { ); let (instance_options, memory_limit) = mock_instance_options(); let mut deps = Instance::from_code(WASM, backend, instance_options, memory_limit).unwrap(); - assert_eq!(deps.required_features().len(), 1); - assert!(deps.required_features().contains("staking")); + assert_eq!(deps.required_capabilities().len(), 1); + assert!(deps.required_capabilities().contains("staking")); let creator = String::from("creator"); let msg = InstantiateMsg { diff --git a/docs/FEATURES.md b/docs/FEATURES.md index e6fcce641..26b7ef4f1 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -61,13 +61,13 @@ implementation. ## Supported features -An instance of the main `Cache` has `supported_features` in its `CacheOptions`. -This value is set in the caller, such as +An instance of the main `Cache` has `supported_capabilities` in its +`CacheOptions`. This value is set in the caller, such as [here](https://github.com/CosmWasm/wasmvm/blob/v1.0.0-rc.0/libwasmvm/src/cache.rs#L75) and [here](https://github.com/CosmWasm/wasmvm/blob/v1.0.0-rc.0/libwasmvm/src/cache.rs#L62). -`features_from_csv` takes a comma separated list and returns a set of features. -This features list is set +`capabilities_from_csv` takes a comma separated list and returns a set of +features. This features list is set [in keeper.go](https://github.com/CosmWasm/wasmd/blob/v0.27.0-rc0/x/wasm/keeper/keeper.go#L100) and [in app.go](https://github.com/CosmWasm/wasmd/blob/v0.27.0-rc0/app/app.go#L475-L496). diff --git a/packages/vm/benches/main.rs b/packages/vm/benches/main.rs index d5566f285..55bf1d35a 100644 --- a/packages/vm/benches/main.rs +++ b/packages/vm/benches/main.rs @@ -11,7 +11,7 @@ use cosmwasm_vm::testing::{ mock_backend, mock_env, mock_info, mock_instance_options, MockApi, MockQuerier, MockStorage, }; use cosmwasm_vm::{ - call_execute, call_instantiate, features_from_csv, Cache, CacheOptions, Checksum, Instance, + call_execute, call_instantiate, capabilities_from_csv, Cache, CacheOptions, Checksum, Instance, InstanceOptions, Size, }; @@ -123,7 +123,7 @@ fn bench_cache(c: &mut Criterion) { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: features_from_csv("iterator,staking"), + supported_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; @@ -163,7 +163,7 @@ fn bench_cache(c: &mut Criterion) { group.bench_function("instantiate from fs", |b| { let non_memcache = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: features_from_csv("iterator,staking"), + supported_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: Size(0), instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; @@ -229,7 +229,7 @@ pub fn bench_instance_threads(c: &mut Criterion) { c.bench_function("multi-threaded get_instance", |b| { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: features_from_csv("iterator,staking"), + supported_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; diff --git a/packages/vm/examples/check_contract.rs b/packages/vm/examples/check_contract.rs index 30d05e8aa..eff563cc0 100644 --- a/packages/vm/examples/check_contract.rs +++ b/packages/vm/examples/check_contract.rs @@ -3,10 +3,10 @@ use std::io::Read; use clap::{App, Arg}; -use cosmwasm_vm::features_from_csv; +use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; -const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; +const DEFAULT_SUPPORTED_CAPABILITIES: &str = "iterator,staking,stargate"; pub fn main() { eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cw-check-contract` instead."); @@ -14,14 +14,15 @@ pub fn main() { let matches = App::new("Contract checking") .version("0.1.0") - .long_about("Checks the given wasm file (memories, exports, imports, supported features, and non-determinism).") + .long_about("Checks the given wasm file (memories, exports, imports, supported capabilities, and non-determinism).") .author("Mauro Lacy ") .arg( - Arg::with_name("FEATURES") + Arg::with_name("CAPABILITIES") // `long` setting required to turn the position argument into an option 🤷 - .long("supported-features") - .value_name("FEATURES") - .help("Sets the supported features that the desired target chain supports") + .long("supported-capabilities") + .aliases(&["FEATURES", "supported-features"]) // Old names + .value_name("CAPABILITIES") + .help("Sets the supported capabilities that the desired target chain supports") .takes_value(true) ) .arg( @@ -32,12 +33,12 @@ pub fn main() { ) .get_matches(); - // Supported features - let supported_features_csv = matches - .value_of("FEATURES") - .unwrap_or(DEFAULT_SUPPORTED_FEATURES); - let supported_features = features_from_csv(supported_features_csv); - println!("Supported features: {:?}", supported_features); + // Supported capabilities + let supported_capabilities_csv = matches + .value_of("CAPABILITIES") + .unwrap_or(DEFAULT_SUPPORTED_CAPABILITIES); + let supported_capabilities = capabilities_from_csv(supported_capabilities_csv); + println!("Supported capabilities: {:?}", supported_capabilities); // File let path = matches.value_of("WASM").expect("Error parsing file name"); @@ -48,7 +49,7 @@ pub fn main() { file.read_to_end(&mut wasm).unwrap(); // Check wasm - check_wasm(&wasm, &supported_features).unwrap(); + check_wasm(&wasm, &supported_capabilities).unwrap(); // Compile module compile(&wasm, None, &[]).unwrap(); diff --git a/packages/vm/examples/multi_threaded_cache.rs b/packages/vm/examples/multi_threaded_cache.rs index 7c1375f82..acf5b5326 100644 --- a/packages/vm/examples/multi_threaded_cache.rs +++ b/packages/vm/examples/multi_threaded_cache.rs @@ -5,7 +5,8 @@ use tempfile::TempDir; use cosmwasm_std::{coins, Empty}; use cosmwasm_vm::testing::{mock_backend, mock_env, mock_info, MockApi, MockQuerier, MockStorage}; use cosmwasm_vm::{ - call_execute, call_instantiate, features_from_csv, Cache, CacheOptions, InstanceOptions, Size, + call_execute, call_instantiate, capabilities_from_csv, Cache, CacheOptions, InstanceOptions, + Size, }; // Instance @@ -27,7 +28,7 @@ const THREADS: usize = SAVE_WASM_THREADS + INSTANTIATION_THREADS; pub fn main() { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: features_from_csv("iterator,staking"), + supported_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index da65e90d8..c99109a05 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -9,7 +9,7 @@ use crate::backend::{Backend, BackendApi, Querier, Storage}; use crate::checksum::Checksum; use crate::compatibility::check_wasm; use crate::errors::{VmError, VmResult}; -use crate::features::required_features_from_module; +use crate::features::required_capabilities_from_module; use crate::instance::{Instance, InstanceOptions}; use crate::modules::{FileSystemCache, InMemoryCache, PinnedMemoryCache}; use crate::size::Size; @@ -44,7 +44,7 @@ pub struct Metrics { #[derive(Clone, Debug)] pub struct CacheOptions { pub base_dir: PathBuf, - pub supported_features: HashSet, + pub supported_capabilities: HashSet, pub memory_cache_size: Size, /// Memory limit for instances, in bytes. Use a value that is divisible by the Wasm page size 65536, /// e.g. full MiBs. @@ -63,9 +63,9 @@ pub struct CacheInner { } pub struct Cache { - /// Supported features are immutable for the lifetime of the cache, + /// Supported capabilities are immutable for the lifetime of the cache, /// i.e. any number of read-only references is allowed to access it concurrently. - supported_features: HashSet, + supported_capabilities: HashSet, inner: Mutex, // Those two don't store data but only fix type information type_api: PhantomData, @@ -78,7 +78,7 @@ pub struct Cache { #[derive(PartialEq, Eq, Debug)] pub struct AnalysisReport { pub has_ibc_entry_points: bool, - pub required_features: HashSet, + pub required_capabilities: HashSet, } impl Cache @@ -97,7 +97,7 @@ where pub unsafe fn new(options: CacheOptions) -> VmResult { let CacheOptions { base_dir, - supported_features, + supported_capabilities, memory_cache_size, instance_memory_limit, } = options; @@ -121,7 +121,7 @@ where let fs_cache = FileSystemCache::new(cache_path.join(MODULES_DIR)) .map_err(|e| VmError::cache_err(format!("Error file system cache: {}", e)))?; Ok(Cache { - supported_features, + supported_capabilities, inner: Mutex::new(CacheInner { wasm_path, instance_memory_limit, @@ -153,7 +153,7 @@ where } pub fn save_wasm(&self, wasm: &[u8]) -> VmResult { - check_wasm(wasm, &self.supported_features)?; + check_wasm(wasm, &self.supported_capabilities)?; let module = compile(wasm, None, &[])?; let mut cache = self.inner.lock().unwrap(); @@ -191,7 +191,7 @@ where let module = deserialize_wasm(&wasm)?; Ok(AnalysisReport { has_ibc_entry_points: has_ibc_entry_points(&module), - required_features: required_features_from_module(&module), + required_capabilities: required_capabilities_from_module(&module), }) } @@ -370,7 +370,7 @@ mod tests { use super::*; use crate::calls::{call_execute, call_instantiate}; use crate::errors::VmError; - use crate::features::features_from_csv; + use crate::features::capabilities_from_csv; use crate::testing::{mock_backend, mock_env, mock_info, MockApi, MockQuerier, MockStorage}; use cosmwasm_std::{coins, Empty}; use std::fs::OpenOptions; @@ -388,25 +388,25 @@ mod tests { static CONTRACT: &[u8] = include_bytes!("../testdata/hackatom.wasm"); static IBC_CONTRACT: &[u8] = include_bytes!("../testdata/ibc_reflect.wasm"); - fn default_features() -> HashSet { - features_from_csv("iterator,staking") + fn default_capabilities() -> HashSet { + capabilities_from_csv("iterator,staking") } fn make_testing_options() -> CacheOptions { CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: default_features(), + supported_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, } } fn make_stargate_testing_options() -> CacheOptions { - let mut feature = default_features(); - feature.insert("stargate".into()); + let mut capabilities = default_capabilities(); + capabilities.insert("stargate".into()); CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_features: feature, + supported_capabilities: capabilities, memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, } @@ -489,7 +489,7 @@ mod tests { { let options1 = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_features: default_features(), + supported_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; @@ -501,7 +501,7 @@ mod tests { { let options2 = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_features: default_features(), + supported_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; @@ -535,7 +535,7 @@ mod tests { let tmp_dir = TempDir::new().unwrap(); let options = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_features: default_features(), + supported_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; @@ -986,7 +986,7 @@ mod tests { report1, AnalysisReport { has_ibc_entry_points: false, - required_features: HashSet::new(), + required_capabilities: HashSet::new(), } ); @@ -996,7 +996,7 @@ mod tests { report2, AnalysisReport { has_ibc_entry_points: true, - required_features: HashSet::from_iter(vec![ + required_capabilities: HashSet::from_iter(vec![ "iterator".to_string(), "staking".to_string(), "stargate".to_string() diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index f8c894ac1..c774ba5e8 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -3,7 +3,7 @@ use std::collections::BTreeSet; use std::collections::HashSet; use crate::errors::{VmError, VmResult}; -use crate::features::required_features_from_module; +use crate::features::required_capabilities_from_module; use crate::limited::LimitedDisplay; use crate::static_analysis::{deserialize_wasm, ExportInfo}; @@ -51,13 +51,13 @@ const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &[ const MEMORY_LIMIT: u32 = 512; // in pages /// Checks if the data is valid wasm and compatibility with the CosmWasm API (imports and exports) -pub fn check_wasm(wasm_code: &[u8], supported_features: &HashSet) -> VmResult<()> { +pub fn check_wasm(wasm_code: &[u8], supported_capabilities: &HashSet) -> VmResult<()> { let module = deserialize_wasm(wasm_code)?; check_wasm_memories(&module)?; check_interface_version(&module)?; check_wasm_exports(&module)?; check_wasm_imports(&module, SUPPORTED_IMPORTS)?; - check_wasm_features(&module, supported_features)?; + check_wasm_capabilities(&module, supported_capabilities)?; Ok(()) } @@ -174,13 +174,18 @@ fn full_import_name(ie: &ImportEntry) -> String { format!("{}.{}", ie.module(), ie.field()) } -fn check_wasm_features(module: &Module, supported_features: &HashSet) -> VmResult<()> { - let required_features = required_features_from_module(module); - if !required_features.is_subset(supported_features) { +fn check_wasm_capabilities( + module: &Module, + supported_capabilities: &HashSet, +) -> VmResult<()> { + let required_capabilities = required_capabilities_from_module(module); + if !required_capabilities.is_subset(supported_capabilities) { // We switch to BTreeSet to get a sorted error message - let unsupported: BTreeSet<_> = required_features.difference(supported_features).collect(); + let unsupported: BTreeSet<_> = required_capabilities + .difference(supported_capabilities) + .collect(); return Err(VmError::static_validation_err(format!( - "Wasm contract requires unsupported features: {}", + "Wasm contract requires unsupported capabilities: {}", unsupported.to_string_limited(200) ))); } @@ -198,19 +203,19 @@ mod tests { static CONTRACT_0_15: &[u8] = include_bytes!("../testdata/hackatom_0.15.wasm"); static CONTRACT: &[u8] = include_bytes!("../testdata/hackatom.wasm"); - fn default_features() -> HashSet { - ["staking".to_string()].iter().cloned().collect() + fn default_capabilities() -> HashSet { + ["staking".to_string()].into_iter().collect() } #[test] fn check_wasm_passes_for_latest_contract() { // this is our reference check, must pass - check_wasm(CONTRACT, &default_features()).unwrap(); + check_wasm(CONTRACT, &default_capabilities()).unwrap(); } #[test] fn check_wasm_old_contract() { - match check_wasm(CONTRACT_0_15, &default_features()) { + match check_wasm(CONTRACT_0_15, &default_capabilities()) { Err(VmError::StaticValidationErr { msg, .. }) => assert_eq!( msg, "Wasm contract has unknown interface_version_* marker export (see https://github.com/CosmWasm/cosmwasm/blob/main/packages/vm/README.md)" @@ -219,7 +224,7 @@ mod tests { Ok(_) => panic!("This must not succeeed"), }; - match check_wasm(CONTRACT_0_14, &default_features()) { + match check_wasm(CONTRACT_0_14, &default_capabilities()) { Err(VmError::StaticValidationErr { msg, .. }) => assert_eq!( msg, "Wasm contract has unknown interface_version_* marker export (see https://github.com/CosmWasm/cosmwasm/blob/main/packages/vm/README.md)" @@ -228,7 +233,7 @@ mod tests { Ok(_) => panic!("This must not succeeed"), }; - match check_wasm(CONTRACT_0_12, &default_features()) { + match check_wasm(CONTRACT_0_12, &default_capabilities()) { Err(VmError::StaticValidationErr { msg, .. }) => assert_eq!( msg, "Wasm contract missing a required marker export: interface_version_*" @@ -237,7 +242,7 @@ mod tests { Ok(_) => panic!("This must not succeeed"), }; - match check_wasm(CONTRACT_0_7, &default_features()) { + match check_wasm(CONTRACT_0_7, &default_capabilities()) { Err(VmError::StaticValidationErr { msg, .. }) => assert_eq!( msg, "Wasm contract missing a required marker export: interface_version_*" @@ -626,7 +631,7 @@ mod tests { } #[test] - fn check_wasm_features_ok() { + fn check_wasm_capabilities_ok() { let wasm = wat::parse_str( r#"(module (type (func)) @@ -650,11 +655,11 @@ mod tests { .iter() .cloned() .collect(); - check_wasm_features(&module, &supported).unwrap(); + check_wasm_capabilities(&module, &supported).unwrap(); } #[test] - fn check_wasm_features_fails_for_missing() { + fn check_wasm_capabilities_fails_for_missing() { let wasm = wat::parse_str( r#"(module (type (func)) @@ -679,10 +684,10 @@ mod tests { .iter() .cloned() .collect(); - match check_wasm_features(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &supported).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported features: {\"sun\"}" + "Wasm contract requires unsupported capabilities: {\"sun\"}" ), _ => panic!("Got unexpected error"), } @@ -691,35 +696,35 @@ mod tests { let supported = [ "nutrients".to_string(), "freedom".to_string(), - "Water".to_string(), // features are case sensitive (and lowercase by convention) + "Water".to_string(), // capabilities are case sensitive (and lowercase by convention) ] .iter() .cloned() .collect(); - match check_wasm_features(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &supported).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported features: {\"sun\", \"water\"}" + "Wasm contract requires unsupported capabilities: {\"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } // Support set 3 let supported = ["freedom".to_string()].iter().cloned().collect(); - match check_wasm_features(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &supported).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported features: {\"nutrients\", \"sun\", \"water\"}" + "Wasm contract requires unsupported capabilities: {\"nutrients\", \"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } // Support set 4 let supported = [].iter().cloned().collect(); - match check_wasm_features(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &supported).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported features: {\"nutrients\", \"sun\", \"water\"}" + "Wasm contract requires unsupported capabilities: {\"nutrients\", \"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } diff --git a/packages/vm/src/features.rs b/packages/vm/src/features.rs index 4de16d0c9..85dabe9c9 100644 --- a/packages/vm/src/features.rs +++ b/packages/vm/src/features.rs @@ -4,9 +4,9 @@ use crate::static_analysis::ExportInfo; const REQUIRES_PREFIX: &str = "requires_"; -/// Takes a comma-separated string, splits it by commas, removes empty elements and returns a set of features. +/// Takes a comma-separated string, splits it by commas, removes empty elements and returns a set of capabilities. /// This can be used e.g. to initialize the cache. -pub fn features_from_csv(csv: &str) -> HashSet { +pub fn capabilities_from_csv(csv: &str) -> HashSet { csv.split(',') .map(|x| x.trim().to_string()) .filter(|f| !f.is_empty()) @@ -15,14 +15,14 @@ pub fn features_from_csv(csv: &str) -> HashSet { /// Implementation for check_wasm, based on static analysis of the bytecode. /// This is used for code upload, to perform check before compiling the Wasm. -pub fn required_features_from_module(module: &impl ExportInfo) -> HashSet { +pub fn required_capabilities_from_module(module: &impl ExportInfo) -> HashSet { module .exported_function_names(Some(REQUIRES_PREFIX)) .into_iter() .filter_map(|name| { if name.len() > REQUIRES_PREFIX.len() { - let (_, required_feature) = name.split_at(REQUIRES_PREFIX.len()); - Some(required_feature.to_string()) + let (_, required_capability) = name.split_at(REQUIRES_PREFIX.len()); + Some(required_capability.to_string()) } else { None } @@ -36,8 +36,8 @@ mod tests { use crate::static_analysis::deserialize_wasm; #[test] - fn features_from_csv_works() { - let set = features_from_csv("foo, bar,baz "); + fn capabilities_from_csv_works() { + let set = capabilities_from_csv("foo, bar,baz "); assert_eq!(set.len(), 3); assert!(set.contains("foo")); assert!(set.contains("bar")); @@ -45,21 +45,21 @@ mod tests { } #[test] - fn features_from_csv_skips_empty() { - let set = features_from_csv(""); + fn capabilities_from_csv_skips_empty() { + let set = capabilities_from_csv(""); assert_eq!(set.len(), 0); - let set = features_from_csv("a,,b"); + let set = capabilities_from_csv("a,,b"); assert_eq!(set.len(), 2); assert!(set.contains("a")); assert!(set.contains("b")); - let set = features_from_csv("a,b,"); + let set = capabilities_from_csv("a,b,"); assert_eq!(set.len(), 2); assert!(set.contains("a")); assert!(set.contains("b")); } #[test] - fn required_features_from_module_works() { + fn required_capabilities_from_module_works() { let wasm = wat::parse_str( r#"(module (type (func)) @@ -75,18 +75,18 @@ mod tests { .unwrap(); let module = deserialize_wasm(&wasm).unwrap(); - let required_features = required_features_from_module(&module); - assert_eq!(required_features.len(), 3); - assert!(required_features.contains("nutrients")); - assert!(required_features.contains("sun")); - assert!(required_features.contains("water")); + let required_capabilities = required_capabilities_from_module(&module); + assert_eq!(required_capabilities.len(), 3); + assert!(required_capabilities.contains("nutrients")); + assert!(required_capabilities.contains("sun")); + assert!(required_capabilities.contains("water")); } #[test] - fn required_features_from_module_works_without_exports_section() { + fn required_capabilities_from_module_works_without_exports_section() { let wasm = wat::parse_str(r#"(module)"#).unwrap(); let module = deserialize_wasm(&wasm).unwrap(); - let required_features = required_features_from_module(&module); - assert_eq!(required_features.len(), 0); + let required_capabilities = required_capabilities_from_module(&module); + assert_eq!(required_capabilities.len(), 0); } } diff --git a/packages/vm/src/instance.rs b/packages/vm/src/instance.rs index c507b055e..86684be48 100644 --- a/packages/vm/src/instance.rs +++ b/packages/vm/src/instance.rs @@ -8,7 +8,7 @@ use crate::backend::{Backend, BackendApi, Querier, Storage}; use crate::conversion::{ref_to_u32, to_u32}; use crate::environment::Environment; use crate::errors::{CommunicationError, VmError, VmResult}; -use crate::features::required_features_from_module; +use crate::features::required_capabilities_from_module; use crate::imports::{ do_abort, do_addr_canonicalize, do_addr_humanize, do_addr_validate, do_db_read, do_db_remove, do_db_write, do_debug, do_ed25519_batch_verify, do_ed25519_verify, do_query_chain, @@ -269,8 +269,8 @@ where /// This is not needed for production because we can do static analysis /// on the Wasm file before instatiation to obtain this information. It's /// only kept because it can be handy for integration testing. - pub fn required_features(&self) -> HashSet { - required_features_from_module(self._inner.module()) + pub fn required_capabilities(&self) -> HashSet { + required_capabilities_from_module(self._inner.module()) } /// Returns the size of the default memory in pages. @@ -406,16 +406,16 @@ mod tests { static CONTRACT: &[u8] = include_bytes!("../testdata/hackatom.wasm"); #[test] - fn required_features_works() { + fn required_capabilities_works() { let backend = mock_backend(&[]); let (instance_options, memory_limit) = mock_instance_options(); let instance = Instance::from_code(CONTRACT, backend, instance_options, memory_limit).unwrap(); - assert_eq!(instance.required_features().len(), 0); + assert_eq!(instance.required_capabilities().len(), 0); } #[test] - fn required_features_works_for_many_exports() { + fn required_capabilities_works_for_many_exports() { let wasm = wat::parse_str( r#"(module (type (func)) @@ -433,10 +433,10 @@ mod tests { let backend = mock_backend(&[]); let (instance_options, memory_limit) = mock_instance_options(); let instance = Instance::from_code(&wasm, backend, instance_options, memory_limit).unwrap(); - assert_eq!(instance.required_features().len(), 3); - assert!(instance.required_features().contains("nutrients")); - assert!(instance.required_features().contains("sun")); - assert!(instance.required_features().contains("water")); + assert_eq!(instance.required_capabilities().len(), 3); + assert!(instance.required_capabilities().contains("nutrients")); + assert!(instance.required_capabilities().contains("sun")); + assert!(instance.required_capabilities().contains("water")); } #[test] diff --git a/packages/vm/src/lib.rs b/packages/vm/src/lib.rs index 4fccca3ee..d5166e2c3 100644 --- a/packages/vm/src/lib.rs +++ b/packages/vm/src/lib.rs @@ -42,7 +42,7 @@ pub use crate::errors::{ CommunicationError, CommunicationResult, RegionValidationError, RegionValidationResult, VmError, VmResult, }; -pub use crate::features::features_from_csv; +pub use crate::features::capabilities_from_csv; pub use crate::instance::{GasReport, Instance, InstanceOptions}; pub use crate::serde::{from_slice, to_vec}; pub use crate::size::Size; diff --git a/packages/vm/src/testing/instance.rs b/packages/vm/src/testing/instance.rs index 2bba244ee..22f9eaaf2 100644 --- a/packages/vm/src/testing/instance.rs +++ b/packages/vm/src/testing/instance.rs @@ -5,7 +5,7 @@ use cosmwasm_std::Coin; use std::collections::HashSet; use crate::compatibility::check_wasm; -use crate::features::features_from_csv; +use crate::features::capabilities_from_csv; use crate::instance::{Instance, InstanceOptions}; use crate::size::Size; use crate::{Backend, BackendApi, Querier, Storage}; @@ -85,7 +85,7 @@ pub struct MockInstanceOptions<'a> { pub backend_error: Option<&'static str>, // instance - pub supported_features: HashSet, + pub supported_capabilities: HashSet, pub gas_limit: u64, pub print_debug: bool, /// Memory limit in bytes. Use a value that is divisible by the Wasm page size 65536, e.g. full MiBs. @@ -93,9 +93,9 @@ pub struct MockInstanceOptions<'a> { } impl MockInstanceOptions<'_> { - fn default_features() -> HashSet { + fn default_capabilities() -> HashSet { #[allow(unused_mut)] - let mut out = features_from_csv("iterator,staking"); + let mut out = capabilities_from_csv("iterator,staking"); #[cfg(feature = "stargate")] out.insert("stargate".to_string()); out @@ -111,7 +111,7 @@ impl Default for MockInstanceOptions<'_> { backend_error: None, // instance - supported_features: Self::default_features(), + supported_capabilities: Self::default_capabilities(), gas_limit: DEFAULT_GAS_LIMIT, print_debug: DEFAULT_PRINT_DEBUG, memory_limit: DEFAULT_MEMORY_LIMIT, @@ -123,7 +123,7 @@ pub fn mock_instance_with_options( wasm: &[u8], options: MockInstanceOptions, ) -> Instance { - check_wasm(wasm, &options.supported_features).unwrap(); + check_wasm(wasm, &options.supported_capabilities).unwrap(); let contract_address = MOCK_CONTRACT_ADDR; // merge balances From a6fb0a7022cd1265de83168f9571e8c5944a246b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 16 Aug 2022 12:31:15 +0200 Subject: [PATCH 165/344] Rename module features -> capabilities --- packages/vm/src/cache.rs | 4 ++-- packages/vm/src/{features.rs => capabilities.rs} | 0 packages/vm/src/compatibility.rs | 2 +- packages/vm/src/instance.rs | 2 +- packages/vm/src/lib.rs | 4 ++-- packages/vm/src/testing/instance.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename packages/vm/src/{features.rs => capabilities.rs} (100%) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index c99109a05..091036d47 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -6,10 +6,10 @@ use std::path::{Path, PathBuf}; use std::sync::Mutex; use crate::backend::{Backend, BackendApi, Querier, Storage}; +use crate::capabilities::required_capabilities_from_module; use crate::checksum::Checksum; use crate::compatibility::check_wasm; use crate::errors::{VmError, VmResult}; -use crate::features::required_capabilities_from_module; use crate::instance::{Instance, InstanceOptions}; use crate::modules::{FileSystemCache, InMemoryCache, PinnedMemoryCache}; use crate::size::Size; @@ -369,8 +369,8 @@ fn load_wasm_from_disk(dir: impl Into, checksum: &Checksum) -> VmResult mod tests { use super::*; use crate::calls::{call_execute, call_instantiate}; + use crate::capabilities::capabilities_from_csv; use crate::errors::VmError; - use crate::features::capabilities_from_csv; use crate::testing::{mock_backend, mock_env, mock_info, MockApi, MockQuerier, MockStorage}; use cosmwasm_std::{coins, Empty}; use std::fs::OpenOptions; diff --git a/packages/vm/src/features.rs b/packages/vm/src/capabilities.rs similarity index 100% rename from packages/vm/src/features.rs rename to packages/vm/src/capabilities.rs diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index c774ba5e8..f1e615571 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -2,8 +2,8 @@ use parity_wasm::elements::{External, ImportEntry, Module}; use std::collections::BTreeSet; use std::collections::HashSet; +use crate::capabilities::required_capabilities_from_module; use crate::errors::{VmError, VmResult}; -use crate::features::required_capabilities_from_module; use crate::limited::LimitedDisplay; use crate::static_analysis::{deserialize_wasm, ExportInfo}; diff --git a/packages/vm/src/instance.rs b/packages/vm/src/instance.rs index 86684be48..20b9bf953 100644 --- a/packages/vm/src/instance.rs +++ b/packages/vm/src/instance.rs @@ -5,10 +5,10 @@ use std::sync::Mutex; use wasmer::{Exports, Function, ImportObject, Instance as WasmerInstance, Module, Val}; use crate::backend::{Backend, BackendApi, Querier, Storage}; +use crate::capabilities::required_capabilities_from_module; use crate::conversion::{ref_to_u32, to_u32}; use crate::environment::Environment; use crate::errors::{CommunicationError, VmError, VmResult}; -use crate::features::required_capabilities_from_module; use crate::imports::{ do_abort, do_addr_canonicalize, do_addr_humanize, do_addr_validate, do_db_read, do_db_remove, do_db_write, do_debug, do_ed25519_batch_verify, do_ed25519_verify, do_query_chain, diff --git a/packages/vm/src/lib.rs b/packages/vm/src/lib.rs index d5166e2c3..37713763f 100644 --- a/packages/vm/src/lib.rs +++ b/packages/vm/src/lib.rs @@ -3,12 +3,12 @@ mod backend; mod cache; mod calls; +mod capabilities; mod checksum; mod compatibility; mod conversion; mod environment; mod errors; -mod features; mod imports; mod instance; mod limited; @@ -37,12 +37,12 @@ pub use crate::calls::{ call_ibc_packet_ack, call_ibc_packet_ack_raw, call_ibc_packet_receive, call_ibc_packet_receive_raw, call_ibc_packet_timeout, call_ibc_packet_timeout_raw, }; +pub use crate::capabilities::capabilities_from_csv; pub use crate::checksum::Checksum; pub use crate::errors::{ CommunicationError, CommunicationResult, RegionValidationError, RegionValidationResult, VmError, VmResult, }; -pub use crate::features::capabilities_from_csv; pub use crate::instance::{GasReport, Instance, InstanceOptions}; pub use crate::serde::{from_slice, to_vec}; pub use crate::size::Size; diff --git a/packages/vm/src/testing/instance.rs b/packages/vm/src/testing/instance.rs index 22f9eaaf2..d4395cdd6 100644 --- a/packages/vm/src/testing/instance.rs +++ b/packages/vm/src/testing/instance.rs @@ -4,8 +4,8 @@ use cosmwasm_std::Coin; use std::collections::HashSet; +use crate::capabilities::capabilities_from_csv; use crate::compatibility::check_wasm; -use crate::features::capabilities_from_csv; use crate::instance::{Instance, InstanceOptions}; use crate::size::Size; use crate::{Backend, BackendApi, Querier, Storage}; From a4b4ab77f4d1c94186fb7a35a3adbfd9ab173855 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 17 Aug 2022 10:36:00 +0200 Subject: [PATCH 166/344] Change text of Features -> Capabilities --- docs/{FEATURES.md => CAPABILITIES.md} | 64 +++++++++++++++------------ 1 file changed, 36 insertions(+), 28 deletions(-) rename docs/{FEATURES.md => CAPABILITIES.md} (51%) diff --git a/docs/FEATURES.md b/docs/CAPABILITIES.md similarity index 51% rename from docs/FEATURES.md rename to docs/CAPABILITIES.md index 26b7ef4f1..70cc3021b 100644 --- a/docs/FEATURES.md +++ b/docs/CAPABILITIES.md @@ -1,25 +1,29 @@ -# Features +# Capabilities -Features are a mechanism to negotiate functionality between a contract and an -environment (i.e. the chain that embeds cosmwasm-vm/[wasmvm]) in a very -primitive way. The contract defines required features. The environment defines -supported features. If the required features are all supported, the contract can -be used. Doing this check when the contract is first stored ensures missing -features are detected early and not when a user tries to execute a certain code -path. +Capabilities are a mechanism to negotiate functionality between a contract and +an environment (i.e. the chain that embeds cosmwasm-vm/[wasmvm]) in a very +primitive way. The contract defines required capabilities. The environment +defines it's capabilities. If the required capabilities are all available, the +contract can be used. Doing this check when the contract is first stored ensures +missing capabilities are detected early and not when a user tries to execute a +certain code path. -## Disambiguation +## Origin and Disambiguation -This document is about app level features in the CosmWasm VM. Features should -not be confused with Cargo's build system features, even when connected. -Features can be implemented in any language that compiles to Wasm. +Before August 2022, we had two types of "features": app level features in the +CosmWasm VM and Cargo's build system features. In order to avoid the confusion, +the former have been renamed to capabilities. -## Required features +Capabilities can be implemented in any language that compiles to Wasm whereas +features are Rust build system specific. -The contract defines required features using a marker export function that takes -no arguments and returns no value. The name of the export needs to start with -"requires\_" followed by the name of the feature. Do yourself a favor and keep -the name all lower ASCII alphanumerical. +## Required capabilities + +The contract defines required capabilities using marker export functions that +take no arguments and return no value. The name of the export needs to start +with "requires\_" followed by the name of the capability. When creating a new +capability, do yourself a favor and keep the name all lower ASCII +alphanumerical. An example of such markers in cosmwasm-std are those: @@ -51,15 +55,15 @@ which in Wasm compile to this: (type (;12;) (func)) ``` -As mentioned above, the Cargo features are independent of the features we talk -about and it is perfectly fine to have a requires\_\* export that is +As mentioned above, the Cargo features are independent of the capabilities we +talk about and it is perfectly fine to have a requires\_\* export that is unconditional in a library or a contract. The marker export functions can be executed, but the VM does not require such a call to succeed. So a contract can use no-op implementation or crashing implementation. -## Supported features +## Available capabilities An instance of the main `Cache` has `supported_capabilities` in its `CacheOptions`. This value is set in the caller, such as @@ -67,15 +71,15 @@ An instance of the main `Cache` has `supported_capabilities` in its and [here](https://github.com/CosmWasm/wasmvm/blob/v1.0.0-rc.0/libwasmvm/src/cache.rs#L62). `capabilities_from_csv` takes a comma separated list and returns a set of -features. This features list is set +capabilities. This capabilities list is set [in keeper.go](https://github.com/CosmWasm/wasmd/blob/v0.27.0-rc0/x/wasm/keeper/keeper.go#L100) and [in app.go](https://github.com/CosmWasm/wasmd/blob/v0.27.0-rc0/app/app.go#L475-L496). -## Common features +## Common capabilities -Here is a list of features created in the past. Since features can be created -between contract and environment, we don't know them all in the VM. +Here is a list of capabilities created in the past. Since capabilities can be +created between contract and environment, we don't know them all in the VM. - `iterator` is for storage backends that allow range queries. Not all types of databases do that. There are trees that don't allow it and Secret Network does @@ -85,13 +89,17 @@ between contract and environment, we don't know them all in the VM. - `staking` is for chains with the Cosmos SDK staking module. There are Cosmos chains that don't use this (e.g. Tgrade). -## What's a good feature? +## What's a good capability? + +A good capability makes sense to be disabled. The examples above explain why the +capability is not present in some environments. -A good feature makes sense to be disabled. The examples above explain why the -feature is not present in some environments. +Also when the environment adds new functionality in a way that does not break +existing contracts (such as new queries), capabilities can be used to ensure the +contract checks the availability early on. When functionality is always present in the VM (such as a new import implemented -directly in the VM, see [#1299]), we should not use features. They just create +directly in the VM, see [#1299]), we should not use capability. They just create fragmentation in the CosmWasm ecosystem and increase the barrier for adoption. Instead the `check_wasm_imports` check is used to validate this when the contract is stored. From 8efbeda195f50c05f73f15a5fc98a77b2dfd27b9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 17 Aug 2022 10:37:27 +0200 Subject: [PATCH 167/344] Add back FEATURES.md --- docs/FEATURES.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/FEATURES.md diff --git a/docs/FEATURES.md b/docs/FEATURES.md new file mode 100644 index 000000000..fcd39a53e --- /dev/null +++ b/docs/FEATURES.md @@ -0,0 +1,2 @@ +Features have been renamed to capabilities. See +[CAPABILITIES.md](./CAPABILITIES.md) in the same folder. From f1107134bf2cf54dd2ab8bdcd9f83592a7a8259b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 17 Aug 2022 10:47:30 +0200 Subject: [PATCH 168/344] Rename supported_capabilities to available_capabilities --- CHANGELOG.md | 4 +- docs/CAPABILITIES.md | 2 +- packages/vm/benches/main.rs | 6 +-- packages/vm/examples/check_contract.rs | 20 ++++---- packages/vm/examples/multi_threaded_cache.rs | 2 +- packages/vm/src/cache.rs | 22 ++++----- packages/vm/src/compatibility.rs | 52 ++++++++++---------- packages/vm/src/testing/instance.rs | 6 +-- 8 files changed, 57 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86f1d04c4..a1f25ea5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,9 +39,9 @@ and this project adheres to - cosmwasm-vm: Rename features to capabilities, including 1. `features_from_csv` to `capabilities_from_csv`; 2. `CacheOptions::supported_features` to - `CacheOptions::supported_capabilities`; + `CacheOptions::available_capabilities`; 3. `MockInstanceOptions::supported_features` to - `MockInstanceOptions::supported_capabilities` + `MockInstanceOptions::available_capabilities` 4. `Instance::required_features` to `Instance::required_capabilities` 5. `AnalysisReport::required_features` to `AnalysisReport::required_capabilities`. diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 70cc3021b..fdd10c702 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -65,7 +65,7 @@ implementation. ## Available capabilities -An instance of the main `Cache` has `supported_capabilities` in its +An instance of the main `Cache` has `available_capabilities` in its `CacheOptions`. This value is set in the caller, such as [here](https://github.com/CosmWasm/wasmvm/blob/v1.0.0-rc.0/libwasmvm/src/cache.rs#L75) and diff --git a/packages/vm/benches/main.rs b/packages/vm/benches/main.rs index 55bf1d35a..970a1ca9c 100644 --- a/packages/vm/benches/main.rs +++ b/packages/vm/benches/main.rs @@ -123,7 +123,7 @@ fn bench_cache(c: &mut Criterion) { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: capabilities_from_csv("iterator,staking"), + available_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; @@ -163,7 +163,7 @@ fn bench_cache(c: &mut Criterion) { group.bench_function("instantiate from fs", |b| { let non_memcache = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: capabilities_from_csv("iterator,staking"), + available_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: Size(0), instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; @@ -229,7 +229,7 @@ pub fn bench_instance_threads(c: &mut Criterion) { c.bench_function("multi-threaded get_instance", |b| { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: capabilities_from_csv("iterator,staking"), + available_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; diff --git a/packages/vm/examples/check_contract.rs b/packages/vm/examples/check_contract.rs index eff563cc0..4ac4121b9 100644 --- a/packages/vm/examples/check_contract.rs +++ b/packages/vm/examples/check_contract.rs @@ -6,7 +6,7 @@ use clap::{App, Arg}; use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; -const DEFAULT_SUPPORTED_CAPABILITIES: &str = "iterator,staking,stargate"; +const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; pub fn main() { eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cw-check-contract` instead."); @@ -14,15 +14,15 @@ pub fn main() { let matches = App::new("Contract checking") .version("0.1.0") - .long_about("Checks the given wasm file (memories, exports, imports, supported capabilities, and non-determinism).") + .long_about("Checks the given wasm file (memories, exports, imports, available capabilities, and non-determinism).") .author("Mauro Lacy ") .arg( Arg::with_name("CAPABILITIES") // `long` setting required to turn the position argument into an option 🤷 - .long("supported-capabilities") + .long("available-capabilities") .aliases(&["FEATURES", "supported-features"]) // Old names .value_name("CAPABILITIES") - .help("Sets the supported capabilities that the desired target chain supports") + .help("Sets the available capabilities that the desired target chain has") .takes_value(true) ) .arg( @@ -33,12 +33,12 @@ pub fn main() { ) .get_matches(); - // Supported capabilities - let supported_capabilities_csv = matches + // Available capabilities + let available_capabilities_csv = matches .value_of("CAPABILITIES") - .unwrap_or(DEFAULT_SUPPORTED_CAPABILITIES); - let supported_capabilities = capabilities_from_csv(supported_capabilities_csv); - println!("Supported capabilities: {:?}", supported_capabilities); + .unwrap_or(DEFAULT_AVAILABLE_CAPABILITIES); + let available_capabilities = capabilities_from_csv(available_capabilities_csv); + println!("Available capabilities: {:?}", available_capabilities); // File let path = matches.value_of("WASM").expect("Error parsing file name"); @@ -49,7 +49,7 @@ pub fn main() { file.read_to_end(&mut wasm).unwrap(); // Check wasm - check_wasm(&wasm, &supported_capabilities).unwrap(); + check_wasm(&wasm, &available_capabilities).unwrap(); // Compile module compile(&wasm, None, &[]).unwrap(); diff --git a/packages/vm/examples/multi_threaded_cache.rs b/packages/vm/examples/multi_threaded_cache.rs index acf5b5326..16053ee92 100644 --- a/packages/vm/examples/multi_threaded_cache.rs +++ b/packages/vm/examples/multi_threaded_cache.rs @@ -28,7 +28,7 @@ const THREADS: usize = SAVE_WASM_THREADS + INSTANTIATION_THREADS; pub fn main() { let options = CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: capabilities_from_csv("iterator,staking"), + available_capabilities: capabilities_from_csv("iterator,staking"), memory_cache_size: MEMORY_CACHE_SIZE, instance_memory_limit: DEFAULT_MEMORY_LIMIT, }; diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 091036d47..af59bbe97 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -44,7 +44,7 @@ pub struct Metrics { #[derive(Clone, Debug)] pub struct CacheOptions { pub base_dir: PathBuf, - pub supported_capabilities: HashSet, + pub available_capabilities: HashSet, pub memory_cache_size: Size, /// Memory limit for instances, in bytes. Use a value that is divisible by the Wasm page size 65536, /// e.g. full MiBs. @@ -63,9 +63,9 @@ pub struct CacheInner { } pub struct Cache { - /// Supported capabilities are immutable for the lifetime of the cache, + /// Available capabilities are immutable for the lifetime of the cache, /// i.e. any number of read-only references is allowed to access it concurrently. - supported_capabilities: HashSet, + available_capabilities: HashSet, inner: Mutex, // Those two don't store data but only fix type information type_api: PhantomData, @@ -97,7 +97,7 @@ where pub unsafe fn new(options: CacheOptions) -> VmResult { let CacheOptions { base_dir, - supported_capabilities, + available_capabilities, memory_cache_size, instance_memory_limit, } = options; @@ -121,7 +121,7 @@ where let fs_cache = FileSystemCache::new(cache_path.join(MODULES_DIR)) .map_err(|e| VmError::cache_err(format!("Error file system cache: {}", e)))?; Ok(Cache { - supported_capabilities, + available_capabilities, inner: Mutex::new(CacheInner { wasm_path, instance_memory_limit, @@ -153,7 +153,7 @@ where } pub fn save_wasm(&self, wasm: &[u8]) -> VmResult { - check_wasm(wasm, &self.supported_capabilities)?; + check_wasm(wasm, &self.available_capabilities)?; let module = compile(wasm, None, &[])?; let mut cache = self.inner.lock().unwrap(); @@ -395,7 +395,7 @@ mod tests { fn make_testing_options() -> CacheOptions { CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: default_capabilities(), + available_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, } @@ -406,7 +406,7 @@ mod tests { capabilities.insert("stargate".into()); CacheOptions { base_dir: TempDir::new().unwrap().into_path(), - supported_capabilities: capabilities, + available_capabilities: capabilities, memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, } @@ -489,7 +489,7 @@ mod tests { { let options1 = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_capabilities: default_capabilities(), + available_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; @@ -501,7 +501,7 @@ mod tests { { let options2 = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_capabilities: default_capabilities(), + available_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; @@ -535,7 +535,7 @@ mod tests { let tmp_dir = TempDir::new().unwrap(); let options = CacheOptions { base_dir: tmp_dir.path().to_path_buf(), - supported_capabilities: default_capabilities(), + available_capabilities: default_capabilities(), memory_cache_size: TESTING_MEMORY_CACHE_SIZE, instance_memory_limit: TESTING_MEMORY_LIMIT, }; diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index f1e615571..c1b847bd9 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -51,13 +51,13 @@ const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &[ const MEMORY_LIMIT: u32 = 512; // in pages /// Checks if the data is valid wasm and compatibility with the CosmWasm API (imports and exports) -pub fn check_wasm(wasm_code: &[u8], supported_capabilities: &HashSet) -> VmResult<()> { +pub fn check_wasm(wasm_code: &[u8], available_capabilities: &HashSet) -> VmResult<()> { let module = deserialize_wasm(wasm_code)?; check_wasm_memories(&module)?; check_interface_version(&module)?; check_wasm_exports(&module)?; check_wasm_imports(&module, SUPPORTED_IMPORTS)?; - check_wasm_capabilities(&module, supported_capabilities)?; + check_wasm_capabilities(&module, available_capabilities)?; Ok(()) } @@ -176,17 +176,17 @@ fn full_import_name(ie: &ImportEntry) -> String { fn check_wasm_capabilities( module: &Module, - supported_capabilities: &HashSet, + available_capabilities: &HashSet, ) -> VmResult<()> { let required_capabilities = required_capabilities_from_module(module); - if !required_capabilities.is_subset(supported_capabilities) { + if !required_capabilities.is_subset(available_capabilities) { // We switch to BTreeSet to get a sorted error message - let unsupported: BTreeSet<_> = required_capabilities - .difference(supported_capabilities) + let unavailable: BTreeSet<_> = required_capabilities + .difference(available_capabilities) .collect(); return Err(VmError::static_validation_err(format!( - "Wasm contract requires unsupported capabilities: {}", - unsupported.to_string_limited(200) + "Wasm contract requires unavailable capabilities: {}", + unavailable.to_string_limited(200) ))); } Ok(()) @@ -646,7 +646,7 @@ mod tests { ) .unwrap(); let module = deserialize_wasm(&wasm).unwrap(); - let supported = [ + let available = [ "water".to_string(), "nutrients".to_string(), "sun".to_string(), @@ -655,7 +655,7 @@ mod tests { .iter() .cloned() .collect(); - check_wasm_capabilities(&module, &supported).unwrap(); + check_wasm_capabilities(&module, &available).unwrap(); } #[test] @@ -675,8 +675,8 @@ mod tests { .unwrap(); let module = deserialize_wasm(&wasm).unwrap(); - // Support set 1 - let supported = [ + // Available set 1 + let available = [ "water".to_string(), "nutrients".to_string(), "freedom".to_string(), @@ -684,16 +684,16 @@ mod tests { .iter() .cloned() .collect(); - match check_wasm_capabilities(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported capabilities: {\"sun\"}" + "Wasm contract requires unavailable capabilities: {\"sun\"}" ), _ => panic!("Got unexpected error"), } - // Support set 2 - let supported = [ + // Available set 2 + let available = [ "nutrients".to_string(), "freedom".to_string(), "Water".to_string(), // capabilities are case sensitive (and lowercase by convention) @@ -701,30 +701,30 @@ mod tests { .iter() .cloned() .collect(); - match check_wasm_capabilities(&module, &supported).unwrap_err() { + match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported capabilities: {\"sun\", \"water\"}" + "Wasm contract requires unavailable capabilities: {\"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } - // Support set 3 - let supported = ["freedom".to_string()].iter().cloned().collect(); - match check_wasm_capabilities(&module, &supported).unwrap_err() { + // Available set 3 + let available = ["freedom".to_string()].iter().cloned().collect(); + match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported capabilities: {\"nutrients\", \"sun\", \"water\"}" + "Wasm contract requires unavailable capabilities: {\"nutrients\", \"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } - // Support set 4 - let supported = [].iter().cloned().collect(); - match check_wasm_capabilities(&module, &supported).unwrap_err() { + // Available set 4 + let available = [].iter().cloned().collect(); + match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, - "Wasm contract requires unsupported capabilities: {\"nutrients\", \"sun\", \"water\"}" + "Wasm contract requires unavailable capabilities: {\"nutrients\", \"sun\", \"water\"}" ), _ => panic!("Got unexpected error"), } diff --git a/packages/vm/src/testing/instance.rs b/packages/vm/src/testing/instance.rs index d4395cdd6..a30030a44 100644 --- a/packages/vm/src/testing/instance.rs +++ b/packages/vm/src/testing/instance.rs @@ -85,7 +85,7 @@ pub struct MockInstanceOptions<'a> { pub backend_error: Option<&'static str>, // instance - pub supported_capabilities: HashSet, + pub available_capabilities: HashSet, pub gas_limit: u64, pub print_debug: bool, /// Memory limit in bytes. Use a value that is divisible by the Wasm page size 65536, e.g. full MiBs. @@ -111,7 +111,7 @@ impl Default for MockInstanceOptions<'_> { backend_error: None, // instance - supported_capabilities: Self::default_capabilities(), + available_capabilities: Self::default_capabilities(), gas_limit: DEFAULT_GAS_LIMIT, print_debug: DEFAULT_PRINT_DEBUG, memory_limit: DEFAULT_MEMORY_LIMIT, @@ -123,7 +123,7 @@ pub fn mock_instance_with_options( wasm: &[u8], options: MockInstanceOptions, ) -> Instance { - check_wasm(wasm, &options.supported_capabilities).unwrap(); + check_wasm(wasm, &options.available_capabilities).unwrap(); let contract_address = MOCK_CONTRACT_ADDR; // merge balances From 0415d2be99c74783357394ca8a4e24716b7e784d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 17 Aug 2022 10:51:55 +0200 Subject: [PATCH 169/344] Replace .iter().cloned() with .into_iter() --- packages/std/src/math/decimal.rs | 2 +- packages/std/src/math/decimal256.rs | 2 +- packages/vm/src/compatibility.rs | 13 +++++-------- packages/vm/src/limited.rs | 9 +++------ 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/std/src/math/decimal.rs b/packages/std/src/math/decimal.rs index 45883adce..72975e22e 100644 --- a/packages/std/src/math/decimal.rs +++ b/packages/std/src/math/decimal.rs @@ -1334,7 +1334,7 @@ mod tests { ]; // The regular std::ops::Mul is our source of truth for these tests. - for (x, y) in test_data.iter().cloned() { + for (x, y) in test_data.into_iter() { assert_eq!(x * y, x.checked_mul(y).unwrap()); } } diff --git a/packages/std/src/math/decimal256.rs b/packages/std/src/math/decimal256.rs index c305f3e24..0c2b134b5 100644 --- a/packages/std/src/math/decimal256.rs +++ b/packages/std/src/math/decimal256.rs @@ -1453,7 +1453,7 @@ mod tests { ]; // The regular std::ops::Mul is our source of truth for these tests. - for (x, y) in test_data.iter().cloned() { + for (x, y) in test_data.into_iter() { assert_eq!(x * y, x.checked_mul(y).unwrap()); } } diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index c1b847bd9..cabd88744 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -652,8 +652,7 @@ mod tests { "sun".to_string(), "freedom".to_string(), ] - .iter() - .cloned() + .into_iter() .collect(); check_wasm_capabilities(&module, &available).unwrap(); } @@ -681,8 +680,7 @@ mod tests { "nutrients".to_string(), "freedom".to_string(), ] - .iter() - .cloned() + .into_iter() .collect(); match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( @@ -698,8 +696,7 @@ mod tests { "freedom".to_string(), "Water".to_string(), // capabilities are case sensitive (and lowercase by convention) ] - .iter() - .cloned() + .into_iter() .collect(); match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( @@ -710,7 +707,7 @@ mod tests { } // Available set 3 - let available = ["freedom".to_string()].iter().cloned().collect(); + let available = ["freedom".to_string()].into_iter().collect(); match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, @@ -720,7 +717,7 @@ mod tests { } // Available set 4 - let available = [].iter().cloned().collect(); + let available = [].into_iter().collect(); match check_wasm_capabilities(&module, &available).unwrap_err() { VmError::StaticValidationErr { msg, .. } => assert_eq!( msg, diff --git a/packages/vm/src/limited.rs b/packages/vm/src/limited.rs index 6a05ef850..1475dc471 100644 --- a/packages/vm/src/limited.rs +++ b/packages/vm/src/limited.rs @@ -103,8 +103,7 @@ mod tests { "apple".to_string(), "banana".to_string(), ] - .iter() - .cloned() + .into_iter() .collect(); assert_eq!( fruits.to_string_limited(100), @@ -140,8 +139,7 @@ mod tests { "apple".to_string(), "banana".to_string(), ] - .iter() - .cloned() + .into_iter() .collect(); assert_eq!( fruits.to_string_limited(100), @@ -180,8 +178,7 @@ mod tests { "apple".to_string(), "banana".to_string(), ] - .iter() - .cloned() + .into_iter() .collect(); assert_eq!(fruits.to_string_limited(15), "{... 3 elements}"); } From 7ca6c10702c9b223ffedffaafa039ed1c209fed9 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 13:54:11 +0200 Subject: [PATCH 170/344] Added cw-check-contract to cosmwasm/packages. --- packages/cw-check-contract/Cargo.toml | 13 +++++++ packages/cw-check-contract/README.md | 6 +++ packages/cw-check-contract/src/main.rs | 53 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 packages/cw-check-contract/Cargo.toml create mode 100644 packages/cw-check-contract/README.md create mode 100644 packages/cw-check-contract/src/main.rs diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml new file mode 100644 index 000000000..5a478ff9d --- /dev/null +++ b/packages/cw-check-contract/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "cw-check-contract" +version = "1.0.0" +authors = ["Ethan Frey "] +edition = "2021" +description = "VM bindings to run verify cosmos contracts." +repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-contract" +license = "Apache-2.0" + +[dependencies] +cosmwasm-vm = { path = "../vm" } +cosmwasm-std = { path = "../std" } +clap = "2.33.3" diff --git a/packages/cw-check-contract/README.md b/packages/cw-check-contract/README.md new file mode 100644 index 000000000..27e9f63c8 --- /dev/null +++ b/packages/cw-check-contract/README.md @@ -0,0 +1,6 @@ +# cw-check-contract + +It allows checking if the wasm binary is a proper smart contract ready to upload to the blockchain. + +Install using +cargo install cw-check-contract diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs new file mode 100644 index 000000000..6473e27e3 --- /dev/null +++ b/packages/cw-check-contract/src/main.rs @@ -0,0 +1,53 @@ +use std::fs::File; +use std::io::Read; + +use clap::{App, Arg}; + +use cosmwasm_vm::features_from_csv; +use cosmwasm_vm::internals::{check_wasm, compile}; + +const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; + +pub fn main() { + let matches = App::new("Contract checking") + .version("0.1.0") + .long_about("Checks the given wasm file (memories, exports, imports, supported features, and non-determinism).") + .author("Mauro Lacy ") + .arg( + Arg::with_name("FEATURES") + // `long` setting required to turn the position argument into an option 🤷 + .long("supported-features") + .value_name("FEATURES") + .help("Sets the supported features that the desired target chain supports") + .takes_value(true) + ) + .arg( + Arg::with_name("WASM") + .help("Wasm file to read and compile") + .required(true) + .index(1), + ) + .get_matches(); + + // Supported features + let supported_features_csv = matches + .value_of("FEATURES") + .unwrap_or(DEFAULT_SUPPORTED_FEATURES); + let supported_features = features_from_csv(supported_features_csv); + println!("Supported features: {:?}", supported_features); + + // File + let path = matches.value_of("WASM").expect("Error parsing file name"); + let mut file = File::open(path).unwrap(); + + // Read wasm + let mut wasm = Vec::::new(); + file.read_to_end(&mut wasm).unwrap(); + + // Check wasm + check_wasm(&wasm, &supported_features).unwrap(); + + // Compile module + compile(&wasm, None, &[]).unwrap(); + println!("contract checks passed.") +} From 23ddce9fd8638dea48ab4dc902b8d71590c8a8fb Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 14:12:04 +0200 Subject: [PATCH 171/344] Using local cw-check-contract in config.yml. --- .circleci/config.yml | 2 +- Cargo.lock | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 631e372b1..77cb49398 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1188,7 +1188,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo install cw-check-contract; cw-check_contract ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./target/debug/cw-check-contract ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/Cargo.lock b/Cargo.lock index 6635525a3..82013ccd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,6 +602,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cw-check-contract" +version = "1.0.0" +dependencies = [ + "clap", + "cosmwasm-std", + "cosmwasm-vm", +] + [[package]] name = "darling" version = "0.13.4" From e4f92a9832b7205a82966c3ebeff407877f3682c Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 14:45:00 +0200 Subject: [PATCH 172/344] cw-check-contract CI setup and changelog update. --- .circleci/config.yml | 30 ++++++++++++++++++++++++++- CHANGELOG.md | 2 ++ packages/cw-check-contract/Cargo.toml | 4 ++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 77cb49398..79905a363 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,7 @@ workflows: jobs: - arm64 - package_crypto + - package_cw_check_contract - package_schema - package_schema_derive - package_std @@ -160,6 +161,33 @@ jobs: - target/debug/deps key: cargocache-v2-package_crypto-rust:1.59.0-{{ checksum "Cargo.lock" }} + package_cw_check_contract: + docker: + - image: rust:1.59.0 + steps: + - checkout + - run: + name: Version information + command: rustc --version; cargo --version; rustup --version; rustup target list --installed + - restore_cache: + keys: + - cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + - run: + name: Build + working_directory: ~/project/packages/cw-check-contract + command: cargo build --locked + - run: + name: Run tests + working_directory: ~/project/packages/cw-check-contract + command: cargo test --locked + - save_cache: + paths: + - /usr/local/cargo/registry + - target/debug/.fingerprint + - target/debug/build + - target/debug/deps + key: cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + package_schema: docker: - image: rust:1.59.0 @@ -1188,7 +1216,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./target/debug/cw-check-contract ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo run --bin cw-check-contract ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/CHANGELOG.md b/CHANGELOG.md index 63a616271..b489d373e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ and this project adheres to - cosmwasm-std: Make `Decimal{,256}::DECIMAL_PLACES` a public `u32` value. - cosmwasm-crypto: Bumped `k256` `0.10.4 -> 0.11` and `digest` `0.9 -> 0.10` ([#1374]). +- cosmwasm-vm/check_contract: Copied to cosmwasm/packages. + cosmwasm-vm/check_contract will soon be deprecated. [#1374]: https://github.com/CosmWasm/cosmwasm/pull/1374 diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index 5a478ff9d..b0407d2aa 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -8,6 +8,6 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-c license = "Apache-2.0" [dependencies] -cosmwasm-vm = { path = "../vm" } -cosmwasm-std = { path = "../std" } +cosmwasm-vm = { path = "../vm", version = "1.0.0" } +cosmwasm-std = { path = "../std", version = "1.0.0" } clap = "2.33.3" From e3a6e61690c92ba52f09901c811427c3e90f5189 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 13:54:11 +0200 Subject: [PATCH 173/344] Added cw-check-contract to cosmwasm/packages. --- packages/cw-check-contract/Cargo.toml | 13 +++++++ packages/cw-check-contract/README.md | 6 +++ packages/cw-check-contract/src/main.rs | 53 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 packages/cw-check-contract/Cargo.toml create mode 100644 packages/cw-check-contract/README.md create mode 100644 packages/cw-check-contract/src/main.rs diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml new file mode 100644 index 000000000..5a478ff9d --- /dev/null +++ b/packages/cw-check-contract/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "cw-check-contract" +version = "1.0.0" +authors = ["Ethan Frey "] +edition = "2021" +description = "VM bindings to run verify cosmos contracts." +repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-contract" +license = "Apache-2.0" + +[dependencies] +cosmwasm-vm = { path = "../vm" } +cosmwasm-std = { path = "../std" } +clap = "2.33.3" diff --git a/packages/cw-check-contract/README.md b/packages/cw-check-contract/README.md new file mode 100644 index 000000000..27e9f63c8 --- /dev/null +++ b/packages/cw-check-contract/README.md @@ -0,0 +1,6 @@ +# cw-check-contract + +It allows checking if the wasm binary is a proper smart contract ready to upload to the blockchain. + +Install using +cargo install cw-check-contract diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs new file mode 100644 index 000000000..6473e27e3 --- /dev/null +++ b/packages/cw-check-contract/src/main.rs @@ -0,0 +1,53 @@ +use std::fs::File; +use std::io::Read; + +use clap::{App, Arg}; + +use cosmwasm_vm::features_from_csv; +use cosmwasm_vm::internals::{check_wasm, compile}; + +const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; + +pub fn main() { + let matches = App::new("Contract checking") + .version("0.1.0") + .long_about("Checks the given wasm file (memories, exports, imports, supported features, and non-determinism).") + .author("Mauro Lacy ") + .arg( + Arg::with_name("FEATURES") + // `long` setting required to turn the position argument into an option 🤷 + .long("supported-features") + .value_name("FEATURES") + .help("Sets the supported features that the desired target chain supports") + .takes_value(true) + ) + .arg( + Arg::with_name("WASM") + .help("Wasm file to read and compile") + .required(true) + .index(1), + ) + .get_matches(); + + // Supported features + let supported_features_csv = matches + .value_of("FEATURES") + .unwrap_or(DEFAULT_SUPPORTED_FEATURES); + let supported_features = features_from_csv(supported_features_csv); + println!("Supported features: {:?}", supported_features); + + // File + let path = matches.value_of("WASM").expect("Error parsing file name"); + let mut file = File::open(path).unwrap(); + + // Read wasm + let mut wasm = Vec::::new(); + file.read_to_end(&mut wasm).unwrap(); + + // Check wasm + check_wasm(&wasm, &supported_features).unwrap(); + + // Compile module + compile(&wasm, None, &[]).unwrap(); + println!("contract checks passed.") +} From 380fb43b60eb9f76e6ce370d19c293222af3cc1e Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 14:12:04 +0200 Subject: [PATCH 174/344] Using local cw-check-contract in config.yml. --- .circleci/config.yml | 2 +- Cargo.lock | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff40962b2..8cbd9a576 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1188,7 +1188,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo install cw-check-contract; cw-check_contract ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./target/debug/cw-check-contract ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/Cargo.lock b/Cargo.lock index 6635525a3..82013ccd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,6 +602,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cw-check-contract" +version = "1.0.0" +dependencies = [ + "clap", + "cosmwasm-std", + "cosmwasm-vm", +] + [[package]] name = "darling" version = "0.13.4" From a6a406b79bd7bd247bd26557f664db957b5e26be Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 14:45:00 +0200 Subject: [PATCH 175/344] cw-check-contract CI setup and changelog update. --- .circleci/config.yml | 30 ++++++++++++++++++++++++++- CHANGELOG.md | 2 ++ packages/cw-check-contract/Cargo.toml | 4 ++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8cbd9a576..9bba9e2b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,7 @@ workflows: jobs: - arm64 - package_crypto + - package_cw_check_contract - package_schema - package_schema_derive - package_std @@ -160,6 +161,33 @@ jobs: - target/debug/deps key: cargocache-v2-package_crypto-rust:1.59.0-{{ checksum "Cargo.lock" }} + package_cw_check_contract: + docker: + - image: rust:1.59.0 + steps: + - checkout + - run: + name: Version information + command: rustc --version; cargo --version; rustup --version; rustup target list --installed + - restore_cache: + keys: + - cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + - run: + name: Build + working_directory: ~/project/packages/cw-check-contract + command: cargo build --locked + - run: + name: Run tests + working_directory: ~/project/packages/cw-check-contract + command: cargo test --locked + - save_cache: + paths: + - /usr/local/cargo/registry + - target/debug/.fingerprint + - target/debug/build + - target/debug/deps + key: cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + package_schema: docker: - image: rust:1.59.0 @@ -1188,7 +1216,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; ./target/debug/cw-check-contract ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo run --bin cw-check-contract ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/CHANGELOG.md b/CHANGELOG.md index a1f25ea5d..e8ab7f3c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,8 @@ and this project adheres to 4. `Instance::required_features` to `Instance::required_capabilities` 5. `AnalysisReport::required_features` to `AnalysisReport::required_capabilities`. +- cosmwasm-vm/check_contract: Copied to cosmwasm/packages. + cosmwasm-vm/check_contract will soon be deprecated. [#1374]: https://github.com/CosmWasm/cosmwasm/pull/1374 diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index 5a478ff9d..b0407d2aa 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -8,6 +8,6 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-c license = "Apache-2.0" [dependencies] -cosmwasm-vm = { path = "../vm" } -cosmwasm-std = { path = "../std" } +cosmwasm-vm = { path = "../vm", version = "1.0.0" } +cosmwasm-std = { path = "../std", version = "1.0.0" } clap = "2.33.3" From 167109b8f8c92036e0e93d077511a7f74749de93 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 15:10:04 +0200 Subject: [PATCH 176/344] Using capabilities_from_csv instead of old features. --- packages/cw-check-contract/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index 6473e27e3..d48e2e593 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -3,7 +3,7 @@ use std::io::Read; use clap::{App, Arg}; -use cosmwasm_vm::features_from_csv; +use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; @@ -33,7 +33,7 @@ pub fn main() { let supported_features_csv = matches .value_of("FEATURES") .unwrap_or(DEFAULT_SUPPORTED_FEATURES); - let supported_features = features_from_csv(supported_features_csv); + let supported_features = capabilities_from_csv(supported_features_csv); println!("Supported features: {:?}", supported_features); // File From 9e94a83af664d3779a589d2837b2e57ad43ba9a5 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 15:10:59 +0200 Subject: [PATCH 177/344] Run prettier on README.md --- packages/cw-check-contract/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cw-check-contract/README.md b/packages/cw-check-contract/README.md index 27e9f63c8..f123dcdfc 100644 --- a/packages/cw-check-contract/README.md +++ b/packages/cw-check-contract/README.md @@ -1,6 +1,6 @@ # cw-check-contract -It allows checking if the wasm binary is a proper smart contract ready to upload to the blockchain. +It allows checking if the wasm binary is a proper smart contract ready to upload +to the blockchain. -Install using -cargo install cw-check-contract +Install using cargo install cw-check-contract From 32797b0ea64fd481038c56b21427f13c2984ee78 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 18:39:55 +0200 Subject: [PATCH 178/344] Run check_contract on every wasm file. Instead of passing wildcard to script CI will find every wasm file and run check_contract on it. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bba9e2b8..08ab749b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1216,7 +1216,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; cargo run --bin cw-check-contract ../../artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; find ../../artifacts/ -type f -name "*.wasm" -exec cargo run --bin cw-check-contract {} \; docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub From bf7a7cd4a25624562753b694fbab78d62651e485 Mon Sep 17 00:00:00 2001 From: jawoznia Date: Wed, 17 Aug 2022 19:22:33 +0200 Subject: [PATCH 179/344] Ignore floaty.wasm as it is meant to fail. --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08ab749b0..5ce4fbb06 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1216,7 +1216,8 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; find ../../artifacts/ -type f -name "*.wasm" -exec cargo run --bin cw-check-contract {} \; + /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; \ + find ../../artifacts/ -type f -name "*.wasm" ! -name "floaty.wasm" -exec cargo run --bin cw-check-contract {} \; docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub From 65c3eaf97d008a136e21a310887f73cbcd05e4a9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 22 Aug 2022 09:41:38 +0200 Subject: [PATCH 180/344] Rename features to capabilities in check-contract --- packages/cw-check-contract/src/main.rs | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index d48e2e593..6a99f8c15 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -6,19 +6,20 @@ use clap::{App, Arg}; use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; -const DEFAULT_SUPPORTED_FEATURES: &str = "iterator,staking,stargate"; +const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; pub fn main() { let matches = App::new("Contract checking") .version("0.1.0") - .long_about("Checks the given wasm file (memories, exports, imports, supported features, and non-determinism).") + .long_about("Checks the given wasm file (memories, exports, imports, available capabilities, and non-determinism).") .author("Mauro Lacy ") .arg( - Arg::with_name("FEATURES") + Arg::with_name("CAPABILITIES") // `long` setting required to turn the position argument into an option 🤷 - .long("supported-features") - .value_name("FEATURES") - .help("Sets the supported features that the desired target chain supports") + .long("available-capabilities") + .aliases(&["FEATURES", "supported-features"]) // Old names + .value_name("CAPABILITIES") + .help("Sets the available capabilities that the desired target chain has") .takes_value(true) ) .arg( @@ -29,12 +30,12 @@ pub fn main() { ) .get_matches(); - // Supported features - let supported_features_csv = matches - .value_of("FEATURES") - .unwrap_or(DEFAULT_SUPPORTED_FEATURES); - let supported_features = capabilities_from_csv(supported_features_csv); - println!("Supported features: {:?}", supported_features); + // Available capabilities + let available_capabilities_csv = matches + .value_of("CAPABILITIES") + .unwrap_or(DEFAULT_AVAILABLE_CAPABILITIES); + let available_capabilities = capabilities_from_csv(available_capabilities_csv); + println!("Available capabilities: {:?}", available_capabilities); // File let path = matches.value_of("WASM").expect("Error parsing file name"); @@ -45,7 +46,7 @@ pub fn main() { file.read_to_end(&mut wasm).unwrap(); // Check wasm - check_wasm(&wasm, &supported_features).unwrap(); + check_wasm(&wasm, &available_capabilities).unwrap(); // Compile module compile(&wasm, None, &[]).unwrap(); From 49566fedb04b1c95c80b57e4c032c7527a3595d2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 11:15:28 +0200 Subject: [PATCH 181/344] cosmwasm-check: support multiple wasm blobs --- Cargo.lock | 1 + packages/cw-check-contract/Cargo.toml | 3 ++- packages/cw-check-contract/src/main.rs | 30 ++++++++++++++++++++------ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 82013ccd4..53f32e553 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,6 +606,7 @@ dependencies = [ name = "cw-check-contract" version = "1.0.0" dependencies = [ + "anyhow", "clap", "cosmwasm-std", "cosmwasm-vm", diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index b0407d2aa..592735e1a 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-c license = "Apache-2.0" [dependencies] +anyhow = "1" cosmwasm-vm = { path = "../vm", version = "1.0.0" } cosmwasm-std = { path = "../std", version = "1.0.0" } -clap = "2.33.3" +clap = "2.33" diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index 6a99f8c15..7ba6845fb 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -1,5 +1,7 @@ +use std::collections::HashSet; use std::fs::File; use std::io::Read; +use std::path::Path; use clap::{App, Arg}; @@ -26,7 +28,8 @@ pub fn main() { Arg::with_name("WASM") .help("Wasm file to read and compile") .required(true) - .index(1), + .index(1) + .multiple(true), ) .get_matches(); @@ -38,17 +41,30 @@ pub fn main() { println!("Available capabilities: {:?}", available_capabilities); // File - let path = matches.value_of("WASM").expect("Error parsing file name"); - let mut file = File::open(path).unwrap(); + let paths = matches.values_of("WASM").expect("Error parsing file names"); + + for path in paths { + check_contract(path, &available_capabilities).unwrap(); + } + + println!("contract checks passed.") +} + +fn check_contract( + path: impl AsRef, + available_capabilities: &HashSet, +) -> anyhow::Result<()> { + let mut file = File::open(path)?; // Read wasm let mut wasm = Vec::::new(); - file.read_to_end(&mut wasm).unwrap(); + file.read_to_end(&mut wasm)?; // Check wasm - check_wasm(&wasm, &available_capabilities).unwrap(); + check_wasm(&wasm, available_capabilities)?; // Compile module - compile(&wasm, None, &[]).unwrap(); - println!("contract checks passed.") + compile(&wasm, None, &[])?; + + Ok(()) } From 70e30589cfaea240118f3fc05270d4e55b744b0a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 11:37:50 +0200 Subject: [PATCH 182/344] cosmwasm-check: handle failures in multiple files --- packages/cw-check-contract/src/main.rs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index 7ba6845fb..8c22bd13b 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -2,6 +2,7 @@ use std::collections::HashSet; use std::fs::File; use std::io::Read; use std::path::Path; +use std::process::exit; use clap::{App, Arg}; @@ -39,15 +40,32 @@ pub fn main() { .unwrap_or(DEFAULT_AVAILABLE_CAPABILITIES); let available_capabilities = capabilities_from_csv(available_capabilities_csv); println!("Available capabilities: {:?}", available_capabilities); + println!(); // File let paths = matches.values_of("WASM").expect("Error parsing file names"); - for path in paths { - check_contract(path, &available_capabilities).unwrap(); - } + let (passes, failures): (Vec<_>, _) = paths + .map(|p| { + let result = check_contract(p, &available_capabilities); + match &result { + Ok(_) => println!("{}: pass", p), + Err(e) => { + println!("{}: failure", p); + println!("{}", e); + } + }; + result + }) + .partition(|result| result.is_ok()); + println!(); - println!("contract checks passed.") + if failures.is_empty() { + println!("All {} contracts passed checks!", passes.len()); + } else { + println!("Passes: {}, failures: {}", passes.len(), failures.len()); + exit(1); + } } fn check_contract( From 7ae06e3d2c0a33e3f9fc1cb38af657f09ac993b5 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 11:54:45 +0200 Subject: [PATCH 183/344] cosmwasm-check: style --- packages/cw-check-contract/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index 8c22bd13b..070a0fff5 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -61,7 +61,7 @@ pub fn main() { println!(); if failures.is_empty() { - println!("All {} contracts passed checks!", passes.len()); + println!("All contracts ({}) passed checks!", passes.len()); } else { println!("Passes: {}, failures: {}", passes.len(), failures.len()); exit(1); From 06a279c89470a2b0a76e425466e99ac963303025 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 12:12:02 +0200 Subject: [PATCH 184/344] cosmwasm-check: add some color for readability --- Cargo.lock | 22 ++++++++++++++++++++++ packages/cw-check-contract/Cargo.toml | 2 ++ packages/cw-check-contract/src/main.rs | 19 +++++++++++++++---- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53f32e553..a24299d75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -237,6 +237,17 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + [[package]] name = "const-oid" version = "0.9.0" @@ -608,8 +619,10 @@ version = "1.0.0" dependencies = [ "anyhow", "clap", + "colored", "cosmwasm-std", "cosmwasm-vm", + "termcolor", ] [[package]] @@ -1798,6 +1811,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "textwrap" version = "0.11.0" diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index 592735e1a..1ccda6322 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -12,3 +12,5 @@ anyhow = "1" cosmwasm-vm = { path = "../vm", version = "1.0.0" } cosmwasm-std = { path = "../std", version = "1.0.0" } clap = "2.33" +termcolor = "1.1.3" +colored = "2.0.0" diff --git a/packages/cw-check-contract/src/main.rs b/packages/cw-check-contract/src/main.rs index 070a0fff5..c2affd098 100644 --- a/packages/cw-check-contract/src/main.rs +++ b/packages/cw-check-contract/src/main.rs @@ -5,6 +5,7 @@ use std::path::Path; use std::process::exit; use clap::{App, Arg}; +use colored::Colorize; use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; @@ -49,9 +50,9 @@ pub fn main() { .map(|p| { let result = check_contract(p, &available_capabilities); match &result { - Ok(_) => println!("{}: pass", p), + Ok(_) => println!("{}: {}", p, "pass".green()), Err(e) => { - println!("{}: failure", p); + println!("{}: {}", p, "failure".red()); println!("{}", e); } }; @@ -61,9 +62,19 @@ pub fn main() { println!(); if failures.is_empty() { - println!("All contracts ({}) passed checks!", passes.len()); + println!( + "All contracts ({}) {} checks!", + passes.len(), + "passed".green() + ); } else { - println!("Passes: {}, failures: {}", passes.len(), failures.len()); + println!( + "{}: {}, {}: {}", + "Passes".green(), + passes.len(), + "failures".red(), + failures.len() + ); exit(1); } } From 8420edc36f16e1353a8604850825fb38e047d190 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 12:23:54 +0200 Subject: [PATCH 185/344] CI: fix contract checks --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ce4fbb06..1d96e10bc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1216,8 +1216,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="../../artifacts/floaty.wasm"; cd ./code/packages/vm; \ - find ../../artifacts/ -type f -name "*.wasm" ! -name "floaty.wasm" -exec cargo run --bin cw-check-contract {} \; + /bin/bash -e -c 'export GLOBIGNORE="artifacts/floaty.wasm"; cd ./code; cargo run --bin cw-check-contract artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub From ca93e475cec1c16f896241bd512baf5b37ff1181 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 13:17:43 +0200 Subject: [PATCH 186/344] cosmwasm-check: clean up Cargo.toml --- Cargo.lock | 10 ---------- packages/cw-check-contract/Cargo.toml | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a24299d75..b37920c60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -622,7 +622,6 @@ dependencies = [ "colored", "cosmwasm-std", "cosmwasm-vm", - "termcolor", ] [[package]] @@ -1811,15 +1810,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index 1ccda6322..e7ed801ff 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -9,8 +9,7 @@ license = "Apache-2.0" [dependencies] anyhow = "1" +clap = "2" +colored = "2" cosmwasm-vm = { path = "../vm", version = "1.0.0" } cosmwasm-std = { path = "../std", version = "1.0.0" } -clap = "2.33" -termcolor = "1.1.3" -colored = "2.0.0" From dbf6f2f6fb740ee6c13cbbdf233c7b6c54fa157f Mon Sep 17 00:00:00 2001 From: emidev98 <49301655+emidev98@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:54:17 +0200 Subject: [PATCH 187/344] Update required parameters Reading the code I have seen that the execute and query entry points are not required anymore --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d80b3fac..114272f26 100644 --- a/README.md +++ b/README.md @@ -150,14 +150,18 @@ extern "C" fn deallocate(pointer: u32); // main contract entry points extern "C" fn instantiate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; -extern "C" fn execute(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; -extern "C" fn query(env_ptr: u32, msg_ptr: u32) -> u32; ``` Contracts may also implement one or more of the following to extend their functionality: ```rust +// modify the state of the contract +extern "C" fn execute(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; + +// query the state of the contract +extern "C" fn query(env_ptr: u32, msg_ptr: u32) -> u32; + // in-place contract migrations extern "C" fn migrate(env_ptr: u32, msg_ptr: u32) -> u32; From 65c4b9c321b0fd2f43e3550245de50c8dcb80885 Mon Sep 17 00:00:00 2001 From: emidev98 <49301655+emidev98@users.noreply.github.com> Date: Mon, 22 Aug 2022 15:17:28 +0200 Subject: [PATCH 188/344] docs: description for instantiate --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 114272f26..62a325ff1 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ extern "C" fn interface_version_8() -> () {} extern "C" fn allocate(size: usize) -> u32; extern "C" fn deallocate(pointer: u32); -// main contract entry points +// creates the initial status of the contract allowing initial configuration thru the **msg_ptr** parameter extern "C" fn instantiate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; ``` From 4234f9b94048ee8332ac6023b10c9f8ee7a579a4 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 15:07:17 +0200 Subject: [PATCH 189/344] check: rename crate to `cosmwasm-check` --- Cargo.lock | 22 +++++++++++----------- packages/cw-check-contract/Cargo.toml | 4 ++-- packages/vm/examples/check_contract.rs | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b37920c60..737de9a89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,6 +273,17 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "cosmwasm-check" +version = "1.0.0" +dependencies = [ + "anyhow", + "clap", + "colored", + "cosmwasm-std", + "cosmwasm-vm", +] + [[package]] name = "cosmwasm-crypto" version = "1.0.0" @@ -613,17 +624,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cw-check-contract" -version = "1.0.0" -dependencies = [ - "anyhow", - "clap", - "colored", - "cosmwasm-std", - "cosmwasm-vm", -] - [[package]] name = "darling" version = "0.13.4" diff --git a/packages/cw-check-contract/Cargo.toml b/packages/cw-check-contract/Cargo.toml index e7ed801ff..4e55faf76 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/cw-check-contract/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "cw-check-contract" +name = "cosmwasm-check" version = "1.0.0" authors = ["Ethan Frey "] edition = "2021" -description = "VM bindings to run verify cosmos contracts." +description = "A CLI tool for verifying CosmWasm smart contracts" repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-contract" license = "Apache-2.0" diff --git a/packages/vm/examples/check_contract.rs b/packages/vm/examples/check_contract.rs index 4ac4121b9..401421cd7 100644 --- a/packages/vm/examples/check_contract.rs +++ b/packages/vm/examples/check_contract.rs @@ -9,8 +9,8 @@ use cosmwasm_vm::internals::{check_wasm, compile}; const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; pub fn main() { - eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cw-check-contract` instead."); - eprintln!("> cargo install cw-check-contract"); + eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cosmwasm-check` instead."); + eprintln!("> cargo install cosmwasm-check"); let matches = App::new("Contract checking") .version("0.1.0") From a88b281bc3548e0af8e01d41fbd1e40f30175dad Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 15:30:19 +0200 Subject: [PATCH 190/344] rename `cw-check-contract` folder to `check` --- .circleci/config.yml | 14 +++++++------- devtools/check_workspace.sh | 1 + packages/{cw-check-contract => check}/Cargo.toml | 2 +- packages/check/README.md | 11 +++++++++++ packages/{cw-check-contract => check}/src/main.rs | 0 packages/cw-check-contract/README.md | 6 ------ 6 files changed, 20 insertions(+), 14 deletions(-) rename packages/{cw-check-contract => check}/Cargo.toml (94%) create mode 100644 packages/check/README.md rename packages/{cw-check-contract => check}/src/main.rs (100%) delete mode 100644 packages/cw-check-contract/README.md diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d96e10bc..9c08e76b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ workflows: jobs: - arm64 - package_crypto - - package_cw_check_contract + - package_check - package_schema - package_schema_derive - package_std @@ -161,7 +161,7 @@ jobs: - target/debug/deps key: cargocache-v2-package_crypto-rust:1.59.0-{{ checksum "Cargo.lock" }} - package_cw_check_contract: + package_check: docker: - image: rust:1.59.0 steps: @@ -171,14 +171,14 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + - cargocache-v2-package_check-rust:1.59.0-{{ checksum "Cargo.lock" }} - run: name: Build - working_directory: ~/project/packages/cw-check-contract + working_directory: ~/project/packages/check command: cargo build --locked - run: name: Run tests - working_directory: ~/project/packages/cw-check-contract + working_directory: ~/project/packages/check command: cargo test --locked - save_cache: paths: @@ -186,7 +186,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-package_cw_check_contract-rust:1.59.0-{{ checksum "Cargo.lock" }} + key: cargocache-v2-package_check-rust:1.59.0-{{ checksum "Cargo.lock" }} package_schema: docker: @@ -1216,7 +1216,7 @@ jobs: command: | echo "Checking all contracts under ./artifacts" docker run --volumes-from with_code rust:1.59.0 \ - /bin/bash -e -c 'export GLOBIGNORE="artifacts/floaty.wasm"; cd ./code; cargo run --bin cw-check-contract artifacts/*.wasm' + /bin/bash -e -c 'export GLOBIGNORE="artifacts/floaty.wasm"; cd ./code; cargo run --bin cosmwasm-check artifacts/*.wasm' docker cp with_code:/code/artifacts . - run: name: Publish artifacts on GitHub diff --git a/devtools/check_workspace.sh b/devtools/check_workspace.sh index f35dafb7c..1c0d0bcaa 100755 --- a/devtools/check_workspace.sh +++ b/devtools/check_workspace.sh @@ -19,3 +19,4 @@ cargo fmt (cd packages/schema && cargo build && cargo clippy --all-targets -- -D warnings) (cd packages/schema-derive && cargo build && cargo clippy --all-targets -- -D warnings) (cd packages/vm && cargo build --features iterator,stargate && cargo clippy --all-targets --features iterator,stargate -- -D warnings) +(cd packages/check && cargo build && cargo clippy --all-targets -- -D warnings) diff --git a/packages/cw-check-contract/Cargo.toml b/packages/check/Cargo.toml similarity index 94% rename from packages/cw-check-contract/Cargo.toml rename to packages/check/Cargo.toml index 4e55faf76..8309f98dd 100644 --- a/packages/cw-check-contract/Cargo.toml +++ b/packages/check/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" authors = ["Ethan Frey "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" -repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/cw-check-contract" +repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/check" license = "Apache-2.0" [dependencies] diff --git a/packages/check/README.md b/packages/check/README.md new file mode 100644 index 000000000..2b41ae3af --- /dev/null +++ b/packages/check/README.md @@ -0,0 +1,11 @@ +# cosmwasm-check + +It allows checking if the Wasm binary is a proper smart contract that's ready to be uploaded +to the blockchain. + +Installation: + +``` sh +cargo install cosmwasm-check +``` + diff --git a/packages/cw-check-contract/src/main.rs b/packages/check/src/main.rs similarity index 100% rename from packages/cw-check-contract/src/main.rs rename to packages/check/src/main.rs diff --git a/packages/cw-check-contract/README.md b/packages/cw-check-contract/README.md deleted file mode 100644 index f123dcdfc..000000000 --- a/packages/cw-check-contract/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# cw-check-contract - -It allows checking if the wasm binary is a proper smart contract ready to upload -to the blockchain. - -Install using cargo install cw-check-contract From 83224b7731ac9457f250408804bfa2b7093c2820 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 15:30:34 +0200 Subject: [PATCH 191/344] make 1.64.0 clippy happy --- packages/profiler/src/instrumentation.rs | 2 +- packages/vm/src/modules/versioning.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/profiler/src/instrumentation.rs b/packages/profiler/src/instrumentation.rs index eb1b164a6..e20a77a40 100644 --- a/packages/profiler/src/instrumentation.rs +++ b/packages/profiler/src/instrumentation.rs @@ -257,7 +257,7 @@ impl FunctionMiddleware for FunctionProfiling { Operator::Call{ function_index: self.indexes.start_measurement.as_u32() }, ]); } - self.accumulated_ops.push((&operator).into()); + self.accumulated_ops.push(OperatorSymbol::from(&operator)); } } diff --git a/packages/vm/src/modules/versioning.rs b/packages/vm/src/modules/versioning.rs index 3810e2b91..86ce486f8 100644 --- a/packages/vm/src/modules/versioning.rs +++ b/packages/vm/src/modules/versioning.rs @@ -33,7 +33,7 @@ pub fn current_wasmer_module_version() -> u32 { } let metadata = &header[header.len() - METADATA_HEADER_LEN..]; - u32::from_le_bytes((&metadata[8..12]).try_into().unwrap()) + u32::from_le_bytes((metadata[8..12]).try_into().unwrap()) } #[cfg(test)] From 36d7590661cc6dbe2576e27faec174c8dac4cb17 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 15:56:54 +0200 Subject: [PATCH 192/344] Update READMEs with `cosmwasm-check` info --- README.md | 5 +++++ packages/check/README.md | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0d80b3fac..3b803f83e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ The following packages are maintained here: | cosmwasm-std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | [![Coverage][cov-badge-std]][cov-link-std] | | cosmwasm-storage | Contract development | [![cosmwasm-storage on crates.io](https://img.shields.io/crates/v/cosmwasm-storage.svg)](https://crates.io/crates/cosmwasm-storage) | [![Docs](https://docs.rs/cosmwasm-storage/badge.svg)](https://docs.rs/cosmwasm-storage) | [![Coverage][cov-badge-storage]][cov-link-storage] | | cosmwasm-vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | ([#1151]) | +| cosmwasm-check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | [![Docs](https://docs.rs/cosmwasm-check/badge.svg)](https://docs.rs/cosmwasm-check) | N/A | [cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto @@ -96,6 +97,10 @@ This code is compiled into Wasm bytecode as part of the smart contract. WebAssembly smart contracts. It can be run as is, or you can import the `x/wasm` module from it and use it in your blockchain. It is designed to be imported and customized for other blockchains, rather than forked. +- [cosmwasm-check](https://github.com/CosmWasm/cosmwasm/tree/main/packages/check) - + A CLI tool and a crate in this workspace. Used to verify a Wasm binary is a + CosmWasm smart contract suitable for uploading to a blockchain with a given + set of capabilities. ## Creating a Smart Contract diff --git a/packages/check/README.md b/packages/check/README.md index 2b41ae3af..6593b1310 100644 --- a/packages/check/README.md +++ b/packages/check/README.md @@ -1,11 +1,10 @@ # cosmwasm-check -It allows checking if the Wasm binary is a proper smart contract that's ready to be uploaded -to the blockchain. +It allows checking if the Wasm binary is a proper smart contract that's ready to +be uploaded to the blockchain. Installation: -``` sh +```sh cargo install cosmwasm-check ``` - From f4a6b87b3c0d987904ac4fd036a326e0f2ddd39e Mon Sep 17 00:00:00 2001 From: emidev98 <49301655+emidev98@users.noreply.github.com> Date: Mon, 22 Aug 2022 15:57:40 +0200 Subject: [PATCH 193/344] doc: linting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62a325ff1..181dec20d 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ extern "C" fn interface_version_8() -> () {} extern "C" fn allocate(size: usize) -> u32; extern "C" fn deallocate(pointer: u32); -// creates the initial status of the contract allowing initial configuration thru the **msg_ptr** parameter +// creates an initial state of a contract with a configuration send in the argument msg_ptr extern "C" fn instantiate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; ``` From 953da6af5c927eb57b20fc3f2ca34c638fdd4c25 Mon Sep 17 00:00:00 2001 From: Emilian Harastasan Date: Mon, 22 Aug 2022 16:02:20 +0200 Subject: [PATCH 194/344] docs: run prettier locally --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 181dec20d..6723eaa0b 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ extern "C" fn interface_version_8() -> () {} extern "C" fn allocate(size: usize) -> u32; extern "C" fn deallocate(pointer: u32); -// creates an initial state of a contract with a configuration send in the argument msg_ptr +// creates an initial state of a contract with a configuration send in the argument msg_ptr extern "C" fn instantiate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; ``` @@ -156,7 +156,7 @@ Contracts may also implement one or more of the following to extend their functionality: ```rust -// modify the state of the contract +// modify the state of the contract extern "C" fn execute(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32; // query the state of the contract From 4ec04c2e28e5ea16e406fc78e3ef80f9f45e9425 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 16:08:41 +0200 Subject: [PATCH 195/344] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b803f83e..e3b39ee9a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The following packages are maintained here: | cosmwasm-std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | [![Coverage][cov-badge-std]][cov-link-std] | | cosmwasm-storage | Contract development | [![cosmwasm-storage on crates.io](https://img.shields.io/crates/v/cosmwasm-storage.svg)](https://crates.io/crates/cosmwasm-storage) | [![Docs](https://docs.rs/cosmwasm-storage/badge.svg)](https://docs.rs/cosmwasm-storage) | [![Coverage][cov-badge-storage]][cov-link-storage] | | cosmwasm-vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | ([#1151]) | -| cosmwasm-check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | [![Docs](https://docs.rs/cosmwasm-check/badge.svg)](https://docs.rs/cosmwasm-check) | N/A | +| cosmwasm-check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | `cosmwasm-check -h` | N/A | [cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto From 760956954035d8ef57cde888157b936e3b450218 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 16:10:11 +0200 Subject: [PATCH 196/344] check: include proper version in the CLI tool --- packages/check/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/check/src/main.rs b/packages/check/src/main.rs index c2affd098..98541f5f8 100644 --- a/packages/check/src/main.rs +++ b/packages/check/src/main.rs @@ -14,7 +14,7 @@ const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; pub fn main() { let matches = App::new("Contract checking") - .version("0.1.0") + .version(env!("CARGO_PKG_VERSION")) .long_about("Checks the given wasm file (memories, exports, imports, available capabilities, and non-determinism).") .author("Mauro Lacy ") .arg( From 970f24f9f987c6a382b19113c6a3db72b84f16c2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 16:10:58 +0200 Subject: [PATCH 197/344] check: attribute the original author :) --- packages/check/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 8309f98dd..549b4f548 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cosmwasm-check" version = "1.0.0" -authors = ["Ethan Frey "] +authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/check" From 66f37fc8afcf3e948cd1470739930e1954d5a146 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 22 Aug 2022 16:40:15 +0200 Subject: [PATCH 198/344] check: update README.md --- packages/check/README.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/packages/check/README.md b/packages/check/README.md index 6593b1310..16f7b3540 100644 --- a/packages/check/README.md +++ b/packages/check/README.md @@ -3,8 +3,41 @@ It allows checking if the Wasm binary is a proper smart contract that's ready to be uploaded to the blockchain. -Installation: +## Installation ```sh cargo install cosmwasm-check ``` + +## Usage + +Get help and info: + +```sh +cosmwasm-check -h +``` + +Check some contracts: + +```sh +cosmwasm-check artifacts/hackatom.wasm artifacts/burner.wasm +``` + +Check an entire directory of contracts (shell dependent): + +```sh +cosmwasm-check artifacts/*.wasm +``` + +Check if a contract would ran on a blockchain with a specific set of +capabilities: + +```sh +cosmwasm-check --available-capabilities iterator,osmosis,friendship artifacts/hackatom.wasm +``` + +## License + +This package is part of the cosmwasm repository, licensed under the Apache +License 2.0 (see [NOTICE](https://github.com/CosmWasm/cosmwasm/blob/main/NOTICE) +and [LICENSE](https://github.com/CosmWasm/cosmwasm/blob/main/LICENSE)). From 162bcfd69061ca9212926ae18dc80a7220274251 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 14:55:36 +0200 Subject: [PATCH 199/344] fix poorly resolved merge conflict --- packages/std/src/traits.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 0f6aff2ba..228dd4a54 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -411,7 +411,9 @@ mod tests { let all_balances = wrapper.query_all_balances("foo").unwrap(); assert_eq!(all_balances, vec![coin(123, "ELF"), coin(777, "FLY")]); + } + #[test] fn contract_info() { const ACCT: &str = "foobar"; fn mock_resp() -> ContractInfoResponse { From 61bcb49e60fb94dde7c0e4847819e6cafb394903 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 15:33:17 +0200 Subject: [PATCH 200/344] hide BankQuery::Supply behind the `cosmwasm_1_1` feature --- packages/std/Cargo.toml | 3 +++ packages/std/src/exports.rs | 4 ++++ packages/std/src/lib.rs | 4 +++- packages/std/src/mock.rs | 8 ++++++-- packages/std/src/query/bank.rs | 2 ++ packages/std/src/query/mod.rs | 4 +++- packages/std/src/traits.rs | 11 ++++++++--- 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index d3ed9ccd8..e2b4478dd 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -33,6 +33,9 @@ stargate = [] # ibc3 extends ibc messages with ibc-v3 only features. This should only be enabled on contracts # that require these types. Without this, they get the smaller ibc-v1 API. ibc3 = ["stargate"] +# This feature makes `BankQuery::Supply` available for the contract to call, but requires +# the host blockchain to run CosmWasm `1.1.0` or higher. +cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" diff --git a/packages/std/src/exports.rs b/packages/std/src/exports.rs index 90f1880da..a2c986806 100644 --- a/packages/std/src/exports.rs +++ b/packages/std/src/exports.rs @@ -41,6 +41,10 @@ extern "C" fn requires_staking() -> () {} #[no_mangle] extern "C" fn requires_stargate() -> () {} +#[cfg(feature = "cosmwasm_1_1")] +#[no_mangle] +extern "C" fn requires_cosmwasm_1_1() -> () {} + /// interface_version_* exports mark which Wasm VM interface level this contract is compiled for. /// They can be checked by cosmwasm_vm. /// Update this whenever the Wasm VM interface breaks. diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index cd0839545..54e2a4bce 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -46,9 +46,11 @@ pub use crate::math::{ Decimal, Decimal256, Decimal256RangeExceeded, DecimalRangeExceeded, Fraction, Isqrt, Uint128, Uint256, Uint512, Uint64, }; +#[cfg(feature = "cosmwasm_1_1")] +pub use crate::query::SupplyResponse; pub use crate::query::{ AllBalanceResponse, BalanceResponse, BankQuery, ContractInfoResponse, CustomQuery, - QueryRequest, SupplyResponse, WasmQuery, + QueryRequest, WasmQuery, }; #[cfg(feature = "staking")] pub use crate::query::{ diff --git a/packages/std/src/mock.rs b/packages/std/src/mock.rs index c9c8ff695..14e844502 100644 --- a/packages/std/src/mock.rs +++ b/packages/std/src/mock.rs @@ -16,9 +16,10 @@ use crate::ibc::{ IbcTimeoutBlock, }; use crate::math::Uint128; +#[cfg(feature = "cosmwasm_1_1")] +use crate::query::SupplyResponse; use crate::query::{ - AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, SupplyResponse, - WasmQuery, + AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery, }; #[cfg(feature = "staking")] use crate::query::{ @@ -566,6 +567,7 @@ impl Default for WasmQuerier { #[derive(Clone, Default)] pub struct BankQuerier { + #[allow(dead_code)] supplies: HashMap, balances: HashMap>, } @@ -590,6 +592,7 @@ impl BankQuerier { pub fn query(&self, request: &BankQuery) -> QuerierResult { let contract_result: ContractResult = match request { + #[cfg(feature = "cosmwasm_1_1")] BankQuery::Supply { denom } => { let amount = self .supplies @@ -1086,6 +1089,7 @@ mod tests { assert_eq!(res.unwrap_err(), VerificationError::InvalidPubkeyFormat); } + #[cfg(feature = "cosmwasm_1_1")] #[test] fn bank_querier_supply() { let addr1 = String::from("foo"); diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 1850a0b48..9e5d8148f 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -10,6 +10,7 @@ pub enum BankQuery { /// This calls into the native bank module for querying the total supply of one denomination. /// It does the same as the SupplyOf call in Cosmos SDK's RPC API. /// Return value is of type SupplyResponse. + #[cfg(feature = "cosmwasm_1_1")] Supply { denom: String }, /// This calls into the native bank module for one denomination /// Return value is BalanceResponse @@ -20,6 +21,7 @@ pub enum BankQuery { AllBalances { address: String }, } +#[cfg(feature = "cosmwasm_1_1")] #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] #[non_exhaustive] diff --git a/packages/std/src/query/mod.rs b/packages/std/src/query/mod.rs index 38a302a16..67a2fcdb0 100644 --- a/packages/std/src/query/mod.rs +++ b/packages/std/src/query/mod.rs @@ -10,7 +10,9 @@ mod ibc; mod staking; mod wasm; -pub use bank::{AllBalanceResponse, BalanceResponse, BankQuery, SupplyResponse}; +#[cfg(feature = "cosmwasm_1_1")] +pub use bank::SupplyResponse; +pub use bank::{AllBalanceResponse, BalanceResponse, BankQuery}; #[cfg(feature = "stargate")] pub use ibc::{ChannelResponse, IbcQuery, ListChannelsResponse, PortIdResponse}; #[cfg(feature = "staking")] diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 228dd4a54..6536d75bd 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -8,9 +8,10 @@ use crate::coins::Coin; use crate::errors::{RecoverPubkeyError, StdError, StdResult, VerificationError}; #[cfg(feature = "iterator")] use crate::iterator::{Order, Record}; +#[cfg(feature = "cosmwasm_1_1")] +use crate::query::SupplyResponse; use crate::query::{ - AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, SupplyResponse, - WasmQuery, + AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery, }; #[cfg(feature = "staking")] use crate::query::{ @@ -199,6 +200,7 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { } } + #[cfg(feature = "cosmwasm_1_1")] pub fn query_supply(&self, denom: impl Into) -> StdResult { let request = BankQuery::Supply { denom: denom.into(), @@ -355,7 +357,7 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { mod tests { use super::*; use crate::mock::MockQuerier; - use crate::{coin, coins, from_slice, Uint128}; + use crate::{coins, from_slice, Uint128}; // this is a simple demo helper to prove we can use it fn demo_helper(_querier: &dyn Querier) -> u64 { @@ -395,8 +397,11 @@ mod tests { assert_eq!(balance.amount.amount, Uint128::new(5)); } + #[cfg(feature = "cosmwasm_1_1")] #[test] fn bank_query_helpers_work() { + use crate::coin; + let querier: MockQuerier = MockQuerier::new(&[ ("foo", &[coin(123, "ELF"), coin(777, "FLY")]), ("bar", &[coin(321, "ELF")]), From 914f87c7d1b1c76d06e4f6e95b857c3257f6840b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 15:43:49 +0200 Subject: [PATCH 201/344] fix Rust 1.63 lints --- packages/std/src/query/bank.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 9e5d8148f..9656ea613 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -31,7 +31,7 @@ pub struct SupplyResponse { pub amount: Coin, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct BalanceResponse { /// Always returns a Coin with the requested denom. From b440266191bd86af113bab2dc65962ff6a9451d9 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 15:45:36 +0200 Subject: [PATCH 202/344] generate std schemas including cosmwasm_1_1 feature --- devtools/check_workspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/check_workspace.sh b/devtools/check_workspace.sh index 1c0d0bcaa..7e9c04d06 100755 --- a/devtools/check_workspace.sh +++ b/devtools/check_workspace.sh @@ -13,7 +13,7 @@ cargo fmt cargo wasm-debug cargo wasm-debug --features iterator,staking,stargate cargo clippy --all-targets --features iterator,staking,stargate -- -D warnings - cargo schema + cargo schema --features cosmwasm_1_1 ) (cd packages/storage && cargo build && cargo clippy --all-targets --features iterator -- -D warnings) (cd packages/schema && cargo build && cargo clippy --all-targets -- -D warnings) From 3cdc9ef93ffdd18c421b49b5f7b57b9abf62465c Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 19:22:06 +0200 Subject: [PATCH 203/344] test BankQuery::Supply using the reflect contract --- contracts/reflect/Cargo.toml | 2 +- contracts/reflect/tests/integration.rs | 50 +++++++++++++++++++++++--- packages/check/src/main.rs | 2 +- packages/vm/examples/check_contract.rs | 2 +- packages/vm/src/testing/instance.rs | 2 +- 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/contracts/reflect/Cargo.toml b/contracts/reflect/Cargo.toml index 6e66eded1..6ec3c92e4 100644 --- a/contracts/reflect/Cargo.toml +++ b/contracts/reflect/Cargo.toml @@ -34,7 +34,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } -cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate"] } +cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate", "cosmwasm_1_1"] } cosmwasm-storage = { path = "../../packages/storage", default-features = false } schemars = "0.8.1" serde = { version = "=1.0.103", default-features = false, features = ["derive"] } diff --git a/contracts/reflect/tests/integration.rs b/contracts/reflect/tests/integration.rs index 25bb93fe3..4df7685dc 100644 --- a/contracts/reflect/tests/integration.rs +++ b/contracts/reflect/tests/integration.rs @@ -18,8 +18,9 @@ //! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...) use cosmwasm_std::{ - coin, coins, from_binary, BankMsg, Binary, Coin, ContractResult, Event, Reply, Response, - StakingMsg, SubMsg, SubMsgResponse, SubMsgResult, SystemResult, + coin, coins, from_binary, BankMsg, BankQuery, Binary, Coin, ContractResult, Event, + QueryRequest, Reply, Response, StakingMsg, SubMsg, SubMsgResponse, SubMsgResult, + SupplyResponse, SystemResult, }; use cosmwasm_vm::{ testing::{ @@ -30,8 +31,8 @@ use cosmwasm_vm::{ }; use reflect::msg::{ - CapitalizedResponse, CustomMsg, ExecuteMsg, InstantiateMsg, OwnerResponse, QueryMsg, - SpecialQuery, + CapitalizedResponse, ChainResponse, CustomMsg, ExecuteMsg, InstantiateMsg, OwnerResponse, + QueryMsg, SpecialQuery, }; use reflect::testing::custom_query_execute; @@ -56,6 +57,19 @@ pub fn mock_dependencies_with_custom_querier( } } +pub fn mock_dependencies_with_custom_querier_and_balances( + balances: &[(&str, &[Coin])], +) -> Backend> { + let custom_querier: MockQuerier = MockQuerier::new(balances) + .with_custom_handler(|query| SystemResult::Ok(custom_query_execute(query))); + + Backend { + api: MockApi::default(), + storage: MockStorage::default(), + querier: custom_querier, + } +} + #[test] fn proper_initialization() { let mut deps = mock_instance(WASM, &[]); @@ -166,6 +180,34 @@ fn transfer_requires_owner() { assert!(msg.contains("Permission denied: the sender is not the current owner")); } +#[test] +fn supply_query() { + // stub gives us defaults. Consume it and override... + let custom = mock_dependencies_with_custom_querier_and_balances(&[ + ("ryan_reynolds", &[coin(5, "ATOM"), coin(10, "OSMO")]), + ("huge_ackman", &[coin(15, "OSMO"), coin(5, "BTC")]), + ]); + // we cannot use mock_instance, so we just copy and modify code from cosmwasm_vm::testing + let (instance_options, memory_limit) = mock_instance_options(); + let mut deps = Instance::from_code(WASM, custom, instance_options, memory_limit).unwrap(); + + // we don't even initialize, just trigger a query + let res = query( + &mut deps, + mock_env(), + QueryMsg::Chain { + request: QueryRequest::Bank(BankQuery::Supply { + denom: "OSMO".to_string(), + }), + }, + ) + .unwrap(); + + let res: ChainResponse = from_binary(&res).unwrap(); + let res: SupplyResponse = from_binary(&res.data).unwrap(); + assert_eq!(res.amount, coin(25, "OSMO")); +} + #[test] fn dispatch_custom_query() { // stub gives us defaults. Consume it and override... diff --git a/packages/check/src/main.rs b/packages/check/src/main.rs index 98541f5f8..1d4e6eb67 100644 --- a/packages/check/src/main.rs +++ b/packages/check/src/main.rs @@ -10,7 +10,7 @@ use colored::Colorize; use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; -const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; +const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate,cosmwasm_1_1"; pub fn main() { let matches = App::new("Contract checking") diff --git a/packages/vm/examples/check_contract.rs b/packages/vm/examples/check_contract.rs index 401421cd7..1d53b164e 100644 --- a/packages/vm/examples/check_contract.rs +++ b/packages/vm/examples/check_contract.rs @@ -6,7 +6,7 @@ use clap::{App, Arg}; use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile}; -const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate"; +const DEFAULT_AVAILABLE_CAPABILITIES: &str = "iterator,staking,stargate,cosmwasm_1_1"; pub fn main() { eprintln!("`check_contract` will be removed from the next version of `cosmwasm-vm` - please use `cosmwasm-check` instead."); diff --git a/packages/vm/src/testing/instance.rs b/packages/vm/src/testing/instance.rs index a30030a44..a5aeeb6ac 100644 --- a/packages/vm/src/testing/instance.rs +++ b/packages/vm/src/testing/instance.rs @@ -95,7 +95,7 @@ pub struct MockInstanceOptions<'a> { impl MockInstanceOptions<'_> { fn default_capabilities() -> HashSet { #[allow(unused_mut)] - let mut out = capabilities_from_csv("iterator,staking"); + let mut out = capabilities_from_csv("iterator,staking,cosmwasm_1_1"); #[cfg(feature = "stargate")] out.insert("stargate".to_string()); out From 74a68bc82cae19e67857b74682265027b1836af2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 23 Aug 2022 19:27:38 +0200 Subject: [PATCH 204/344] update CI after introducing the `cosmwasm_1_1` feature --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c08e76b0..764ec11f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -274,19 +274,19 @@ jobs: - run: name: Build library for native target (all features) working_directory: ~/project/packages/std - command: cargo build --locked --features abort,iterator,staking,stargate + command: cargo build --locked --features abort,iterator,staking,stargate,cosmwasm_1_1 - run: name: Build library for wasm target (all features) working_directory: ~/project/packages/std - command: cargo wasm --locked --features abort,iterator,staking,stargate + command: cargo wasm --locked --features abort,iterator,staking,stargate,cosmwasm_1_1 - run: name: Run unit tests (all features) working_directory: ~/project/packages/std - command: cargo test --locked --features abort,iterator,staking,stargate + command: cargo test --locked --features abort,iterator,staking,stargate,cosmwasm_1_1 - run: name: Build and run schema generator working_directory: ~/project/packages/std - command: cargo schema --locked + command: cargo schema --features cosmwasm_1_1 --locked - run: name: Ensure schemas are up-to-date command: | From 492e6d70bae02ba87d21efde00aff810b30c187b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 24 Aug 2022 13:35:12 +0200 Subject: [PATCH 205/344] avoid BankQuerier.supplies ending up with invalid state --- packages/std/src/mock.rs | 48 +++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/packages/std/src/mock.rs b/packages/std/src/mock.rs index 14e844502..1feb04022 100644 --- a/packages/std/src/mock.rs +++ b/packages/std/src/mock.rs @@ -455,7 +455,7 @@ impl MockQuerier { addr: impl Into, balance: Vec, ) -> Option> { - self.bank.balances.insert(addr.into(), balance) + self.bank.update_balance(addr, balance) } #[cfg(feature = "staking")] @@ -568,28 +568,50 @@ impl Default for WasmQuerier { #[derive(Clone, Default)] pub struct BankQuerier { #[allow(dead_code)] + /// HashMap supplies: HashMap, + /// HashMap balances: HashMap>, } impl BankQuerier { pub fn new(balances: &[(&str, &[Coin])]) -> Self { - let mut supplies_map = HashMap::new(); - let mut balances_map = HashMap::new(); - for (addr, coins) in balances.iter() { - balances_map.insert(addr.to_string(), coins.to_vec()); - for coin in coins.iter() { - *supplies_map - .entry(coin.denom.clone()) - .or_insert_with(Uint128::zero) += coin.amount; - } - } + let balances: HashMap<_, _> = balances + .iter() + .map(|(s, c)| (s.to_string(), c.to_vec())) + .collect(); + BankQuerier { - supplies: supplies_map, - balances: balances_map, + supplies: Self::calculate_supplies(&balances), + balances, } } + pub fn update_balance( + &mut self, + addr: impl Into, + balance: Vec, + ) -> Option> { + let result = self.balances.insert(addr.into(), balance); + self.supplies = Self::calculate_supplies(&self.balances); + + result + } + + fn calculate_supplies(balances: &HashMap>) -> HashMap { + let mut supplies = HashMap::new(); + + let all_coins = balances.iter().flat_map(|(_, coins)| coins); + + for coin in all_coins { + *supplies + .entry(coin.denom.clone()) + .or_insert_with(Uint128::zero) += coin.amount; + } + + supplies + } + pub fn query(&self, request: &BankQuery) -> QuerierResult { let contract_result: ContractResult = match request { #[cfg(feature = "cosmwasm_1_1")] From cd9ca86216fd28085b95c26d38ec752bc0cff206 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 29 Aug 2022 12:26:47 +0200 Subject: [PATCH 206/344] Adapt capability format docs to allow underscore --- docs/CAPABILITIES.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index fdd10c702..2679f5dd7 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -21,9 +21,7 @@ features are Rust build system specific. The contract defines required capabilities using marker export functions that take no arguments and return no value. The name of the export needs to start -with "requires\_" followed by the name of the capability. When creating a new -capability, do yourself a favor and keep the name all lower ASCII -alphanumerical. +with "requires\_" followed by the name of the capability. An example of such markers in cosmwasm-std are those: @@ -76,6 +74,13 @@ capabilities. This capabilities list is set and [in app.go](https://github.com/CosmWasm/wasmd/blob/v0.27.0-rc0/app/app.go#L475-L496). +## Format + +The capability name needs to be allowed as a Wasm export names and be a legal +function name in Rust and other CosmWasm smart contract languages such as Go. By +convention, the name should be short and all lower ASCII alphanumerical plus +underscores. + ## Common capabilities Here is a list of capabilities created in the past. Since capabilities can be From 16ffd1c64e74bb497c1b2cc7ac89d183fd72e966 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 14:35:57 +0200 Subject: [PATCH 207/344] Set up a new testing contract --- contracts/tests/.cargo/config | 6 + contracts/tests/Cargo.lock | 1982 ++++++++++++++++++++++++++ contracts/tests/Cargo.toml | 41 + contracts/tests/examples/schema.rs | 12 + contracts/tests/schema/tests.json | 53 + contracts/tests/src/contract.rs | 59 + contracts/tests/src/errors.rs | 12 + contracts/tests/src/lib.rs | 3 + contracts/tests/src/msg.rs | 18 + contracts/tests/tests/integration.rs | 54 + 10 files changed, 2240 insertions(+) create mode 100644 contracts/tests/.cargo/config create mode 100644 contracts/tests/Cargo.lock create mode 100644 contracts/tests/Cargo.toml create mode 100644 contracts/tests/examples/schema.rs create mode 100644 contracts/tests/schema/tests.json create mode 100644 contracts/tests/src/contract.rs create mode 100644 contracts/tests/src/errors.rs create mode 100644 contracts/tests/src/lib.rs create mode 100644 contracts/tests/src/msg.rs create mode 100644 contracts/tests/tests/integration.rs diff --git a/contracts/tests/.cargo/config b/contracts/tests/.cargo/config new file mode 100644 index 000000000..8d4bc738b --- /dev/null +++ b/contracts/tests/.cargo/config @@ -0,0 +1,6 @@ +[alias] +wasm = "build --release --target wasm32-unknown-unknown" +wasm-debug = "build --target wasm32-unknown-unknown" +unit-test = "test --lib" +integration-test = "test --test integration" +schema = "run --example schema" diff --git a/contracts/tests/Cargo.lock b/contracts/tests/Cargo.lock new file mode 100644 index 000000000..2e56f0dba --- /dev/null +++ b/contracts/tests/Cargo.lock @@ -0,0 +1,1982 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +dependencies = [ + "gimli 0.24.0", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.3", + "once_cell", + "version_check", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object 0.25.3", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "base64ct" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake2b_simd" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" + +[[package]] +name = "bytecheck" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "314889ea31cda264cb7c3d6e6e5c9415a987ecb0e72c17c00d36fbb881d34abe" +dependencies = [ + "bytecheck_derive", + "ptr_meta", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a2b3b92c135dae665a6f760205b89187638e83bed17ef3e44e83c712cf30600" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cc" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clru" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" + +[[package]] +name = "const-oid" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "corosensei" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys", +] + +[[package]] +name = "cosmwasm-crypto" +version = "1.0.0" +dependencies = [ + "digest 0.10.3", + "ed25519-zebra", + "k256", + "rand_core 0.6.3", + "thiserror", +] + +[[package]] +name = "cosmwasm-derive" +version = "1.0.0" +dependencies = [ + "syn", +] + +[[package]] +name = "cosmwasm-schema" +version = "1.0.0" +dependencies = [ + "cosmwasm-schema-derive", + "schemars", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cosmwasm-schema-derive" +version = "1.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "cosmwasm-std" +version = "1.0.0" +dependencies = [ + "base64", + "cosmwasm-crypto", + "cosmwasm-derive", + "derivative", + "forward_ref", + "schemars", + "serde", + "serde-json-wasm", + "thiserror", + "uint", +] + +[[package]] +name = "cosmwasm-storage" +version = "1.0.0" +dependencies = [ + "cosmwasm-std", + "serde", +] + +[[package]] +name = "cosmwasm-vm" +version = "1.0.0" +dependencies = [ + "clru", + "cosmwasm-crypto", + "cosmwasm-std", + "hex", + "loupe", + "parity-wasm", + "schemars", + "serde", + "serde_json", + "sha2 0.9.5", + "thiserror", + "wasmer", + "wasmer-middlewares", +] + +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + +[[package]] +name = "cranelift-bforest" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +dependencies = [ + "cranelift-entity", +] + +[[package]] +name = "cranelift-codegen" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +dependencies = [ + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "gimli 0.26.1", + "log", + "regalloc", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +dependencies = [ + "cranelift-codegen-shared", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" + +[[package]] +name = "cranelift-entity" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" + +[[package]] +name = "cranelift-frontend" +version = "0.82.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "crc32fast" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +dependencies = [ + "cfg-if", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" +dependencies = [ + "generic-array", + "rand_core 0.6.3", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "757c0ded2af11d8e739c4daea1ac623dd1624b06c844cf3f5a39f1bdbd99bb12" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "der" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", +] + +[[package]] +name = "dyn-clone" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" + +[[package]] +name = "dynasm" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" +dependencies = [ + "bitflags", + "byteorder", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dynasmrt" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" +dependencies = [ + "byteorder", + "dynasm", + "memmap2", +] + +[[package]] +name = "ecdsa" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd46e0c364655e5baf2f5e99b603e7a09905da9966d7928d7470af393b28670" +dependencies = [ + "der", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519-zebra" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +dependencies = [ + "curve25519-dalek", + "hex", + "rand_core 0.6.3", + "serde", + "sha2 0.9.5", + "thiserror", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "elliptic-curve" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c47abd0a791d2ac0c7aa1118715f85b83689e4522c4e3a244e159d4fc9848a8d" +dependencies = [ + "base16ct", + "crypto-bigint", + "der", + "digest 0.10.3", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.3", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-iterator" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enumset" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e76129da36102af021b8e5000dab2c1c30dbef85c1e482beeff8da5dde0e0b0" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6451128aa6655d880755345d085494cf7561a6bee7c8dc821e5d77e6d267ecd4" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "ff" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +dependencies = [ + "rand_core 0.6.3", + "subtle", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "forward_ref" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" + +[[package]] +name = "gimli" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "group" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +dependencies = [ + "ff", + "rand_core 0.6.3", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +dependencies = [ + "ahash", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.3", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +dependencies = [ + "autocfg", + "hashbrown 0.11.2", + "serde", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "js-sys" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8a5a96d92d849c4499d99461da81c9cdc1467418a8ed2aaeb407e8d85940ed" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2 0.10.2", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "leb128" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" + +[[package]] +name = "libc" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" + +[[package]] +name = "libloading" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "loupe" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" +dependencies = [ + "indexmap", + "loupe-derive", + "rustversion", +] + +[[package]] +name = "loupe-derive" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memmap2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "more-asserts" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +dependencies = [ + "crc32fast", + "hashbrown 0.11.2", + "indexmap", + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parity-wasm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.3", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rayon" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regalloc" +version = "0.0.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +dependencies = [ + "log", + "rustc-hash", + "smallvec", +] + +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags", + "libc", + "mach", + "winapi", +] + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "rend" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +dependencies = [ + "bytecheck", +] + +[[package]] +name = "rfc6979" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +dependencies = [ + "crypto-bigint", + "hmac", + "zeroize", +] + +[[package]] +name = "rkyv" +version = "0.7.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5230ae2981a885590b0dc84e0b24c0ed23ad24f7adc0eb824b26cafa961f7c36" +dependencies = [ + "bytecheck", + "hashbrown 0.12.0", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc752d5925dbcb324522f3a4c93193d17f107b2e11810913aa3ad352fa01480" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "rust-argon2" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustversion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "schemars" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a48d098c2a7fdf5740b19deb1181b4fb8a9e68e03ae517c14cde04b5725409" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9ea2a613fe4cd7118b2bb101a25d8ae6192e1975179b67b2f17afd11e70ac8" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-json-wasm" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_derive_internals" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures 0.1.5", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + +[[package]] +name = "signature" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +dependencies = [ + "digest 0.10.3", + "rand_core 0.6.3", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "target-lexicon" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" + +[[package]] +name = "tempfile" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +dependencies = [ + "cfg-if", + "libc", + "rand", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "tests" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "rust-argon2", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "thiserror" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + +[[package]] +name = "uint" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasm-bindgen" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" + +[[package]] +name = "wasmer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" +dependencies = [ + "cfg-if", + "indexmap", + "js-sys", + "loupe", + "more-asserts", + "target-lexicon", + "thiserror", + "wasm-bindgen", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-compiler-cranelift", + "wasmer-compiler-singlepass", + "wasmer-derive", + "wasmer-engine", + "wasmer-engine-dylib", + "wasmer-engine-universal", + "wasmer-types", + "wasmer-vm", + "winapi", +] + +[[package]] +name = "wasmer-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" +dependencies = [ + "enumset", + "loupe", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-compiler" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" +dependencies = [ + "enumset", + "loupe", + "rkyv", + "serde", + "serde_bytes", + "smallvec", + "target-lexicon", + "thiserror", + "wasmer-types", + "wasmparser", +] + +[[package]] +name = "wasmer-compiler-cranelift" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "gimli 0.26.1", + "loupe", + "more-asserts", + "rayon", + "smallvec", + "target-lexicon", + "tracing", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-compiler-singlepass" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ca2a35204d8befa85062bc7aac259a8db8070b801b8a783770ba58231d729e" +dependencies = [ + "byteorder", + "dynasm", + "dynasmrt", + "gimli 0.26.1", + "lazy_static", + "loupe", + "more-asserts", + "rayon", + "smallvec", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-derive" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasmer-engine" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" +dependencies = [ + "backtrace", + "enumset", + "lazy_static", + "loupe", + "memmap2", + "more-asserts", + "rustc-demangle", + "serde", + "serde_bytes", + "target-lexicon", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-engine-dylib" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" +dependencies = [ + "cfg-if", + "enum-iterator", + "enumset", + "leb128", + "libloading", + "loupe", + "object 0.28.3", + "rkyv", + "serde", + "tempfile", + "tracing", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-engine", + "wasmer-object", + "wasmer-types", + "wasmer-vm", + "which", +] + +[[package]] +name = "wasmer-engine-universal" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" +dependencies = [ + "cfg-if", + "enumset", + "leb128", + "loupe", + "region", + "rkyv", + "wasmer-compiler", + "wasmer-engine", + "wasmer-engine-universal-artifact", + "wasmer-types", + "wasmer-vm", + "winapi", +] + +[[package]] +name = "wasmer-engine-universal-artifact" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" +dependencies = [ + "enum-iterator", + "enumset", + "loupe", + "rkyv", + "thiserror", + "wasmer-artifact", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-middlewares" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" +dependencies = [ + "loupe", + "wasmer", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-object" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" +dependencies = [ + "object 0.28.3", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-types" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" +dependencies = [ + "backtrace", + "enum-iterator", + "indexmap", + "loupe", + "more-asserts", + "rkyv", + "serde", + "thiserror", +] + +[[package]] +name = "wasmer-vm" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" +dependencies = [ + "backtrace", + "cc", + "cfg-if", + "corosensei", + "enum-iterator", + "indexmap", + "lazy_static", + "libc", + "loupe", + "mach", + "memoffset", + "more-asserts", + "region", + "rkyv", + "scopeguard", + "serde", + "thiserror", + "wasmer-artifact", + "wasmer-types", + "winapi", +] + +[[package]] +name = "wasmparser" +version = "0.83.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" + +[[package]] +name = "which" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" +dependencies = [ + "either", + "libc", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" + +[[package]] +name = "windows_i686_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" + +[[package]] +name = "windows_i686_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" + +[[package]] +name = "zeroize" +version = "1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/tests/Cargo.toml b/contracts/tests/Cargo.toml new file mode 100644 index 000000000..331d1588a --- /dev/null +++ b/contracts/tests/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "tests" +version = "0.0.0" +authors = ["Tomasz Kurcz "] +edition = "2021" +publish = false +license = "Apache-2.0" + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +opt-level = 3 +debug = false +rpath = false +lto = true +debug-assertions = false +codegen-units = 1 +panic = 'abort' +incremental = false +overflow-checks = true + +[features] +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. +cranelift = ["cosmwasm-vm/cranelift"] +# For quicker tests, cargo test --lib. for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] + +[dependencies] +cosmwasm-schema = { path = "../../packages/schema" } +cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } +rust-argon2 = "0.8" +schemars = "0.8.1" +serde = { version = "1.0.103", default-features = false, features = ["derive"] } +thiserror = "1.0" + +[dev-dependencies] +cosmwasm-storage = { path = "../../packages/storage", default-features = false } +cosmwasm-vm = { path = "../../packages/vm", default-features = false } diff --git a/contracts/tests/examples/schema.rs b/contracts/tests/examples/schema.rs new file mode 100644 index 000000000..3334c0d40 --- /dev/null +++ b/contracts/tests/examples/schema.rs @@ -0,0 +1,12 @@ +use cosmwasm_schema::write_api; +use cosmwasm_std::Empty; + +use tests::msg::ExecuteMsg; + +fn main() { + write_api! { + instantiate: Empty, + // query: QueryMsg, + execute: ExecuteMsg, + } +} diff --git a/contracts/tests/schema/tests.json b/contracts/tests/schema/tests.json new file mode 100644 index 000000000..696c3a8cf --- /dev/null +++ b/contracts/tests/schema/tests.json @@ -0,0 +1,53 @@ +{ + "contract_name": "tests", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Hashes some data. Uses CPU and memory, but no external calls.", + "type": "object", + "required": [ + "argon2" + ], + "properties": { + "argon2": { + "type": "object", + "required": [ + "mem_cost", + "time_cost" + ], + "properties": { + "mem_cost": { + "description": "The amount of memory requested (KB).", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "time_cost": { + "description": "The number of passes.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "query": null, + "migrate": null, + "sudo": null, + "responses": null +} diff --git a/contracts/tests/src/contract.rs b/contracts/tests/src/contract.rs new file mode 100644 index 000000000..a96e4bc19 --- /dev/null +++ b/contracts/tests/src/contract.rs @@ -0,0 +1,59 @@ +use cosmwasm_std::{entry_point, DepsMut, Empty, Env, MessageInfo, Response, StdError}; + +use crate::errors::HackError; +use crate::msg::ExecuteMsg; + +#[entry_point] +pub fn instantiate( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + _msg: Empty, +) -> Result { + deps.api.debug("here we go 🚀"); + + // This adds some unrelated event attribute for testing purposes + Ok(Response::new().add_attribute("Let the", "hacking begin")) +} + +#[entry_point] +pub fn execute( + _deps: DepsMut, + _env: Env, + _info: MessageInfo, + msg: ExecuteMsg, +) -> Result { + match msg { + ExecuteMsg::Argon2 { + mem_cost, + time_cost, + } => do_argon2(mem_cost, time_cost), + } +} + +fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { + let password = b"password"; + let salt = b"othersalt"; + let config = argon2::Config { + variant: argon2::Variant::Argon2i, + version: argon2::Version::Version13, + mem_cost, + time_cost, + lanes: 4, + thread_mode: argon2::ThreadMode::Sequential, + secret: &[], + ad: &[], + hash_length: 32, + }; + let hash = argon2::hash_encoded(password, salt, &config) + .map_err(|e| StdError::generic_err(format!("hash_encoded errored: {}", e)))?; + // let matches = argon2::verify_encoded(&hash, password).unwrap(); + // assert!(matches); + Ok(Response::new().set_data(hash.into_bytes())) + //Ok(Response::new()) +} + +// #[entry_point] +// pub fn query(_deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { +// match msg {} +// } diff --git a/contracts/tests/src/errors.rs b/contracts/tests/src/errors.rs new file mode 100644 index 000000000..7b46b00b6 --- /dev/null +++ b/contracts/tests/src/errors.rs @@ -0,0 +1,12 @@ +use cosmwasm_std::StdError; +use thiserror::Error; + +#[derive(Error, Debug, PartialEq)] +pub enum HackError { + #[error("{0}")] + /// this is needed so we can use `bucket.load(...)?` and have it auto-converted to the custom error + Std(#[from] StdError), + // this is whatever we want + #[error("Unauthorized")] + Unauthorized {}, +} diff --git a/contracts/tests/src/lib.rs b/contracts/tests/src/lib.rs new file mode 100644 index 000000000..9ef042792 --- /dev/null +++ b/contracts/tests/src/lib.rs @@ -0,0 +1,3 @@ +pub mod contract; +pub mod errors; +pub mod msg; diff --git a/contracts/tests/src/msg.rs b/contracts/tests/src/msg.rs new file mode 100644 index 000000000..513365a1e --- /dev/null +++ b/contracts/tests/src/msg.rs @@ -0,0 +1,18 @@ +use cosmwasm_schema::cw_serde; + +// failure modes to help test wasmd, based on this comment +// https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 +#[cw_serde] +pub enum ExecuteMsg { + /// Hashes some data. Uses CPU and memory, but no external calls. + Argon2 { + /// The amount of memory requested (KB). + mem_cost: u32, + /// The number of passes. + time_cost: u32, + }, +} + +// #[cw_serde] +// #[derive(QueryResponses)] +// pub enum QueryMsg {} diff --git a/contracts/tests/tests/integration.rs b/contracts/tests/tests/integration.rs new file mode 100644 index 000000000..3c144d81c --- /dev/null +++ b/contracts/tests/tests/integration.rs @@ -0,0 +1,54 @@ +//! This integration test tries to run and call the generated wasm. +//! It depends on a Wasm build being available, which you can create with `cargo wasm`. +//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm. +//! +//! You can easily convert unit tests to integration tests as follows: +//! 1. Copy them over verbatim +//! 2. Then change +//! let mut deps = mock_dependencies(20, &[]); +//! to +//! let mut deps = mock_instance(WASM, &[]); +//! 3. If you access raw storage, where ever you see something like: +//! deps.storage.get(CONFIG_KEY).expect("no data stored"); +//! replace it with: +//! deps.with_storage(|store| { +//! let data = store.get(CONFIG_KEY).expect("no data stored"); +//! //... +//! }); +//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...) + +use cosmwasm_std::{Empty, Response}; +use cosmwasm_vm::testing::{ + execute, instantiate, mock_env, mock_info, mock_instance_with_gas_limit, +}; + +use tests::msg::ExecuteMsg; + +static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/tests.wasm"); + +#[test] +fn execute_argon2() { + let mut deps = mock_instance_with_gas_limit(WASM, 100_000_000_000_000); + + let init_info = mock_info("admin", &[]); + let init_res: Response = instantiate(&mut deps, mock_env(), init_info, Empty {}).unwrap(); + assert_eq!(0, init_res.messages.len()); + + let gas_before = deps.get_gas_left(); + let _execute_res: Response = execute( + &mut deps, + mock_env(), + mock_info("admin", &[]), + ExecuteMsg::Argon2 { + mem_cost: 256, + time_cost: 5, + }, + ) + .unwrap(); + let gas_used = gas_before - deps.get_gas_left(); + // Note: the exact gas usage depends on the Rust version used to compile Wasm, + // which we only fix when using rust-optimizer, not integration tests. + let expected = 8635688250000; // +/- 20% + assert!(gas_used > expected * 80 / 100, "Gas used: {}", gas_used); + assert!(gas_used < expected * 120 / 100, "Gas used: {}", gas_used); +} From 33107a79c0911d19cf6c688b5038062a83f98614 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 14:46:34 +0200 Subject: [PATCH 208/344] Remove argon2 test from hackatom --- Cargo.lock | 42 ------------------------- contracts/hackatom/Cargo.lock | 42 ------------------------- contracts/hackatom/Cargo.toml | 1 - contracts/hackatom/src/contract.rs | 26 --------------- contracts/hackatom/src/msg.rs | 7 ----- contracts/hackatom/tests/integration.rs | 32 +------------------ 6 files changed, 1 insertion(+), 149 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 737de9a89..47941b28b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,18 +43,6 @@ version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "atty" version = "0.2.14" @@ -111,17 +99,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -254,12 +231,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "corosensei" version = "0.1.3" @@ -928,7 +899,6 @@ version = "0.0.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "rust-argon2", "schemars", "serde", "sha2 0.9.9", @@ -1525,18 +1495,6 @@ dependencies = [ "syn", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - [[package]] name = "rustc-demangle" version = "0.1.21" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 46fd5b79f..609a12476 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -28,18 +28,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "autocfg" version = "1.1.0" @@ -85,17 +73,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -171,12 +148,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "corosensei" version = "0.1.3" @@ -740,7 +711,6 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cosmwasm-vm", - "rust-argon2", "schemars", "serde", "sha2 0.9.5", @@ -1233,18 +1203,6 @@ dependencies = [ "syn", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - [[package]] name = "rustc-demangle" version = "0.1.20" diff --git a/contracts/hackatom/Cargo.toml b/contracts/hackatom/Cargo.toml index b5eb85528..38d6a9274 100644 --- a/contracts/hackatom/Cargo.toml +++ b/contracts/hackatom/Cargo.toml @@ -33,7 +33,6 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } -rust-argon2 = "0.8" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } sha2 = "0.9.1" diff --git a/contracts/hackatom/src/contract.rs b/contracts/hackatom/src/contract.rs index 9bc34efe7..a5780142c 100644 --- a/contracts/hackatom/src/contract.rs +++ b/contracts/hackatom/src/contract.rs @@ -70,10 +70,6 @@ pub fn execute( ) -> Result { match msg { ExecuteMsg::Release {} => do_release(deps, env, info), - ExecuteMsg::Argon2 { - mem_cost, - time_cost, - } => do_argon2(mem_cost, time_cost), ExecuteMsg::CpuLoop {} => do_cpu_loop(), ExecuteMsg::StorageLoop {} => do_storage_loop(deps), ExecuteMsg::MemoryLoop {} => do_memory_loop(), @@ -110,28 +106,6 @@ fn do_release(deps: DepsMut, env: Env, info: MessageInfo) -> Result Result { - let password = b"password"; - let salt = b"othersalt"; - let config = argon2::Config { - variant: argon2::Variant::Argon2i, - version: argon2::Version::Version13, - mem_cost, - time_cost, - lanes: 4, - thread_mode: argon2::ThreadMode::Sequential, - secret: &[], - ad: &[], - hash_length: 32, - }; - let hash = argon2::hash_encoded(password, salt, &config) - .map_err(|e| StdError::generic_err(format!("hash_encoded errored: {}", e)))?; - // let matches = argon2::verify_encoded(&hash, password).unwrap(); - // assert!(matches); - Ok(Response::new().set_data(hash.into_bytes())) - //Ok(Response::new()) -} - fn do_cpu_loop() -> Result { let mut counter = 0u64; loop { diff --git a/contracts/hackatom/src/msg.rs b/contracts/hackatom/src/msg.rs index 22cb25558..16c454aad 100644 --- a/contracts/hackatom/src/msg.rs +++ b/contracts/hackatom/src/msg.rs @@ -37,13 +37,6 @@ pub enum SudoMsg { pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. Release {}, - /// Hashes some data. Uses CPU and memory, but no external calls. - Argon2 { - /// The amount of memory requested (KB). - mem_cost: u32, - /// The number of passes. - time_cost: u32, - }, /// Infinite loop to burn cpu cycles (only run when metering is enabled) CpuLoop {}, /// Infinite loop making storage calls (to test when their limit hits) diff --git a/contracts/hackatom/tests/integration.rs b/contracts/hackatom/tests/integration.rs index 172fae02b..03be6e685 100644 --- a/contracts/hackatom/tests/integration.rs +++ b/contracts/hackatom/tests/integration.rs @@ -25,8 +25,7 @@ use cosmwasm_vm::{ call_execute, from_slice, testing::{ execute, instantiate, migrate, mock_env, mock_info, mock_instance, - mock_instance_with_balances, mock_instance_with_gas_limit, query, sudo, test_io, - MOCK_CONTRACT_ADDR, + mock_instance_with_balances, query, sudo, test_io, MOCK_CONTRACT_ADDR, }, Storage, VmError, }; @@ -307,35 +306,6 @@ fn execute_release_fails_for_wrong_sender() { ); } -#[test] -fn execute_argon2() { - let mut deps = mock_instance_with_gas_limit(WASM, 100_000_000_000_000); - - let (instantiate_msg, creator) = make_init_msg(); - let init_info = mock_info(creator.as_str(), &[]); - let init_res: Response = - instantiate(&mut deps, mock_env(), init_info, instantiate_msg).unwrap(); - assert_eq!(0, init_res.messages.len()); - - let gas_before = deps.get_gas_left(); - let _execute_res: Response = execute( - &mut deps, - mock_env(), - mock_info(creator.as_str(), &[]), - ExecuteMsg::Argon2 { - mem_cost: 256, - time_cost: 5, - }, - ) - .unwrap(); - let gas_used = gas_before - deps.get_gas_left(); - // Note: the exact gas usage depends on the Rust version used to compile Wasm, - // which we only fix when using rust-optimizer, not integration tests. - let expected = 8635688250000; // +/- 20% - assert!(gas_used > expected * 80 / 100, "Gas used: {}", gas_used); - assert!(gas_used < expected * 120 / 100, "Gas used: {}", gas_used); -} - #[test] fn execute_cpu_loop() { let mut deps = mock_instance(WASM, &[]); From 8e52ec6679b7ea059a4148c988c4e308431660c5 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 18:03:18 +0200 Subject: [PATCH 209/344] testing contract: test the MirrorEnv endpoints --- contracts/tests/src/contract.rs | 26 ++++++++++++++------- contracts/tests/src/msg.rs | 15 ++++++++---- contracts/tests/tests/integration.rs | 34 +++++++++++++++++++++++++--- packages/std/src/types.rs | 6 ++--- 4 files changed, 63 insertions(+), 18 deletions(-) diff --git a/contracts/tests/src/contract.rs b/contracts/tests/src/contract.rs index a96e4bc19..b80d76831 100644 --- a/contracts/tests/src/contract.rs +++ b/contracts/tests/src/contract.rs @@ -1,7 +1,10 @@ -use cosmwasm_std::{entry_point, DepsMut, Empty, Env, MessageInfo, Response, StdError}; +use cosmwasm_std::{ + entry_point, to_binary, Deps, DepsMut, Empty, Env, MessageInfo, QueryResponse, Response, + StdError, StdResult, +}; use crate::errors::HackError; -use crate::msg::ExecuteMsg; +use crate::msg::{ExecuteMsg, QueryMsg}; #[entry_point] pub fn instantiate( @@ -19,15 +22,18 @@ pub fn instantiate( #[entry_point] pub fn execute( _deps: DepsMut, - _env: Env, + env: Env, _info: MessageInfo, msg: ExecuteMsg, ) -> Result { + use ExecuteMsg::*; + match msg { - ExecuteMsg::Argon2 { + Argon2 { mem_cost, time_cost, } => do_argon2(mem_cost, time_cost), + MirrorEnv {} => Ok(Response::new().set_data(to_binary(&env)?)), } } @@ -53,7 +59,11 @@ fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { //Ok(Response::new()) } -// #[entry_point] -// pub fn query(_deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { -// match msg {} -// } +#[entry_point] +pub fn query(_deps: Deps, env: Env, msg: QueryMsg) -> StdResult { + use QueryMsg::*; + + match msg { + MirrorEnv {} => to_binary(&env), + } +} diff --git a/contracts/tests/src/msg.rs b/contracts/tests/src/msg.rs index 513365a1e..8d3ad6906 100644 --- a/contracts/tests/src/msg.rs +++ b/contracts/tests/src/msg.rs @@ -1,4 +1,5 @@ -use cosmwasm_schema::cw_serde; +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::Env; // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 @@ -11,8 +12,14 @@ pub enum ExecuteMsg { /// The number of passes. time_cost: u32, }, + /// Returns the env for testing + MirrorEnv {}, } -// #[cw_serde] -// #[derive(QueryResponses)] -// pub enum QueryMsg {} +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + /// Returns the env for testing + #[returns(Env)] + MirrorEnv {}, +} diff --git a/contracts/tests/tests/integration.rs b/contracts/tests/tests/integration.rs index 3c144d81c..ef45459a1 100644 --- a/contracts/tests/tests/integration.rs +++ b/contracts/tests/tests/integration.rs @@ -17,12 +17,12 @@ //! }); //! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...) -use cosmwasm_std::{Empty, Response}; +use cosmwasm_std::{from_binary, Empty, Env, Response}; use cosmwasm_vm::testing::{ - execute, instantiate, mock_env, mock_info, mock_instance_with_gas_limit, + execute, instantiate, mock_env, mock_info, mock_instance, mock_instance_with_gas_limit, query, }; -use tests::msg::ExecuteMsg; +use tests::msg::{ExecuteMsg, QueryMsg}; static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/tests.wasm"); @@ -52,3 +52,31 @@ fn execute_argon2() { assert!(gas_used > expected * 80 / 100, "Gas used: {}", gas_used); assert!(gas_used < expected * 120 / 100, "Gas used: {}", gas_used); } + +#[test] +fn test_env() { + let mut deps = mock_instance(WASM, &[]); + + let init_info = mock_info("admin", &[]); + let init_res: Response = instantiate(&mut deps, mock_env(), init_info, Empty {}).unwrap(); + assert_eq!(0, init_res.messages.len()); + + let env = mock_env(); + let res: Response = execute( + &mut deps, + env.clone(), + mock_info("admin", &[]), + ExecuteMsg::MirrorEnv {}, + ) + .unwrap(); + + let received_env: Env = from_binary(&res.data.unwrap()).unwrap(); + + assert_eq!(received_env, env); + + let env = mock_env(); + let received_env: Env = + from_binary(&query(&mut deps, env.clone(), QueryMsg::MirrorEnv {}).unwrap()).unwrap(); + + assert_eq!(received_env, env); +} diff --git a/packages/std/src/types.rs b/packages/std/src/types.rs index 5140f5f38..17f11f00c 100644 --- a/packages/std/src/types.rs +++ b/packages/std/src/types.rs @@ -5,7 +5,7 @@ use crate::addresses::Addr; use crate::coins::Coin; use crate::timestamp::Timestamp; -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct Env { pub block: BlockInfo, /// Information on the transaction this message was executed in. @@ -15,7 +15,7 @@ pub struct Env { pub contract: ContractInfo, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct TransactionInfo { /// The position of this transaction in the block. The first /// transaction has index 0. @@ -105,7 +105,7 @@ pub struct MessageInfo { pub funds: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct ContractInfo { pub address: Addr, } From 0d912f95de87ff9faaf0c56b523e85339962d921 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 29 Aug 2022 18:34:14 +0200 Subject: [PATCH 210/344] Remove copies of hackatom's ExecuteMsg comment --- contracts/floaty/src/msg.rs | 2 -- packages/schema/tests/idl.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/contracts/floaty/src/msg.rs b/contracts/floaty/src/msg.rs index 926493b1c..f85de9a65 100644 --- a/contracts/floaty/src/msg.rs +++ b/contracts/floaty/src/msg.rs @@ -7,8 +7,6 @@ pub struct InstantiateMsg { pub beneficiary: String, } -// failure modes to help test wasmd, based on this comment -// https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 #[cw_serde] pub enum ExecuteMsg { /// Releasing all funds in the contract to the beneficiary. This is the only "proper" action of this demo contract. diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 4919e8f77..4da2670a8 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -11,8 +11,6 @@ pub struct InstantiateMsg { pub cap: u128, } -// failure modes to help test wasmd, based on this comment -// https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub enum ExecuteMsg { From 185d57bda30b591fec0283fe17dcc7d9f083713a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 19:01:49 +0200 Subject: [PATCH 211/344] testing contract: remove unused Error variant Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- contracts/tests/src/errors.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/contracts/tests/src/errors.rs b/contracts/tests/src/errors.rs index 7b46b00b6..64e6a3499 100644 --- a/contracts/tests/src/errors.rs +++ b/contracts/tests/src/errors.rs @@ -6,7 +6,4 @@ pub enum HackError { #[error("{0}")] /// this is needed so we can use `bucket.load(...)?` and have it auto-converted to the custom error Std(#[from] StdError), - // this is whatever we want - #[error("Unauthorized")] - Unauthorized {}, } From ce5da3800e522e0abf1240314bcbfb284bd0a9b2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 19:04:13 +0200 Subject: [PATCH 212/344] Update contract schemas --- contracts/hackatom/schema/hackatom.json | 32 ------ contracts/tests/examples/schema.rs | 4 +- contracts/tests/schema/tests.json | 136 +++++++++++++++++++++++- 3 files changed, 136 insertions(+), 36 deletions(-) diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json index f498fe07f..3bdc458a8 100644 --- a/contracts/hackatom/schema/hackatom.json +++ b/contracts/hackatom/schema/hackatom.json @@ -38,38 +38,6 @@ }, "additionalProperties": false }, - { - "description": "Hashes some data. Uses CPU and memory, but no external calls.", - "type": "object", - "required": [ - "argon2" - ], - "properties": { - "argon2": { - "type": "object", - "required": [ - "mem_cost", - "time_cost" - ], - "properties": { - "mem_cost": { - "description": "The amount of memory requested (KB).", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "time_cost": { - "description": "The number of passes.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, { "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", "type": "object", diff --git a/contracts/tests/examples/schema.rs b/contracts/tests/examples/schema.rs index 3334c0d40..c96d3bcde 100644 --- a/contracts/tests/examples/schema.rs +++ b/contracts/tests/examples/schema.rs @@ -1,12 +1,12 @@ use cosmwasm_schema::write_api; use cosmwasm_std::Empty; -use tests::msg::ExecuteMsg; +use tests::msg::{ExecuteMsg, QueryMsg}; fn main() { write_api! { instantiate: Empty, - // query: QueryMsg, + query: QueryMsg, execute: ExecuteMsg, } } diff --git a/contracts/tests/schema/tests.json b/contracts/tests/schema/tests.json index 696c3a8cf..6271ee8e6 100644 --- a/contracts/tests/schema/tests.json +++ b/contracts/tests/schema/tests.json @@ -43,11 +43,143 @@ } }, "additionalProperties": false + }, + { + "description": "Returns the env for testing", + "type": "object", + "required": [ + "mirror_env" + ], + "properties": { + "mirror_env": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Returns the env for testing", + "type": "object", + "required": [ + "mirror_env" + ], + "properties": { + "mirror_env": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false } ] }, - "query": null, "migrate": null, "sudo": null, - "responses": null + "responses": { + "mirror_env": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Env", + "type": "object", + "required": [ + "block", + "contract" + ], + "properties": { + "block": { + "$ref": "#/definitions/BlockInfo" + }, + "contract": { + "$ref": "#/definitions/ContractInfo" + }, + "transaction": { + "description": "Information on the transaction this message was executed in. The field is unset when the `MsgExecuteContract`/`MsgInstantiateContract`/`MsgMigrateContract` is not executed as part of a transaction.", + "anyOf": [ + { + "$ref": "#/definitions/TransactionInfo" + }, + { + "type": "null" + } + ] + } + }, + "definitions": { + "Addr": { + "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", + "type": "string" + }, + "BlockInfo": { + "type": "object", + "required": [ + "chain_id", + "height", + "time" + ], + "properties": { + "chain_id": { + "type": "string" + }, + "height": { + "description": "The height of a block is the number of blocks preceding it in the blockchain.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "time": { + "description": "Absolute time of the block creation in seconds since the UNIX epoch (00:00:00 on 1970-01-01 UTC).\n\nThe source of this is the [BFT Time in Tendermint](https://github.com/tendermint/tendermint/blob/58dc1726/spec/consensus/bft-time.md), which has the same nanosecond precision as the `Timestamp` type.\n\n# Examples\n\nUsing chrono:\n\n``` # use cosmwasm_std::{Addr, BlockInfo, ContractInfo, Env, MessageInfo, Timestamp, TransactionInfo}; # let env = Env { # block: BlockInfo { # height: 12_345, # time: Timestamp::from_nanos(1_571_797_419_879_305_533), # chain_id: \"cosmos-testnet-14002\".to_string(), # }, # transaction: Some(TransactionInfo { index: 3 }), # contract: ContractInfo { # address: Addr::unchecked(\"contract\"), # }, # }; # extern crate chrono; use chrono::NaiveDateTime; let seconds = env.block.time.seconds(); let nsecs = env.block.time.subsec_nanos(); let dt = NaiveDateTime::from_timestamp(seconds as i64, nsecs as u32); ```\n\nCreating a simple millisecond-precision timestamp (as used in JavaScript):\n\n``` # use cosmwasm_std::{Addr, BlockInfo, ContractInfo, Env, MessageInfo, Timestamp, TransactionInfo}; # let env = Env { # block: BlockInfo { # height: 12_345, # time: Timestamp::from_nanos(1_571_797_419_879_305_533), # chain_id: \"cosmos-testnet-14002\".to_string(), # }, # transaction: Some(TransactionInfo { index: 3 }), # contract: ContractInfo { # address: Addr::unchecked(\"contract\"), # }, # }; let millis = env.block.time.nanos() / 1_000_000; ```", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + } + } + }, + "ContractInfo": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TransactionInfo": { + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "description": "The position of this transaction in the block. The first transaction has index 0.\n\nThis allows you to get a unique transaction indentifier in this chain using the pair (`env.block.height`, `env.transaction.index`).", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + } + } } From 546cf46f23057155337b402c8e931029ac6295a4 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 19:04:40 +0200 Subject: [PATCH 213/344] testing contract: rename Error type --- contracts/tests/src/contract.rs | 8 ++++---- contracts/tests/src/errors.rs | 2 +- contracts/tests/src/msg.rs | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/contracts/tests/src/contract.rs b/contracts/tests/src/contract.rs index b80d76831..90da3e29d 100644 --- a/contracts/tests/src/contract.rs +++ b/contracts/tests/src/contract.rs @@ -3,7 +3,7 @@ use cosmwasm_std::{ StdError, StdResult, }; -use crate::errors::HackError; +use crate::errors::ContractError; use crate::msg::{ExecuteMsg, QueryMsg}; #[entry_point] @@ -12,7 +12,7 @@ pub fn instantiate( _env: Env, _info: MessageInfo, _msg: Empty, -) -> Result { +) -> Result { deps.api.debug("here we go 🚀"); // This adds some unrelated event attribute for testing purposes @@ -25,7 +25,7 @@ pub fn execute( env: Env, _info: MessageInfo, msg: ExecuteMsg, -) -> Result { +) -> Result { use ExecuteMsg::*; match msg { @@ -37,7 +37,7 @@ pub fn execute( } } -fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { +fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { let password = b"password"; let salt = b"othersalt"; let config = argon2::Config { diff --git a/contracts/tests/src/errors.rs b/contracts/tests/src/errors.rs index 64e6a3499..970745b4c 100644 --- a/contracts/tests/src/errors.rs +++ b/contracts/tests/src/errors.rs @@ -2,7 +2,7 @@ use cosmwasm_std::StdError; use thiserror::Error; #[derive(Error, Debug, PartialEq)] -pub enum HackError { +pub enum ContractError { #[error("{0}")] /// this is needed so we can use `bucket.load(...)?` and have it auto-converted to the custom error Std(#[from] StdError), diff --git a/contracts/tests/src/msg.rs b/contracts/tests/src/msg.rs index 8d3ad6906..c171a8502 100644 --- a/contracts/tests/src/msg.rs +++ b/contracts/tests/src/msg.rs @@ -1,5 +1,4 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use cosmwasm_std::Env; // failure modes to help test wasmd, based on this comment // https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 @@ -20,6 +19,6 @@ pub enum ExecuteMsg { #[derive(QueryResponses)] pub enum QueryMsg { /// Returns the env for testing - #[returns(Env)] + #[returns(cosmwasm_std::Env)] MirrorEnv {}, } From 582b324518405f9a46d1879fe98c2db4ea089b20 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 19:09:25 +0200 Subject: [PATCH 214/344] rename the `tests` contract to `cyberpunk` --- contracts/{tests => cyberpunk}/.cargo/config | 0 contracts/{tests => cyberpunk}/Cargo.lock | 28 +++++++++---------- contracts/{tests => cyberpunk}/Cargo.toml | 2 +- .../{tests => cyberpunk}/examples/schema.rs | 2 +- .../schema/cyberpunk.json} | 2 +- .../{tests => cyberpunk}/src/contract.rs | 0 contracts/{tests => cyberpunk}/src/errors.rs | 0 contracts/{tests => cyberpunk}/src/lib.rs | 0 contracts/{tests => cyberpunk}/src/msg.rs | 0 .../{tests => cyberpunk}/tests/integration.rs | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) rename contracts/{tests => cyberpunk}/.cargo/config (100%) rename contracts/{tests => cyberpunk}/Cargo.lock (99%) rename contracts/{tests => cyberpunk}/Cargo.toml (98%) rename contracts/{tests => cyberpunk}/examples/schema.rs (80%) rename contracts/{tests/schema/tests.json => cyberpunk/schema/cyberpunk.json} (99%) rename contracts/{tests => cyberpunk}/src/contract.rs (100%) rename contracts/{tests => cyberpunk}/src/errors.rs (100%) rename contracts/{tests => cyberpunk}/src/lib.rs (100%) rename contracts/{tests => cyberpunk}/src/msg.rs (100%) rename contracts/{tests => cyberpunk}/tests/integration.rs (98%) diff --git a/contracts/tests/.cargo/config b/contracts/cyberpunk/.cargo/config similarity index 100% rename from contracts/tests/.cargo/config rename to contracts/cyberpunk/.cargo/config diff --git a/contracts/tests/Cargo.lock b/contracts/cyberpunk/Cargo.lock similarity index 99% rename from contracts/tests/Cargo.lock rename to contracts/cyberpunk/Cargo.lock index 2e56f0dba..c440abc2d 100644 --- a/contracts/tests/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -442,6 +442,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cyberpunk" +version = "0.0.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "rust-argon2", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "darling" version = "0.13.0" @@ -1469,20 +1483,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "tests" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "cosmwasm-vm", - "rust-argon2", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "thiserror" version = "1.0.26" diff --git a/contracts/tests/Cargo.toml b/contracts/cyberpunk/Cargo.toml similarity index 98% rename from contracts/tests/Cargo.toml rename to contracts/cyberpunk/Cargo.toml index 331d1588a..2c73e9397 100644 --- a/contracts/tests/Cargo.toml +++ b/contracts/cyberpunk/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tests" +name = "cyberpunk" version = "0.0.0" authors = ["Tomasz Kurcz "] edition = "2021" diff --git a/contracts/tests/examples/schema.rs b/contracts/cyberpunk/examples/schema.rs similarity index 80% rename from contracts/tests/examples/schema.rs rename to contracts/cyberpunk/examples/schema.rs index c96d3bcde..2716b7829 100644 --- a/contracts/tests/examples/schema.rs +++ b/contracts/cyberpunk/examples/schema.rs @@ -1,7 +1,7 @@ use cosmwasm_schema::write_api; use cosmwasm_std::Empty; -use tests::msg::{ExecuteMsg, QueryMsg}; +use cyberpunk::msg::{ExecuteMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/tests/schema/tests.json b/contracts/cyberpunk/schema/cyberpunk.json similarity index 99% rename from contracts/tests/schema/tests.json rename to contracts/cyberpunk/schema/cyberpunk.json index 6271ee8e6..9439d3055 100644 --- a/contracts/tests/schema/tests.json +++ b/contracts/cyberpunk/schema/cyberpunk.json @@ -1,5 +1,5 @@ { - "contract_name": "tests", + "contract_name": "cyberpunk", "contract_version": "0.0.0", "idl_version": "1.0.0", "instantiate": { diff --git a/contracts/tests/src/contract.rs b/contracts/cyberpunk/src/contract.rs similarity index 100% rename from contracts/tests/src/contract.rs rename to contracts/cyberpunk/src/contract.rs diff --git a/contracts/tests/src/errors.rs b/contracts/cyberpunk/src/errors.rs similarity index 100% rename from contracts/tests/src/errors.rs rename to contracts/cyberpunk/src/errors.rs diff --git a/contracts/tests/src/lib.rs b/contracts/cyberpunk/src/lib.rs similarity index 100% rename from contracts/tests/src/lib.rs rename to contracts/cyberpunk/src/lib.rs diff --git a/contracts/tests/src/msg.rs b/contracts/cyberpunk/src/msg.rs similarity index 100% rename from contracts/tests/src/msg.rs rename to contracts/cyberpunk/src/msg.rs diff --git a/contracts/tests/tests/integration.rs b/contracts/cyberpunk/tests/integration.rs similarity index 98% rename from contracts/tests/tests/integration.rs rename to contracts/cyberpunk/tests/integration.rs index ef45459a1..73872d963 100644 --- a/contracts/tests/tests/integration.rs +++ b/contracts/cyberpunk/tests/integration.rs @@ -22,7 +22,7 @@ use cosmwasm_vm::testing::{ execute, instantiate, mock_env, mock_info, mock_instance, mock_instance_with_gas_limit, query, }; -use tests::msg::{ExecuteMsg, QueryMsg}; +use cyberpunk::msg::{ExecuteMsg, QueryMsg}; static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/tests.wasm"); From 290248061a53a7c3330f2d3a5e31896e8a8d4fc9 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 20:02:32 +0200 Subject: [PATCH 215/344] style --- contracts/cyberpunk/src/contract.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contracts/cyberpunk/src/contract.rs b/contracts/cyberpunk/src/contract.rs index 90da3e29d..01b79e4dc 100644 --- a/contracts/cyberpunk/src/contract.rs +++ b/contracts/cyberpunk/src/contract.rs @@ -32,12 +32,12 @@ pub fn execute( Argon2 { mem_cost, time_cost, - } => do_argon2(mem_cost, time_cost), - MirrorEnv {} => Ok(Response::new().set_data(to_binary(&env)?)), + } => execute_argon2(mem_cost, time_cost), + MirrorEnv {} => execute_mirror_env(env), } } -fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { +fn execute_argon2(mem_cost: u32, time_cost: u32) -> Result { let password = b"password"; let salt = b"othersalt"; let config = argon2::Config { @@ -59,6 +59,10 @@ fn do_argon2(mem_cost: u32, time_cost: u32) -> Result { //Ok(Response::new()) } +fn execute_mirror_env(env: Env) -> Result { + Ok(Response::new().set_data(to_binary(&env)?)) +} + #[entry_point] pub fn query(_deps: Deps, env: Env, msg: QueryMsg) -> StdResult { use QueryMsg::*; From 619a80deee49023fdce1367570507df956fba6cc Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 20:04:20 +0200 Subject: [PATCH 216/344] cyberpunk: remove unnecessary comment --- contracts/cyberpunk/src/msg.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/contracts/cyberpunk/src/msg.rs b/contracts/cyberpunk/src/msg.rs index c171a8502..98a03b0b7 100644 --- a/contracts/cyberpunk/src/msg.rs +++ b/contracts/cyberpunk/src/msg.rs @@ -1,7 +1,5 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -// failure modes to help test wasmd, based on this comment -// https://github.com/cosmwasm/wasmd/issues/8#issuecomment-576146751 #[cw_serde] pub enum ExecuteMsg { /// Hashes some data. Uses CPU and memory, but no external calls. From aab343711dfd98a3874c99a362ed4e5527677a13 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 20:07:02 +0200 Subject: [PATCH 217/344] CI: test cyberpunk --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 764ec11f5..cedeafeb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,7 @@ workflows: - package_profiler - contract_burner - contract_crypto_verify + - contract_cyberpunk - contract_hackatom - contract_ibc_reflect - contract_ibc_reflect_send @@ -503,6 +504,56 @@ jobs: - target/wasm32-unknown-unknown/release/deps key: cargocache-v2-contract_crypto_verify-rust:1.59.0-{{ checksum "Cargo.lock" }} + contract_cyberpunk: + docker: + - image: rust:1.59.0 + environment: + RUST_BACKTRACE: 1 + working_directory: ~/cosmwasm/contracts/cyberpunk + steps: + - checkout: + path: ~/cosmwasm + - run: + name: Version information + command: rustc --version; cargo --version; rustup --version + - restore_cache: + keys: + - cargocache-v2-contract_cyberpunk-rust:1.59.0-{{ checksum "Cargo.lock" }} + - run: + name: Add wasm32 target + command: rustup target add wasm32-unknown-unknown && rustup target list --installed + - run: + name: Build wasm binary + command: cargo wasm --locked + - run: + name: Unit tests + command: cargo unit-test --locked + - run: + name: Integration tests (singlepass backend) + command: cargo integration-test --locked --no-default-features + - run: + name: Build and run schema generator + command: cargo schema --locked + - run: + name: Ensure schemas are up-to-date + command: | + CHANGES_IN_REPO=$(git status --porcelain) + if [[ -n "$CHANGES_IN_REPO" ]]; then + echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" + git status && git --no-pager diff + exit 1 + fi + - save_cache: + paths: + - /usr/local/cargo/registry + - target/debug/.fingerprint + - target/debug/build + - target/debug/deps + - target/wasm32-unknown-unknown/release/.fingerprint + - target/wasm32-unknown-unknown/release/build + - target/wasm32-unknown-unknown/release/deps + key: cargocache-v2-contract_cyberpunk-rust:1.59.0-{{ checksum "Cargo.lock" }} + contract_hackatom: docker: - image: rust:1.59.0 @@ -1039,6 +1090,13 @@ jobs: mkdir -p target/wasm32-unknown-unknown/release touch target/wasm32-unknown-unknown/release/crypto_verify.wasm cargo clippy --all-targets -- -D warnings + - run: + name: Clippy linting on cyberpunk + working_directory: ~/project/contracts/cyberpunk + command: | + mkdir -p target/wasm32-unknown-unknown/release + touch target/wasm32-unknown-unknown/release/cyberpunk.wasm + cargo clippy --all-targets -- -D warnings - run: name: Clippy linting on hackatom working_directory: ~/project/contracts/hackatom From d4b38c7e276c52cd73064e6e8ad0d761e586f5b0 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 20:16:31 +0200 Subject: [PATCH 218/344] fix cyberpunk integration tests --- contracts/cyberpunk/tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/cyberpunk/tests/integration.rs b/contracts/cyberpunk/tests/integration.rs index 73872d963..3de369d23 100644 --- a/contracts/cyberpunk/tests/integration.rs +++ b/contracts/cyberpunk/tests/integration.rs @@ -24,7 +24,7 @@ use cosmwasm_vm::testing::{ use cyberpunk::msg::{ExecuteMsg, QueryMsg}; -static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/tests.wasm"); +static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/cyberpunk.wasm"); #[test] fn execute_argon2() { From 09e70f0f82f3b0a58f5a8a626d24caf28f9baf15 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 29 Aug 2022 20:23:20 +0200 Subject: [PATCH 219/344] cyberpunk: style --- contracts/cyberpunk/src/contract.rs | 64 +++++++++++++++++------------ 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/contracts/cyberpunk/src/contract.rs b/contracts/cyberpunk/src/contract.rs index 01b79e4dc..7ea42967a 100644 --- a/contracts/cyberpunk/src/contract.rs +++ b/contracts/cyberpunk/src/contract.rs @@ -32,35 +32,39 @@ pub fn execute( Argon2 { mem_cost, time_cost, - } => execute_argon2(mem_cost, time_cost), - MirrorEnv {} => execute_mirror_env(env), + } => execute::argon2(mem_cost, time_cost), + MirrorEnv {} => execute::mirror_env(env), } } -fn execute_argon2(mem_cost: u32, time_cost: u32) -> Result { - let password = b"password"; - let salt = b"othersalt"; - let config = argon2::Config { - variant: argon2::Variant::Argon2i, - version: argon2::Version::Version13, - mem_cost, - time_cost, - lanes: 4, - thread_mode: argon2::ThreadMode::Sequential, - secret: &[], - ad: &[], - hash_length: 32, - }; - let hash = argon2::hash_encoded(password, salt, &config) - .map_err(|e| StdError::generic_err(format!("hash_encoded errored: {}", e)))?; - // let matches = argon2::verify_encoded(&hash, password).unwrap(); - // assert!(matches); - Ok(Response::new().set_data(hash.into_bytes())) - //Ok(Response::new()) -} +mod execute { + use super::*; + + pub fn argon2(mem_cost: u32, time_cost: u32) -> Result { + let password = b"password"; + let salt = b"othersalt"; + let config = argon2::Config { + variant: argon2::Variant::Argon2i, + version: argon2::Version::Version13, + mem_cost, + time_cost, + lanes: 4, + thread_mode: argon2::ThreadMode::Sequential, + secret: &[], + ad: &[], + hash_length: 32, + }; + let hash = argon2::hash_encoded(password, salt, &config) + .map_err(|e| StdError::generic_err(format!("hash_encoded errored: {}", e)))?; + // let matches = argon2::verify_encoded(&hash, password).unwrap(); + // assert!(matches); + Ok(Response::new().set_data(hash.into_bytes())) + //Ok(Response::new()) + } -fn execute_mirror_env(env: Env) -> Result { - Ok(Response::new().set_data(to_binary(&env)?)) + pub fn mirror_env(env: Env) -> Result { + Ok(Response::new().set_data(to_binary(&env)?)) + } } #[entry_point] @@ -68,6 +72,14 @@ pub fn query(_deps: Deps, env: Env, msg: QueryMsg) -> StdResult { use QueryMsg::*; match msg { - MirrorEnv {} => to_binary(&env), + MirrorEnv {} => to_binary(&query::mirror_env(env)), + } +} + +mod query { + use super::*; + + pub fn mirror_env(env: Env) -> Env { + env } } From 2b3d7399c68181b50a34bed4d1ad049250035b13 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 30 Aug 2022 13:29:18 +0200 Subject: [PATCH 220/344] CHANGELOG: add a note about 1.0 compatibility --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4efffcf98..daf752482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,9 @@ and this project adheres to - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply - of a native token + of a native token - in order to use this query in a contract, the + `cosmwasm_1_1` feature needs to be enabled for the `cosmwasm_std` dependency. + This makes the contract incompatible with chains running CosmWasm `1.0`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types - cosmwasm-std: Implement `checked_div_euclid` for `Uint256`/`Uint512` - cosmwasm-std: Add `QuerierWrapper::query_wasm_contract_info` - this is just a From 1a7faceb7d97ee204e44b411e806ab6a94fc35f8 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 30 Aug 2022 13:43:39 +0200 Subject: [PATCH 221/344] Update CHANGELOG.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index daf752482..45ecf6715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to - cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for `Decimal`/`Decimal256`. - cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply - of a native token - in order to use this query in a contract, the + of a native token. In order to use this query in a contract, the `cosmwasm_1_1` feature needs to be enabled for the `cosmwasm_std` dependency. This makes the contract incompatible with chains running CosmWasm `1.0`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types From dbc41e4091a2a80e0e34e752da6a341ff9b99ca6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 30 Aug 2022 13:45:36 +0200 Subject: [PATCH 222/344] CHANGELOG: provide PR link --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ecf6715..2a9261c9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,13 +24,15 @@ and this project adheres to - cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply of a native token. In order to use this query in a contract, the `cosmwasm_1_1` feature needs to be enabled for the `cosmwasm_std` dependency. - This makes the contract incompatible with chains running CosmWasm `1.0`. + ([#1356]) This makes the contract incompatible with chains running CosmWasm + `1.0`. - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types - cosmwasm-std: Implement `checked_div_euclid` for `Uint256`/`Uint512` - cosmwasm-std: Add `QuerierWrapper::query_wasm_contract_info` - this is just a convenience helper for querying `WasmQuery::ContractInfo`. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 +[#1356]: https://github.com/CosmWasm/cosmwasm/pull/1356 ### Changed From ef70eb57c65d80fa9dc47c6089b72b6eabfcf3c1 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 30 Aug 2022 13:46:20 +0200 Subject: [PATCH 223/344] oops --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a9261c9b..79375c81e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,8 @@ and this project adheres to - cosmwasm-std: Implement `BankQuery::Supply` to allow querying the total supply of a native token. In order to use this query in a contract, the `cosmwasm_1_1` feature needs to be enabled for the `cosmwasm_std` dependency. - ([#1356]) This makes the contract incompatible with chains running CosmWasm - `1.0`. + This makes the contract incompatible with chains running CosmWasm `1.0`. + ([#1356]) - cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types - cosmwasm-std: Implement `checked_div_euclid` for `Uint256`/`Uint512` - cosmwasm-std: Add `QuerierWrapper::query_wasm_contract_info` - this is just a From f625cb9fddc3087b91010a0f78938d0c2f72dbf4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 30 Aug 2022 14:00:06 +0200 Subject: [PATCH 224/344] Allow = versions in set_version.sh --- devtools/set_version.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devtools/set_version.sh b/devtools/set_version.sh index 74d52deb8..5dd6bc903 100755 --- a/devtools/set_version.sh +++ b/devtools/set_version.sh @@ -38,7 +38,10 @@ FILES_MODIFIED=() for package_dir in packages/*/; do CARGO_TOML="$package_dir/Cargo.toml" + # The `version = "1.0.0"` cases "$gnused" -i -e "s/version[[:space:]]*=[[:space:]]*\"$OLD\"/version = \"$NEW\"/" "$CARGO_TOML" + # The `version = "=1.0.0"` cases + "$gnused" -i -e "s/version[[:space:]]*=[[:space:]]*\"=$OLD\"/version = \"=$NEW\"/" "$CARGO_TOML" FILES_MODIFIED+=("$CARGO_TOML") done From 33e0808011d75b42b1dcda03e4263269b3305819 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 30 Aug 2022 14:00:51 +0200 Subject: [PATCH 225/344] Set version: 1.1.0-rc.1 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 47941b28b..2351ac4ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 6b5998f88..9a40c3fb7 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -228,7 +228,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 33d2d5c9a..0a2f48060 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -176,7 +176,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -187,14 +187,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -205,7 +205,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -214,7 +214,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index c440abc2d..73f012f38 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -254,7 +254,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 3ae3ef05b..19956583b 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 609a12476..9fc0a2d9f 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 1c1895313..0107fbbff 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 2b443d9ca..9efaf1b48 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index b120dccee..674a39a63 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 335008124..09b0efb87 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 35c7a4c0c..6195f27be 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 549b4f548..533bc86f1 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.0.0" } -cosmwasm-std = { path = "../std", version = "1.0.0" } +cosmwasm-vm = { path = "../vm", version = "1.1.0-rc.1" } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.1" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index ec72ef5fc..eb11ab014 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index e39bd6296..acb94add7 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index bf9b5d01c..4d3500c2d 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index ed4340388..9083cd029 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.0.0", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.0-rc.1", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index e2b4478dd..ad23ab494 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.0.0" } +cosmwasm-derive = { path = "../derive", version = "1.1.0-rc.1" } derivative = "2" forward_ref = "1" schemars = "0.8.1" @@ -49,7 +49,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.0.0" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.1" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index f69523728..85d03e34f 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.0.0", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.1", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 6caf057ee..46d692b5c 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.0.0" +version = "1.1.0-rc.1" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.0.0", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.0.0" } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.1", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.1" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From 9543b6078d553a204c408ac36204d756957f4629 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 30 Aug 2022 17:40:20 +0200 Subject: [PATCH 226/344] Remove and ignore packages/schema/schema/cw20.json --- packages/schema/.gitignore | 4 ++++ packages/schema/schema/cw20.json | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-) create mode 100644 packages/schema/.gitignore delete mode 100644 packages/schema/schema/cw20.json diff --git a/packages/schema/.gitignore b/packages/schema/.gitignore new file mode 100644 index 000000000..d81504b73 --- /dev/null +++ b/packages/schema/.gitignore @@ -0,0 +1,4 @@ +# This folder is generated and updated by doc tests +# (cargo test --doc write_api) +# but not something we need to have versioned. +schema/ diff --git a/packages/schema/schema/cw20.json b/packages/schema/schema/cw20.json deleted file mode 100644 index 8481724aa..000000000 --- a/packages/schema/schema/cw20.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "contract_name": "cw20", - "contract_version": "1.0.0", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "null" - }, - "execute": null, - "query": null, - "migrate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "type": "null" - }, - "sudo": null, - "responses": null -} From 6f2985cd071ee478416c4394b4ef9db560dd2464 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 13:33:57 +0200 Subject: [PATCH 227/344] Remove sha2 dependency from floaty --- contracts/floaty/Cargo.lock | 1 - contracts/floaty/Cargo.toml | 1 - contracts/floaty/schema/floaty.json | 55 ------------------------- contracts/floaty/src/contract.rs | 63 +++-------------------------- contracts/floaty/src/msg.rs | 13 ------ 5 files changed, 5 insertions(+), 128 deletions(-) diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 19956583b..acef63e04 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -641,7 +641,6 @@ dependencies = [ "cosmwasm-vm", "schemars", "serde", - "sha2 0.9.5", "thiserror", ] diff --git a/contracts/floaty/Cargo.toml b/contracts/floaty/Cargo.toml index c7894573a..67399bdde 100644 --- a/contracts/floaty/Cargo.toml +++ b/contracts/floaty/Cargo.toml @@ -35,7 +35,6 @@ cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } -sha2 = "0.9.1" thiserror = "1.0" [dev-dependencies] diff --git a/contracts/floaty/schema/floaty.json b/contracts/floaty/schema/floaty.json index b99b4831b..62f697a59 100644 --- a/contracts/floaty/schema/floaty.json +++ b/contracts/floaty/schema/floaty.json @@ -79,36 +79,6 @@ } }, "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false } ] }, @@ -153,31 +123,6 @@ } } }, - "recurse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", - "type": "object", - "required": [ - "hashed" - ], - "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", - "type": "string" - } - } - }, "verifier": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "VerifierResponse", diff --git a/contracts/floaty/src/contract.rs b/contracts/floaty/src/contract.rs index a5eab1687..5dde0a21e 100644 --- a/contracts/floaty/src/contract.rs +++ b/contracts/floaty/src/contract.rs @@ -1,12 +1,10 @@ -use sha2::{Digest, Sha256}; - use cosmwasm_std::{ - entry_point, from_slice, to_binary, to_vec, Addr, AllBalanceResponse, BankMsg, Deps, DepsMut, - Env, Event, MessageInfo, QueryRequest, QueryResponse, Response, StdError, StdResult, WasmQuery, + entry_point, from_slice, to_binary, to_vec, AllBalanceResponse, BankMsg, Deps, DepsMut, Env, + Event, MessageInfo, QueryResponse, Response, StdError, StdResult, }; use crate::errors::HackError; -use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, RecurseResponse, VerifierResponse}; +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, VerifierResponse}; use crate::state::{State, CONFIG_KEY}; #[entry_point] @@ -67,13 +65,10 @@ pub fn execute( } } -pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { +pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::Verifier {} => to_binary(&query_verifier(deps)?), QueryMsg::OtherBalance { address } => to_binary(&query_other_balance(deps, address)?), - QueryMsg::Recurse { depth, work } => { - to_binary(&query_recurse(deps, depth, work, env.contract.address)?) - } } } @@ -93,32 +88,6 @@ fn query_other_balance(deps: Deps, address: String) -> StdResult StdResult { - // perform all hashes as requested - let mut hashed: Vec = contract.as_str().into(); - for _ in 0..work { - hashed = Sha256::digest(&hashed).to_vec() - } - - // the last contract should return the response - if depth == 0 { - Ok(RecurseResponse { - hashed: hashed.into(), - }) - } else { - // otherwise, we go one level deeper and return the response of the next level - let req = QueryMsg::Recurse { - depth: depth - 1, - work, - }; - let query = QueryRequest::Wasm(WasmQuery::Smart { - contract_addr: contract.into(), - msg: to_binary(&req)?, - }); - deps.querier.query(&query) - } -} - #[cfg(test)] mod tests { use super::*; @@ -127,7 +96,7 @@ mod tests { }; use cosmwasm_std::Api as _; // import trait Storage to get access to read - use cosmwasm_std::{attr, coins, Binary, Storage, SubMsg}; + use cosmwasm_std::{attr, coins, Addr, Storage, SubMsg}; #[test] fn proper_initialization() { @@ -287,26 +256,4 @@ mod tests { } ); } - - #[test] - fn query_recursive() { - // the test framework doesn't handle contracts querying contracts yet, - // let's just make sure the last step looks right - - let deps = mock_dependencies(); - let contract = Addr::unchecked("my-contract"); - let bin_contract: &[u8] = b"my-contract"; - - // return the unhashed value here - let no_work_query = query_recurse(deps.as_ref(), 0, 0, contract.clone()).unwrap(); - assert_eq!(no_work_query.hashed, Binary::from(bin_contract)); - - // let's see if 5 hashes are done right - let mut expected_hash = Sha256::digest(bin_contract); - for _ in 0..4 { - expected_hash = Sha256::digest(&expected_hash); - } - let work_query = query_recurse(deps.as_ref(), 0, 5, contract).unwrap(); - assert_eq!(work_query.hashed, expected_hash.to_vec()); - } } diff --git a/contracts/floaty/src/msg.rs b/contracts/floaty/src/msg.rs index f85de9a65..caa8fc4e3 100644 --- a/contracts/floaty/src/msg.rs +++ b/contracts/floaty/src/msg.rs @@ -1,5 +1,4 @@ use cosmwasm_schema::{cw_serde, QueryResponses}; -use cosmwasm_std::Binary; #[cw_serde] pub struct InstantiateMsg { @@ -23,21 +22,9 @@ pub enum QueryMsg { /// This returns cosmwasm_std::AllBalanceResponse to demo use of the querier #[returns(cosmwasm_std::AllBalanceResponse)] OtherBalance { address: String }, - /// Recurse will execute a query into itself up to depth-times and return - /// Each step of the recursion may perform some extra work to test gas metering - /// (`work` rounds of sha256 on contract). - /// Now that we have Env, we can auto-calculate the address to recurse into - #[returns(RecurseResponse)] - Recurse { depth: u32, work: u32 }, } #[cw_serde] pub struct VerifierResponse { pub verifier: String, } - -#[cw_serde] -pub struct RecurseResponse { - /// hashed is the result of running sha256 "work+1" times on the contract's human address - pub hashed: Binary, -} From 9b73cf88877a3d776cfe33a9a3bc5890e12cb3cb Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 13:37:36 +0200 Subject: [PATCH 228/344] Upgrade sha2 to 0.10 in cosmwasm-vm --- Cargo.lock | 10 +++++----- contracts/burner/Cargo.lock | 8 ++++---- contracts/crypto-verify/Cargo.lock | 8 ++++---- contracts/cyberpunk/Cargo.lock | 8 ++++---- contracts/floaty/Cargo.lock | 8 ++++---- contracts/hackatom/Cargo.lock | 8 ++++---- contracts/ibc-reflect-send/Cargo.lock | 8 ++++---- contracts/ibc-reflect/Cargo.lock | 8 ++++---- contracts/queue/Cargo.lock | 8 ++++---- contracts/reflect/Cargo.lock | 8 ++++---- contracts/staking/Cargo.lock | 8 ++++---- packages/vm/Cargo.toml | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2351ac4ee..7a5a9670a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -270,7 +270,7 @@ dependencies = [ "rand_core 0.6.3", "serde", "serde_json", - "sha2 0.10.2", + "sha2 0.10.3", "thiserror", ] @@ -366,7 +366,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.3", "tempfile", "thiserror", "wasmer", @@ -1039,7 +1039,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1678,9 +1678,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 9a40c3fb7..955b4c89d 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -239,7 +239,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -789,7 +789,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1341,9 +1341,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 0a2f48060..a09993bc5 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -249,7 +249,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -822,7 +822,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1396,9 +1396,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 73f012f38..4b20417cd 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -265,7 +265,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -829,7 +829,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1393,9 +1393,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index acef63e04..b3c205bad 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -799,7 +799,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1351,9 +1351,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 9fc0a2d9f..03cbd6007 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -800,7 +800,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1352,9 +1352,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 0107fbbff..23d429bb0 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -798,7 +798,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1350,9 +1350,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 9efaf1b48..ce70fb11e 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -798,7 +798,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1350,9 +1350,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 674a39a63..3903befbc 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -228,7 +228,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -778,7 +778,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1341,9 +1341,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 09b0efb87..f8c14dfd7 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -786,7 +786,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1351,9 +1351,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 6195f27be..abbef655f 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -236,7 +236,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", "wasmer", "wasmer-middlewares", @@ -792,7 +792,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sha2 0.10.3", ] [[package]] @@ -1344,9 +1344,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ "cfg-if", "cpufeatures 0.2.2", diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 46d692b5c..7e8f66967 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -48,7 +48,7 @@ parity-wasm = "0.42" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } serde_json = "1.0" -sha2 = "0.9.1" +sha2 = "0.10.3" thiserror = "1.0" wasmer = { version = "=2.3.0", default-features = false, features = ["cranelift", "universal", "singlepass"] } wasmer-middlewares = "=2.3.0" From 6182e68718f76a7758b4b2d0fc144cd7fe2017cf Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 13:45:09 +0200 Subject: [PATCH 229/344] Upgrade sha2/sha3 in contracts --- Cargo.lock | 2 +- contracts/crypto-verify/Cargo.lock | 17 ++++------------- contracts/crypto-verify/Cargo.toml | 4 ++-- contracts/hackatom/Cargo.lock | 2 +- contracts/hackatom/Cargo.toml | 2 +- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a5a9670a..e699f85e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -901,7 +901,7 @@ dependencies = [ "cosmwasm-std", "schemars", "serde", - "sha2 0.9.9", + "sha2 0.10.3", "thiserror", ] diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index a09993bc5..8e6ab0b56 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -79,7 +79,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", "generic-array", ] @@ -92,12 +91,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "bumpalo" version = "3.7.1" @@ -426,7 +419,7 @@ dependencies = [ "rlp", "schemars", "serde", - "sha2 0.9.5", + "sha2 0.10.3", "sha3", ] @@ -1407,14 +1400,12 @@ dependencies = [ [[package]] name = "sha3" -version = "0.9.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", + "digest 0.10.3", "keccak", - "opaque-debug", ] [[package]] diff --git a/contracts/crypto-verify/Cargo.toml b/contracts/crypto-verify/Cargo.toml index 7f8bb1b93..b8ce956c9 100644 --- a/contracts/crypto-verify/Cargo.toml +++ b/contracts/crypto-verify/Cargo.toml @@ -40,8 +40,8 @@ hex = "0.4" rlp = "0.5" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } -sha2 = "0.9" -sha3 = "0.9" +sha2 = "0.10" +sha3 = "0.10" [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] } diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 03cbd6007..0fca68b4a 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -713,7 +713,7 @@ dependencies = [ "cosmwasm-vm", "schemars", "serde", - "sha2 0.9.5", + "sha2 0.10.3", "thiserror", ] diff --git a/contracts/hackatom/Cargo.toml b/contracts/hackatom/Cargo.toml index 38d6a9274..d600b9023 100644 --- a/contracts/hackatom/Cargo.toml +++ b/contracts/hackatom/Cargo.toml @@ -35,7 +35,7 @@ cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } -sha2 = "0.9.1" +sha2 = "0.10" thiserror = "1.0" [dev-dependencies] From 1e5a95c45cdf110e50d863e325f0db956cebadae Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 22:37:40 +0200 Subject: [PATCH 230/344] Set version: 1.1.0-rc.2 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e699f85e9..0a9894b1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 955b4c89d..822fdeecd 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -228,7 +228,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 8e6ab0b56..8d9dff0d9 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -223,7 +223,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 4b20417cd..3b2676fcc 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -254,7 +254,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index b3c205bad..82b92a0c8 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 0fca68b4a..9bc37cc51 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 23d429bb0..482a95e65 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index ce70fb11e..e6b44dbd9 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 3903befbc..1edbb8b1f 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index f8c14dfd7..174c1aa06 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index abbef655f..c71707260 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 533bc86f1..eee3ad891 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.0-rc.1" } -cosmwasm-std = { path = "../std", version = "1.1.0-rc.1" } +cosmwasm-vm = { path = "../vm", version = "1.1.0-rc.2" } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.2" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index eb11ab014..bb62c596d 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index acb94add7..39533e019 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 4d3500c2d..d638e3ec4 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 9083cd029..46f2689e8 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.0-rc.1", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.0-rc.2", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index ad23ab494..0813d2030 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.0-rc.1" } +cosmwasm-derive = { path = "../derive", version = "1.1.0-rc.2" } derivative = "2" forward_ref = "1" schemars = "0.8.1" @@ -49,7 +49,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.1" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.2" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 85d03e34f..9082df9c8 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0-rc.1", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.2", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 7e8f66967..ec88ea2fa 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.0-rc.1" +version = "1.1.0-rc.2" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0-rc.1", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.1" } +cosmwasm-std = { path = "../std", version = "1.1.0-rc.2", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.2" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From ee246df57cb2f82208ac03679fb40e6fd65736ae Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 22:24:07 +0200 Subject: [PATCH 231/344] Implement PartialEq for `Binary` and `u8` arrays --- CHANGELOG.md | 1 + packages/std/src/binary.rs | 44 +++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79375c81e..97ce9e525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to ### Added +- cosmwasm-std: Implement PartialEq for `Binary` and `u8` arrays. - cosmwasm-std: Add `Uint{64,128,256,512}::one`. - cosmwasm-std: Add `Uint{64,128,256,512}::abs_diff` and `Decimal{,256}::abs_diff` ([#1334]). diff --git a/packages/std/src/binary.rs b/packages/std/src/binary.rs index 121d21d38..f586fdc10 100644 --- a/packages/std/src/binary.rs +++ b/packages/std/src/binary.rs @@ -165,6 +165,34 @@ impl PartialEq for &[u8] { } } +/// Implement `Binary == &[u8; LENGTH]` +impl PartialEq<&[u8; LENGTH]> for Binary { + fn eq(&self, rhs: &&[u8; LENGTH]) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `&[u8; LENGTH] == Binary` +impl PartialEq for &[u8; LENGTH] { + fn eq(&self, rhs: &Binary) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `Binary == [u8; LENGTH]` +impl PartialEq<[u8; LENGTH]> for Binary { + fn eq(&self, rhs: &[u8; LENGTH]) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `[u8; LENGTH] == Binary` +impl PartialEq for [u8; LENGTH] { + fn eq(&self, rhs: &Binary) -> bool { + self.as_slice() == rhs.as_slice() + } +} + /// Serializes as a base64 string impl Serialize for Binary { fn serialize(&self, serializer: S) -> Result @@ -525,11 +553,25 @@ mod tests { } #[test] - fn binary_implements_partial_eq_with_slice() { + fn binary_implements_partial_eq_with_slice_and_array() { let a = Binary(vec![0xAA, 0xBB]); + + // Slice: &[u8] assert_eq!(a, b"\xAA\xBB" as &[u8]); assert_eq!(b"\xAA\xBB" as &[u8], a); assert_ne!(a, b"\x11\x22" as &[u8]); assert_ne!(b"\x11\x22" as &[u8], a); + + // Array reference: &[u8; 2] + assert_eq!(a, b"\xAA\xBB"); + assert_eq!(b"\xAA\xBB", a); + assert_ne!(a, b"\x11\x22"); + assert_ne!(b"\x11\x22", a); + + // Array: [u8; 2] + assert_eq!(a, [0xAA, 0xBB]); + assert_eq!([0xAA, 0xBB], a); + assert_ne!(a, [0x11, 0x22]); + assert_ne!([0x11, 0x22], a); } } From df26bd926e79e8c362b270a2ddb2ba1e5f215ff1 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 1 Sep 2022 22:19:45 +0200 Subject: [PATCH 232/344] Adapt test and docs to remove outdated limitations Those limitations were removed when const generics became available. --- packages/std/src/binary.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/std/src/binary.rs b/packages/std/src/binary.rs index f586fdc10..a548c5f4c 100644 --- a/packages/std/src/binary.rs +++ b/packages/std/src/binary.rs @@ -32,12 +32,6 @@ impl Binary { } /// Copies content into fixed-sized array. - /// The result type `A: ByteArray` is a workaround for - /// the missing [const-generics](https://rust-lang.github.io/rfcs/2000-const-generics.html). - /// `A` is a fixed-sized array like `[u8; 8]`. - /// - /// ByteArray is implemented for `[u8; 0]` to `[u8; 64]`, such that - /// we are limited to 64 bytes for now. /// /// # Examples /// @@ -418,8 +412,7 @@ mod tests { let a: Binary = b"................................".into(); assert_eq!(a.len(), 32); - // for length > 32 we need to cast - let a: Binary = (b"................................." as &[u8]).into(); + let a: Binary = b".................................".into(); assert_eq!(a.len(), 33); } From e517a8e782aff11b588285e52948a9049fa9d758 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 5 Sep 2022 11:50:22 +0200 Subject: [PATCH 233/344] schema: test for accepting empty QueryMsg --- packages/schema-derive/src/cw_serde.rs | 23 +++++++++++++++++++ packages/schema-derive/src/query_responses.rs | 22 ++++++++++++++++++ packages/schema/src/query_response.rs | 17 ++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/packages/schema-derive/src/cw_serde.rs b/packages/schema-derive/src/cw_serde.rs index b259bee20..d87b096c7 100644 --- a/packages/schema-derive/src/cw_serde.rs +++ b/packages/schema-derive/src/cw_serde.rs @@ -65,6 +65,29 @@ mod tests { assert_eq!(expanded, expected); } + #[test] + fn empty_struct() { + let expanded = cw_serde_impl(parse_quote! { + pub struct InstantiateMsg {} + }); + + let expected = parse_quote! { + #[derive( + serde::Serialize, + serde::Deserialize, + Clone, + Debug, + PartialEq, + schemars::JsonSchema + )] + #[allow(clippy::derive_partial_eq_without_eq)] + #[serde(deny_unknown_fields)] + pub struct InstantiateMsg {} + }; + + assert_eq!(expanded, expected); + } + #[test] fn enums() { let expanded = cw_serde_impl(parse_quote! { diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index bdffae96d..89d3d65cd 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -91,6 +91,28 @@ mod tests { ); } + #[test] + fn empty_query_msg() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg {} + }; + + assert_eq!( + query_responses_derive_impl(input), + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> std::collections::BTreeMap { + std::collections::BTreeMap::from([]) + } + } + } + ); + } + #[test] #[should_panic(expected = "missing return type for query: Supply")] fn missing_return() { diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 7ad5cc1a0..746adcbf6 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -125,6 +125,23 @@ mod tests { ); } + #[derive(Debug, JsonSchema)] + #[serde(rename_all = "snake_case")] + #[allow(dead_code)] + pub enum EmptyMsg {} + + impl QueryResponses for EmptyMsg { + fn response_schemas_impl() -> BTreeMap { + BTreeMap::from([]) + } + } + + #[test] + fn empty_msg_works() { + let response_schemas = EmptyMsg::response_schemas().unwrap(); + assert_eq!(response_schemas, BTreeMap::from([])); + } + #[derive(Debug, JsonSchema)] #[serde(rename_all = "kebab-case")] #[allow(dead_code)] From 0f3609c2e1c5c67c4e5cb7765ced2ee18f7953d2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 5 Sep 2022 11:59:44 +0200 Subject: [PATCH 234/344] schema: support empty QueryMsg in QueryResponses --- packages/schema/src/query_response.rs | 35 ++++++++++++++------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 746adcbf6..ae8e207a7 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -50,23 +50,24 @@ fn check_api_integrity( // something more readable below? - let schema_queries: BTreeSet<_> = schema - .schema - .subschemas - .ok_or(IntegrityError::InvalidQueryMsgSchema)? - .one_of - .ok_or(IntegrityError::InvalidQueryMsgSchema)? - .into_iter() - .map(|s| { - s.into_object() - .object - .ok_or(IntegrityError::InvalidQueryMsgSchema)? - .required - .into_iter() - .next() - .ok_or(IntegrityError::InvalidQueryMsgSchema) - }) - .collect::>()?; + let schema_queries: BTreeSet<_> = match schema.schema.subschemas { + Some(subschemas) => subschemas + .one_of + .ok_or(IntegrityError::InvalidQueryMsgSchema)? + .into_iter() + .map(|s| { + s.into_object() + .object + .ok_or(IntegrityError::InvalidQueryMsgSchema)? + .required + .into_iter() + .next() + .ok_or(IntegrityError::InvalidQueryMsgSchema) + }) + .collect::>()?, + None => BTreeSet::new(), + }; + if schema_queries != generated_queries { return Err(IntegrityError::InconsistentQueries { query_msg: schema_queries, From a252870b4e93ea00f448938d087573c1845b5fc4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 2 Sep 2022 08:59:23 +0200 Subject: [PATCH 235/344] Fix version in MIGRATING --- MIGRATING.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/MIGRATING.md b/MIGRATING.md index 7adbf8bf8..b9cadf4b6 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -6,6 +6,20 @@ major releases of `cosmwasm`. Note that you can also view the ## 1.0.0 -> 1.1.0 +- Update `cosmwasm-*` dependencies in Cargo.toml (skip the ones you don't use): + + ``` + [dependencies] + cosmwasm-std = "1.1.0" + cosmwasm-storage = "1.1.0" + # ... + + [dev-dependencies] + cosmwasm-schema = "1.1.0" + cosmwasm-vm = "1.1.0" + # ... + ``` + - There are changes to how we generate schemas, resulting in less boilerplace maintenance for smart contract devs. Old contracts will continue working for a while, but it's highly recommended to migrate now. @@ -15,15 +29,15 @@ major releases of `cosmwasm`. Note that you can also view the ```diff [dependencies] - + cosmwasm-schema = { version = "1.0.0" } - cosmwasm-std = { version = "1.0.0", features = ["stargate"] } + + cosmwasm-schema = { version = "1.1.0" } + cosmwasm-std = { version = "1.1.0", features = ["stargate"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.10.0" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] - - cosmwasm-schema = { version = "1.0.0" } + - cosmwasm-schema = { version = "1.1.0" } ``` Types you send to the contract and receive back are annotated with a bunch of From 47a58a615c5bd2dddbb787b98796e648fa494289 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 2 Sep 2022 09:00:39 +0200 Subject: [PATCH 236/344] Set version: 1.1.0 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a9894b1e..c3223c6f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 822fdeecd..4eaf72c35 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -228,7 +228,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 8d9dff0d9..d8998887a 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -223,7 +223,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 3b2676fcc..14f08fd1b 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -254,7 +254,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 82b92a0c8..834aaa8c4 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 9bc37cc51..59dec940e 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 482a95e65..fcf59cea0 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index e6b44dbd9..fba1b3812 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 1edbb8b1f..18dbc85e4 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 174c1aa06..ba7cd62e5 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index c71707260..a74d784f3 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index eee3ad891..8132ac246 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.0-rc.2" } -cosmwasm-std = { path = "../std", version = "1.1.0-rc.2" } +cosmwasm-vm = { path = "../vm", version = "1.1.0" } +cosmwasm-std = { path = "../std", version = "1.1.0" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index bb62c596d..0db483bbe 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 39533e019..c6c8f3463 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index d638e3ec4..ce979b0fd 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 46f2689e8..9ac3ec2c4 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.0-rc.2", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.0", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 0813d2030..09a43394d 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.0-rc.2" } +cosmwasm-derive = { path = "../derive", version = "1.1.0" } derivative = "2" forward_ref = "1" schemars = "0.8.1" @@ -49,7 +49,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.2" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 9082df9c8..47fa9736c 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0-rc.2", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.0", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index ec88ea2fa..6d7992c1b 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.0-rc.2" +version = "1.1.0" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0-rc.2", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.0-rc.2" } +cosmwasm-std = { path = "../std", version = "1.1.0", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.0" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From 6082e8a35a193f1365cb3367f77bd87c593a7ae4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 2 Sep 2022 09:01:51 +0200 Subject: [PATCH 237/344] Set version 1.1.0 in CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ce9e525..102e94bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.0] - 2022-09-05 + ### Added - cosmwasm-std: Implement PartialEq for `Binary` and `u8` arrays. @@ -1408,7 +1410,8 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0-rc.0...v1.0.0 [1.0.0-rc.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0-beta8...v1.0.0-rc.0 From c61dd8d43986f45c5c62a73c0c3c8a0e35f76279 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 8 Sep 2022 15:45:40 +0200 Subject: [PATCH 238/344] Improve CHANGELOG entries for the cosmwasm-check tool --- CHANGELOG.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102e94bfa..3d3f0400e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ and this project adheres to - cosmwasm-std: Implement `checked_div_euclid` for `Uint256`/`Uint512` - cosmwasm-std: Add `QuerierWrapper::query_wasm_contract_info` - this is just a convenience helper for querying `WasmQuery::ContractInfo`. +- cosmwasm-check: This is a new binary package that allows running various + CosmWasm compatibility checks on compiled .wasm files. See + https://crates.io/crates/cosmwasm-check for usage info. [#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334 [#1356]: https://github.com/CosmWasm/cosmwasm/pull/1356 @@ -54,11 +57,17 @@ and this project adheres to 4. `Instance::required_features` to `Instance::required_capabilities` 5. `AnalysisReport::required_features` to `AnalysisReport::required_capabilities`. -- cosmwasm-vm/check_contract: Copied to cosmwasm/packages. - cosmwasm-vm/check_contract will soon be deprecated. [#1374]: https://github.com/CosmWasm/cosmwasm/pull/1374 +### Deprecated + +- cosmwasm-vm: The `check_contract` example was deprecated. Please use the new + crate [cosmwasm-check](https://crates.io/crates/cosmwasm-check) instead + ([#1371]). + +[#1371]: https://github.com/CosmWasm/cosmwasm/issues/1371 + ## [1.0.0] - 2022-05-14 ### Added From 8c07f47d0ded535d566bf48549365a04a0f9f6d4 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 13:54:59 +0200 Subject: [PATCH 239/344] schema-derive: support unit-like enum variants --- packages/schema/src/query_response.rs | 54 ++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index ae8e207a7..f3612f816 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -1,6 +1,9 @@ use std::collections::{BTreeMap, BTreeSet}; -use schemars::{schema::RootSchema, JsonSchema}; +use schemars::{ + schema::{InstanceType, RootSchema, SingleOrVec}, + JsonSchema, +}; use thiserror::Error; pub use cosmwasm_schema_derive::QueryResponses; @@ -56,13 +59,37 @@ fn check_api_integrity( .ok_or(IntegrityError::InvalidQueryMsgSchema)? .into_iter() .map(|s| { - s.into_object() - .object - .ok_or(IntegrityError::InvalidQueryMsgSchema)? - .required - .into_iter() - .next() - .ok_or(IntegrityError::InvalidQueryMsgSchema) + let s = s.into_object(); + + if let Some(SingleOrVec::Single(ty)) = s.instance_type { + match *ty { + // We'll have an object if the Rust enum variant was C-like or tuple-like + InstanceType::Object => s + .object + .ok_or(IntegrityError::InvalidQueryMsgSchema)? + .required + .into_iter() + .next() + .ok_or(IntegrityError::InvalidQueryMsgSchema), + // We might have a string here if the Rust enum variant was unit-like + InstanceType::String => { + let values = + s.enum_values.ok_or(IntegrityError::InvalidQueryMsgSchema)?; + + if values.len() != 1 { + return Err(IntegrityError::InvalidQueryMsgSchema); + } + + values[0] + .as_str() + .map(String::from) + .ok_or(IntegrityError::InvalidQueryMsgSchema) + } + _ => Err(IntegrityError::InvalidQueryMsgSchema), + } + } else { + Err(IntegrityError::InvalidQueryMsgSchema) + } }) .collect::>()?, None => BTreeSet::new(), @@ -102,14 +129,20 @@ mod tests { #[allow(dead_code)] pub enum GoodMsg { BalanceFor { account: String }, + AccountIdFor { account: String }, Supply {}, + Liquidity, + AccountCount(), } impl QueryResponses for GoodMsg { fn response_schemas_impl() -> BTreeMap { BTreeMap::from([ ("balance_for".to_string(), schema_for!(u128)), + ("account_id_for".to_string(), schema_for!(u128)), ("supply".to_string(), schema_for!(u128)), + ("liquidity".to_string(), schema_for!(u128)), + ("account_count".to_string(), schema_for!(u128)), ]) } } @@ -121,7 +154,10 @@ mod tests { response_schemas, BTreeMap::from([ ("balance_for".to_string(), schema_for!(u128)), - ("supply".to_string(), schema_for!(u128)) + ("account_id_for".to_string(), schema_for!(u128)), + ("supply".to_string(), schema_for!(u128)), + ("liquidity".to_string(), schema_for!(u128)), + ("account_count".to_string(), schema_for!(u128)) ]) ); } From cdfe060fb7472135f31a0f04d2a518d064a04f15 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 14:01:10 +0200 Subject: [PATCH 240/344] clippy --- packages/vm/src/compatibility.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index cabd88744..c2c9826a9 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -89,7 +89,7 @@ fn check_wasm_memories(module: &Module) -> VmResult<()> { ))); } - if limits.maximum() != None { + if limits.maximum().is_some() { return Err(VmError::static_validation_err( "Wasm contract memory's maximum must be unset. The host will set it for you.", )); From 362bed351534508d88eae1bdb926e5be5495ed72 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 14:47:04 +0200 Subject: [PATCH 241/344] schema: more comprehensive QueryResponses test --- packages/schema/src/query_response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index f3612f816..0ca3cfffd 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -129,7 +129,7 @@ mod tests { #[allow(dead_code)] pub enum GoodMsg { BalanceFor { account: String }, - AccountIdFor { account: String }, + AccountIdFor(String), Supply {}, Liquidity, AccountCount(), From ad570f06d9e8b9558255a64f71b84a43b7956e6e Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 14:58:55 +0200 Subject: [PATCH 242/344] CHANGELOG update --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102e94bfa..624318b81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ and this project adheres to ## [Unreleased] +### Fixed + +- cosmwasm-schema: Using `QueryResponses` with a `QueryMsg` containing a + unit-like variant will no longer crash. The different variant types in Rust + are: + ```rust + enum QueryMsg { + UnitLike, + Tuple(), + Struct {}, + } + ``` + It's still recommended to only use struct variants, even if there are no + fields. + ## [1.1.0] - 2022-09-05 ### Added From 4a5d3d7e09522b5d721fc1e80c8a9966da6fe5ae Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 21:18:54 +0200 Subject: [PATCH 243/344] schema macros: disambiguate expanded paths, hide deps --- packages/schema-derive/src/cw_serde.rs | 60 +++++++++---------- packages/schema-derive/src/generate_api.rs | 54 ++++++++--------- packages/schema-derive/src/query_responses.rs | 28 ++++----- packages/schema/src/lib.rs | 4 ++ 4 files changed, 75 insertions(+), 71 deletions(-) diff --git a/packages/schema-derive/src/cw_serde.rs b/packages/schema-derive/src/cw_serde.rs index d87b096c7..521d9b173 100644 --- a/packages/schema-derive/src/cw_serde.rs +++ b/packages/schema-derive/src/cw_serde.rs @@ -4,12 +4,12 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { match input.data { syn::Data::Struct(_) => parse_quote! { #[derive( - serde::Serialize, - serde::Deserialize, - Clone, - Debug, - PartialEq, - schemars::JsonSchema + ::cosmwasm_schema::serde::Serialize, + ::cosmwasm_schema::serde::Deserialize, + ::std::clone::Clone, + ::std::fmt::Debug, + ::std::cmp::PartialEq, + ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining #[serde(deny_unknown_fields)] @@ -17,12 +17,12 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { }, syn::Data::Enum(_) => parse_quote! { #[derive( - serde::Serialize, - serde::Deserialize, - Clone, - Debug, - PartialEq, - schemars::JsonSchema + ::cosmwasm_schema::serde::Serialize, + ::cosmwasm_schema::serde::Deserialize, + ::std::clone::Clone, + ::std::fmt::Debug, + ::std::cmp::PartialEq, + ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining #[serde(deny_unknown_fields, rename_all = "snake_case")] @@ -47,12 +47,12 @@ mod tests { let expected = parse_quote! { #[derive( - serde::Serialize, - serde::Deserialize, - Clone, - Debug, - PartialEq, - schemars::JsonSchema + ::cosmwasm_schema::serde::Serialize, + ::cosmwasm_schema::serde::Deserialize, + ::std::clone::Clone, + ::std::fmt::Debug, + ::std::cmp::PartialEq, + ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] #[serde(deny_unknown_fields)] @@ -73,12 +73,12 @@ mod tests { let expected = parse_quote! { #[derive( - serde::Serialize, - serde::Deserialize, - Clone, - Debug, - PartialEq, - schemars::JsonSchema + ::cosmwasm_schema::serde::Serialize, + ::cosmwasm_schema::serde::Deserialize, + ::std::clone::Clone, + ::std::fmt::Debug, + ::std::cmp::PartialEq, + ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] #[serde(deny_unknown_fields)] @@ -101,12 +101,12 @@ mod tests { let expected = parse_quote! { #[derive( - serde::Serialize, - serde::Deserialize, - Clone, - Debug, - PartialEq, - schemars::JsonSchema + ::cosmwasm_schema::serde::Serialize, + ::cosmwasm_schema::serde::Deserialize, + ::std::clone::Clone, + ::std::fmt::Debug, + ::std::cmp::PartialEq, + ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] #[serde(deny_unknown_fields, rename_all = "snake_case")] diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index 70a61c4f2..fbd07eb62 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -13,10 +13,10 @@ pub fn write_api_impl(input: Options) -> Block { parse_quote! { { - use std::env::current_dir; - use std::fs::{create_dir_all, write}; + use ::std::env::current_dir; + use ::std::fs::{create_dir_all, write}; - use cosmwasm_schema::{remove_schemas, Api, QueryResponses}; + use ::cosmwasm_schema::{remove_schemas, Api, QueryResponses}; let mut out_dir = current_dir().unwrap(); out_dir.push("schema"); @@ -47,10 +47,10 @@ pub fn generate_api_impl(input: &Options) -> ExprStruct { } = input; parse_quote! { - cosmwasm_schema::Api { + ::cosmwasm_schema::Api { contract_name: #name.to_string(), contract_version: #version.to_string(), - instantiate: cosmwasm_schema::schema_for!(#instantiate), + instantiate: ::cosmwasm_schema::schema_for!(#instantiate), execute: #execute, query: #query, migrate: #migrate, @@ -131,7 +131,7 @@ impl Parse for Options { } } else { quote! { - env!("CARGO_PKG_NAME") + ::std::env!("CARGO_PKG_NAME") } }; @@ -142,7 +142,7 @@ impl Parse for Options { } } else { quote! { - env!("CARGO_PKG_VERSION") + ::std::env!("CARGO_PKG_VERSION") } }; @@ -154,7 +154,7 @@ impl Parse for Options { let execute = match map.remove(&parse_quote!(execute)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(cosmwasm_schema::schema_for!(#ty))} + quote! {Some(::cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -163,8 +163,8 @@ impl Parse for Options { Some(ty) => { let ty = ty.unwrap_type(); ( - quote! {Some(cosmwasm_schema::schema_for!(#ty))}, - quote! { Some(#ty::response_schemas().unwrap()) }, + quote! {Some(::cosmwasm_schema::schema_for!(#ty))}, + quote! { Some(<#ty as QueryResponses>::response_schemas().unwrap()) }, ) } None => (quote! { None }, quote! { None }), @@ -173,7 +173,7 @@ impl Parse for Options { let migrate = match map.remove(&parse_quote!(migrate)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(cosmwasm_schema::schema_for!(#ty))} + quote! {Some(::cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -181,7 +181,7 @@ impl Parse for Options { let sudo = match map.remove(&parse_quote!(sudo)) { Some(ty) => { let ty = ty.unwrap_type(); - quote! {Some(cosmwasm_schema::schema_for!(#ty))} + quote! {Some(::cosmwasm_schema::schema_for!(#ty))} } None => quote! { None }, }; @@ -214,10 +214,10 @@ mod tests { instantiate: InstantiateMsg, }), parse_quote! { - cosmwasm_schema::Api { - contract_name: env!("CARGO_PKG_NAME").to_string(), - contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), + ::cosmwasm_schema::Api { + contract_name: ::std::env!("CARGO_PKG_NAME").to_string(), + contract_version: ::std::env!("CARGO_PKG_VERSION").to_string(), + instantiate: ::cosmwasm_schema::schema_for!(InstantiateMsg), execute: None, query: None, migrate: None, @@ -237,10 +237,10 @@ mod tests { instantiate: InstantiateMsg, }), parse_quote! { - cosmwasm_schema::Api { + ::cosmwasm_schema::Api { contract_name: "foo".to_string(), contract_version: "bar".to_string(), - instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), + instantiate: ::cosmwasm_schema::schema_for!(InstantiateMsg), execute: None, query: None, migrate: None, @@ -262,15 +262,15 @@ mod tests { sudo: SudoMsg, }), parse_quote! { - cosmwasm_schema::Api { - contract_name: env!("CARGO_PKG_NAME").to_string(), - contract_version: env!("CARGO_PKG_VERSION").to_string(), - instantiate: cosmwasm_schema::schema_for!(InstantiateMsg), - execute: Some(cosmwasm_schema::schema_for!(ExecuteMsg)), - query: Some(cosmwasm_schema::schema_for!(QueryMsg)), - migrate: Some(cosmwasm_schema::schema_for!(MigrateMsg)), - sudo: Some(cosmwasm_schema::schema_for!(SudoMsg)), - responses: Some(QueryMsg::response_schemas().unwrap()), + ::cosmwasm_schema::Api { + contract_name: ::std::env!("CARGO_PKG_NAME").to_string(), + contract_version: ::std::env!("CARGO_PKG_VERSION").to_string(), + instantiate: ::cosmwasm_schema::schema_for!(InstantiateMsg), + execute: Some(::cosmwasm_schema::schema_for!(ExecuteMsg)), + query: Some(::cosmwasm_schema::schema_for!(QueryMsg)), + migrate: Some(::cosmwasm_schema::schema_for!(MigrateMsg)), + sudo: Some(::cosmwasm_schema::schema_for!(SudoMsg)), + responses: Some(::response_schemas().unwrap()), } } ); diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 89d3d65cd..3cd3182cc 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -10,9 +10,9 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl cosmwasm_schema::QueryResponses for #ident { - fn response_schemas_impl() -> std::collections::BTreeMap { - std::collections::BTreeMap::from([ + impl ::cosmwasm_schema::QueryResponses for #ident { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ #( #mappings, )* ]) } @@ -33,7 +33,7 @@ fn parse_query(v: Variant) -> (String, Expr) { ( query, - parse_quote!(cosmwasm_schema::schema_for!(#response_ty)), + parse_quote!(::cosmwasm_schema::schema_for!(#response_ty)), ) } @@ -79,11 +79,11 @@ mod tests { parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl cosmwasm_schema::QueryResponses for QueryMsg { - fn response_schemas_impl() -> std::collections::BTreeMap { - std::collections::BTreeMap::from([ - ("supply".to_string(), cosmwasm_schema::schema_for!(some_crate::AnotherType)), - ("balance".to_string(), cosmwasm_schema::schema_for!(SomeType)), + impl ::cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ + ("supply".to_string(), ::cosmwasm_schema::schema_for!(some_crate::AnotherType)), + ("balance".to_string(), ::cosmwasm_schema::schema_for!(SomeType)), ]) } } @@ -104,9 +104,9 @@ mod tests { parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl cosmwasm_schema::QueryResponses for QueryMsg { - fn response_schemas_impl() -> std::collections::BTreeMap { - std::collections::BTreeMap::from([]) + impl ::cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([]) } } } @@ -156,7 +156,7 @@ mod tests { assert_eq!( parse_tuple(parse_query(variant)), parse_quote! { - ("get_foo".to_string(), cosmwasm_schema::schema_for!(Foo)) + ("get_foo".to_string(), ::cosmwasm_schema::schema_for!(Foo)) } ); @@ -167,7 +167,7 @@ mod tests { assert_eq!( parse_tuple(parse_query(variant)), - parse_quote! { ("get_foo".to_string(), cosmwasm_schema::schema_for!(some_crate::Foo)) } + parse_quote! { ("get_foo".to_string(), ::cosmwasm_schema::schema_for!(some_crate::Foo)) } ); } diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 09001b9b0..b9fb9e434 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -92,3 +92,7 @@ pub use cosmwasm_schema_derive::generate_api; /// ``` pub use cosmwasm_schema_derive::write_api; pub use schemars::schema_for; + +// For use in macro expansions +pub use schemars; +pub use serde; From 90f78c9e8ec1b0e54ad993a69bb167def69da873 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 22:01:15 +0200 Subject: [PATCH 244/344] schema: use serde and schemars reexports in one more spot --- packages/schema-derive/src/cw_serde.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/schema-derive/src/cw_serde.rs b/packages/schema-derive/src/cw_serde.rs index 521d9b173..e33bbaaad 100644 --- a/packages/schema-derive/src/cw_serde.rs +++ b/packages/schema-derive/src/cw_serde.rs @@ -12,7 +12,8 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining - #[serde(deny_unknown_fields)] + #[serde(deny_unknown_fields, crate = "::cosmwasm_schema::serde")] + #[schemars(crate = "::cosmwasm_schema::schemars")] #input }, syn::Data::Enum(_) => parse_quote! { @@ -25,7 +26,8 @@ pub fn cw_serde_impl(input: DeriveInput) -> DeriveInput { ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining - #[serde(deny_unknown_fields, rename_all = "snake_case")] + #[serde(deny_unknown_fields, rename_all = "snake_case", crate = "::cosmwasm_schema::serde")] + #[schemars(crate = "::cosmwasm_schema::schemars")] #input }, syn::Data::Union(_) => panic!("unions are not supported"), @@ -55,7 +57,8 @@ mod tests { ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] - #[serde(deny_unknown_fields)] + #[serde(deny_unknown_fields, crate = "::cosmwasm_schema::serde")] + #[schemars(crate = "::cosmwasm_schema::schemars")] pub struct InstantiateMsg { pub verifier: String, pub beneficiary: String, @@ -81,7 +84,8 @@ mod tests { ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] - #[serde(deny_unknown_fields)] + #[serde(deny_unknown_fields, crate = "::cosmwasm_schema::serde")] + #[schemars(crate = "::cosmwasm_schema::schemars")] pub struct InstantiateMsg {} }; @@ -109,7 +113,8 @@ mod tests { ::cosmwasm_schema::schemars::JsonSchema )] #[allow(clippy::derive_partial_eq_without_eq)] - #[serde(deny_unknown_fields, rename_all = "snake_case")] + #[serde(deny_unknown_fields, rename_all = "snake_case", crate = "::cosmwasm_schema::serde")] + #[schemars(crate = "::cosmwasm_schema::schemars")] pub enum SudoMsg { StealFunds { recipient: String, From dc52ecb809506afeb88027820c107f6450d12989 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 22:04:14 +0200 Subject: [PATCH 245/344] Remove unnecessary deps from cyberpunk --- contracts/cyberpunk/Cargo.lock | 2 -- contracts/cyberpunk/Cargo.toml | 2 -- 2 files changed, 4 deletions(-) diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 14f08fd1b..8371cb0ba 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -451,8 +451,6 @@ dependencies = [ "cosmwasm-storage", "cosmwasm-vm", "rust-argon2", - "schemars", - "serde", "thiserror", ] diff --git a/contracts/cyberpunk/Cargo.toml b/contracts/cyberpunk/Cargo.toml index 2c73e9397..b4cdca0d3 100644 --- a/contracts/cyberpunk/Cargo.toml +++ b/contracts/cyberpunk/Cargo.toml @@ -32,8 +32,6 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } rust-argon2 = "0.8" -schemars = "0.8.1" -serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = "1.0" [dev-dependencies] From 48500b21f7a430c8d0987bd224f1bf89bdbe9c33 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 12 Sep 2022 22:17:50 +0200 Subject: [PATCH 246/344] update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51fa2a68b..0e401b317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ and this project adheres to ``` It's still recommended to only use struct variants, even if there are no fields. +- cosmwasm-schema: It is no longer necessary to specify `serde` or `schemars` as + a dependency in order to make `cosmwasm-schema` macros work. ## [1.1.0] - 2022-09-05 From 7d9e9d130c8751e618b125a359e44c4f7a068ce0 Mon Sep 17 00:00:00 2001 From: Simon Warta <2603011+webmaster128@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:09:41 +0200 Subject: [PATCH 247/344] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e401b317..6f00f988c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ and this project adheres to ``` It's still recommended to only use struct variants, even if there are no fields. + +### Changed + - cosmwasm-schema: It is no longer necessary to specify `serde` or `schemars` as a dependency in order to make `cosmwasm-schema` macros work. From d3e2e270db3439c6cb1142caf3f6f38590dcaca7 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 11:49:51 +0200 Subject: [PATCH 248/344] Set version: 1.1.1 --- CHANGELOG.md | 5 ++++- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 20 files changed, 96 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f00f988c..5c1c34568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.1] - 2022-09-15 + ### Fixed - cosmwasm-schema: Using `QueryResponses` with a `QueryMsg` containing a @@ -1439,7 +1441,8 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.0...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.1...HEAD +[1.1.1]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0-rc.0...v1.0.0 [1.0.0-rc.0]: diff --git a/Cargo.lock b/Cargo.lock index c3223c6f9..7c315afdc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.0" +version = "1.1.1" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 4eaf72c35..ff8dce0dc 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -228,7 +228,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index d8998887a..fcc655777 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -223,7 +223,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 8371cb0ba..b58efbedc 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -254,7 +254,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 834aaa8c4..27e54132f 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 59dec940e..561e50433 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index fcf59cea0..d97307412 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index fba1b3812..b144f5623 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 18dbc85e4..8084be415 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index ba7cd62e5..2bc079fd9 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index a74d784f3..1b5a2998a 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" dependencies = [ "base64", "cosmwasm-crypto", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" dependencies = [ "cosmwasm-std", "serde", @@ -225,7 +225,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 8132ac246..d6c1b9827 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.0" +version = "1.1.1" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.0" } -cosmwasm-std = { path = "../std", version = "1.1.0" } +cosmwasm-vm = { path = "../vm", version = "1.1.1" } +cosmwasm-std = { path = "../std", version = "1.1.1" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 0db483bbe..5f2d244c3 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.1" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index c6c8f3463..1bdef8765 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.1" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index ce979b0fd..7030fe290 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.1" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 9ac3ec2c4..154a72d11 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.1" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.0", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.1", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 09a43394d..929afed9a 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.1" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.0" } +cosmwasm-derive = { path = "../derive", version = "1.1.1" } derivative = "2" forward_ref = "1" schemars = "0.8.1" @@ -49,7 +49,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.0" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.1" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 47fa9736c..8cc921223 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.0" +version = "1.1.1" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.1", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 6d7992c1b..cb59e0140 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.0" +version = "1.1.1" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.0", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.0" } +cosmwasm-std = { path = "../std", version = "1.1.1", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.1" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From c27852b4896b967023b3e1fe0ec3f95ad57ca6ba Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 10:17:48 +0200 Subject: [PATCH 249/344] Turn testing module into folder --- packages/std/src/deps.rs | 2 +- packages/std/src/lib.rs | 21 +-------------------- packages/std/src/{ => testing}/mock.rs | 2 +- packages/std/src/testing/mod.rs | 20 ++++++++++++++++++++ packages/std/src/traits.rs | 2 +- 5 files changed, 24 insertions(+), 23 deletions(-) rename packages/std/src/{ => testing}/mock.rs (99%) create mode 100644 packages/std/src/testing/mod.rs diff --git a/packages/std/src/deps.rs b/packages/std/src/deps.rs index 7d6d0cdca..4d9a9ecdc 100644 --- a/packages/std/src/deps.rs +++ b/packages/std/src/deps.rs @@ -74,7 +74,7 @@ impl<'a, C: CustomQuery> DepsMut<'a, C> { #[cfg(test)] mod tests { use super::*; - use crate::mock::{mock_dependencies, MockApi, MockQuerier, MockStorage}; + use crate::testing::{mock_dependencies, MockApi, MockQuerier, MockStorage}; use serde::{Deserialize, Serialize}; // ensure we can call these many times, eg. as sub-calls diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index 54e2a4bce..d539f6c75 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -97,27 +97,8 @@ pub use crate::imports::{ExternalApi, ExternalQuerier, ExternalStorage}; // Exposed for testing only // Both unit tests and integration tests are compiled to native code, so everything in here does not need to compile to Wasm. - -#[cfg(not(target_arch = "wasm32"))] -mod mock; #[cfg(not(target_arch = "wasm32"))] -pub mod testing { - #[cfg(feature = "staking")] - pub use crate::mock::StakingQuerier; - pub use crate::mock::{ - digit_sum, mock_dependencies, mock_dependencies_with_balance, - mock_dependencies_with_balances, mock_env, mock_info, mock_wasmd_attr, riffle_shuffle, - BankQuerier, MockApi, MockQuerier, MockQuerierCustomHandlerResult, MockStorage, - MOCK_CONTRACT_ADDR, - }; - #[cfg(feature = "stargate")] - pub use crate::mock::{ - mock_ibc_channel, mock_ibc_channel_close_confirm, mock_ibc_channel_close_init, - mock_ibc_channel_connect_ack, mock_ibc_channel_connect_confirm, mock_ibc_channel_open_init, - mock_ibc_channel_open_try, mock_ibc_packet_ack, mock_ibc_packet_recv, - mock_ibc_packet_timeout, - }; -} +pub mod testing; // Re-exports diff --git a/packages/std/src/mock.rs b/packages/std/src/testing/mock.rs similarity index 99% rename from packages/std/src/mock.rs rename to packages/std/src/testing/mock.rs index 1feb04022..0f74c3e3c 100644 --- a/packages/std/src/mock.rs +++ b/packages/std/src/testing/mock.rs @@ -1550,7 +1550,7 @@ mod tests { }); match result { SystemResult::Ok(ContractResult::Err(err)) => { - assert_eq!(err, "Error parsing into type cosmwasm_std::mock::tests::wasm_querier_works::{{closure}}::MyMsg: Invalid type") + assert_eq!(err, "Error parsing into type cosmwasm_std::testing::mock::tests::wasm_querier_works::{{closure}}::MyMsg: Invalid type") } res => panic!("Unexpected result: {:?}", res), } diff --git a/packages/std/src/testing/mod.rs b/packages/std/src/testing/mod.rs new file mode 100644 index 000000000..6f91e64b1 --- /dev/null +++ b/packages/std/src/testing/mod.rs @@ -0,0 +1,20 @@ +#![cfg(not(target_arch = "wasm32"))] + +// Exposed for testing only +// Both unit tests and integration tests are compiled to native code, so everything in here does not need to compile to Wasm. + +mod mock; + +#[cfg(feature = "staking")] +pub use mock::StakingQuerier; +pub use mock::{ + digit_sum, mock_dependencies, mock_dependencies_with_balance, mock_dependencies_with_balances, + mock_env, mock_info, mock_wasmd_attr, riffle_shuffle, BankQuerier, MockApi, MockQuerier, + MockQuerierCustomHandlerResult, MockStorage, MOCK_CONTRACT_ADDR, +}; +#[cfg(feature = "stargate")] +pub use mock::{ + mock_ibc_channel, mock_ibc_channel_close_confirm, mock_ibc_channel_close_init, + mock_ibc_channel_connect_ack, mock_ibc_channel_connect_confirm, mock_ibc_channel_open_init, + mock_ibc_channel_open_try, mock_ibc_packet_ack, mock_ibc_packet_recv, mock_ibc_packet_timeout, +}; diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 6536d75bd..59436a8df 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -356,7 +356,7 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { #[cfg(test)] mod tests { use super::*; - use crate::mock::MockQuerier; + use crate::testing::MockQuerier; use crate::{coins, from_slice, Uint128}; // this is a simple demo helper to prove we can use it From 364ac56c71e7cc0a39913f4698763002be065f74 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 12:00:17 +0200 Subject: [PATCH 250/344] Add macro `assert_approx_eq!` --- CHANGELOG.md | 7 ++ contracts/hackatom/tests/integration.rs | 8 +- packages/std/src/testing/assertions.rs | 104 ++++++++++++++++++++++++ packages/std/src/testing/mod.rs | 3 + 4 files changed, 117 insertions(+), 5 deletions(-) create mode 100644 packages/std/src/testing/assertions.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1c34568..d772c2592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to ## [Unreleased] +### Added + +- cosmwasm-std: Add testing macro `assert_approx_eq!` for comparing two integers + to be relatively close to each other ([#1417]). + +[#1417]: https://github.com/CosmWasm/cosmwasm/issues/1417 + ## [1.1.1] - 2022-09-15 ### Fixed diff --git a/contracts/hackatom/tests/integration.rs b/contracts/hackatom/tests/integration.rs index 03be6e685..84bdf5315 100644 --- a/contracts/hackatom/tests/integration.rs +++ b/contracts/hackatom/tests/integration.rs @@ -18,8 +18,8 @@ //! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...) use cosmwasm_std::{ - coins, from_binary, to_vec, Addr, AllBalanceResponse, BankMsg, Binary, ContractResult, Empty, - Response, SubMsg, + assert_approx_eq, coins, from_binary, to_vec, Addr, AllBalanceResponse, BankMsg, Binary, + ContractResult, Empty, Response, SubMsg, }; use cosmwasm_vm::{ call_execute, from_slice, @@ -405,9 +405,7 @@ fn execute_allocate_large_memory() { // Gas consumption is relatively small // Note: the exact gas usage depends on the Rust version used to compile Wasm, // which we only fix when using rust-optimizer, not integration tests. - let expected = 4413600000; // +/- 20% - assert!(gas_used > expected * 80 / 100, "Gas used: {}", gas_used); - assert!(gas_used < expected * 120 / 100, "Gas used: {}", gas_used); + assert_approx_eq!(gas_used, 4413600000, "0.2"); let used = deps.memory_pages(); assert_eq!(used, pages_before + 48, "Memory used: {} pages", used); pages_before += 48; diff --git a/packages/std/src/testing/assertions.rs b/packages/std/src/testing/assertions.rs new file mode 100644 index 000000000..88dadca79 --- /dev/null +++ b/packages/std/src/testing/assertions.rs @@ -0,0 +1,104 @@ +use crate::{Decimal, Uint128}; +use std::str::FromStr as _; + +/// Asserts that two expressions are approximately equal to each other. +/// +/// The `max_rel_diff` argument defines the maximum relative difference +/// of the `left` and `right` values. +/// +/// On panic, this macro will print the values of the arguments and +/// the actual relative difference. +/// +/// Like [`assert_eq!`], this macro has a second form, where a custom +/// panic message can be provided. +#[macro_export] +macro_rules! assert_approx_eq { + ($left:expr, $right:expr, $max_rel_diff:expr $(,)?) => {{ + $crate::testing::assert_approx_eq_impl($left, $right, $max_rel_diff, None); + }}; + ($left:expr, $right:expr, $max_rel_diff:expr, $($args:tt)+) => {{ + $crate::testing::assert_approx_eq_impl($left, $right, $max_rel_diff, Some(format!($($args)*))); + }}; +} + +/// Implementation for the [`cosmwasm_std::assert_approx_eq`] macro. This does not provide any +/// stability guarantees and may change any time. +#[track_caller] +#[doc(hidden)] +pub fn assert_approx_eq_impl>( + left: U, + right: U, + max_rel_diff: &str, + panic_msg: Option, +) { + let left = left.into(); + let right = right.into(); + let max_rel_diff = Decimal::from_str(max_rel_diff).unwrap(); + + let largest = std::cmp::max(left, right); + let rel_diff = Decimal::from_ratio(left.abs_diff(right), largest); + + if rel_diff > max_rel_diff { + match panic_msg { + Some(panic_msg) => panic!( + "assertion failed: `(left ≈ right)`\nleft: {}\nright: {}\nrelative difference: {}\nmax allowed relative difference: {}\n: {}", + left, right, rel_diff, max_rel_diff, panic_msg + ), + None => panic!( + "assertion failed: `(left ≈ right)`\nleft: {}\nright: {}\nrelative difference: {}\nmax allowed relative difference: {}\n", + left, right, rel_diff, max_rel_diff + ), + } + } +} + +#[cfg(test)] +mod tests { + #[test] + fn assert_approx() { + assert_approx_eq!(9_u32, 10_u32, "0.12"); + assert_approx_eq!(9_u64, 10_u64, "0.12"); + assert_approx_eq!( + 9_000_000_000_000_000_000_000_000_000_000_000_000_u128, + 10_000_000_000_000_000_000_000_000_000_000_000_000_u128, + "0.10" + ); + } + + #[test] + fn assert_approx_with_vars() { + let a = 66_u32; + let b = 67_u32; + assert_approx_eq!(a, b, "0.02"); + + let a = 66_u64; + let b = 67_u64; + assert_approx_eq!(a, b, "0.02"); + + let a = 66_u128; + let b = 67_u128; + assert_approx_eq!(a, b, "0.02"); + } + + #[test] + #[should_panic( + expected = "assertion failed: `(left ≈ right)`\nleft: 8\nright: 10\nrelative difference: 0.2\nmax allowed relative difference: 0.12\n" + )] + fn assert_approx_fail() { + assert_approx_eq!(8_u32, 10_u32, "0.12"); + } + + #[test] + #[should_panic( + expected = "assertion failed: `(left ≈ right)`\nleft: 17\nright: 20\nrelative difference: 0.15\nmax allowed relative difference: 0.12\n: some extra info about the error" + )] + fn assert_approx_with_custom_panic_msg() { + assert_approx_eq!( + 17_u32, + 20_u32, + "0.12", + "some extra {} about the error", + "info" + ); + } +} diff --git a/packages/std/src/testing/mod.rs b/packages/std/src/testing/mod.rs index 6f91e64b1..b317d61c4 100644 --- a/packages/std/src/testing/mod.rs +++ b/packages/std/src/testing/mod.rs @@ -3,8 +3,11 @@ // Exposed for testing only // Both unit tests and integration tests are compiled to native code, so everything in here does not need to compile to Wasm. +mod assertions; mod mock; +pub use assertions::assert_approx_eq_impl; + #[cfg(feature = "staking")] pub use mock::StakingQuerier; pub use mock::{ From 05cb04f22ba2bb90bdbcf1021a6436b48604a44d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 12:06:15 +0200 Subject: [PATCH 251/344] Add some more panic message testing --- packages/std/src/testing/assertions.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/std/src/testing/assertions.rs b/packages/std/src/testing/assertions.rs index 88dadca79..3d5cf0a2d 100644 --- a/packages/std/src/testing/assertions.rs +++ b/packages/std/src/testing/assertions.rs @@ -90,15 +90,19 @@ mod tests { #[test] #[should_panic( - expected = "assertion failed: `(left ≈ right)`\nleft: 17\nright: 20\nrelative difference: 0.15\nmax allowed relative difference: 0.12\n: some extra info about the error" + expected = "assertion failed: `(left ≈ right)`\nleft: 17\nright: 20\nrelative difference: 0.15\nmax allowed relative difference: 0.12\n: some extra info about the error: Foo(8)" )] fn assert_approx_with_custom_panic_msg() { + let adjective = "extra"; + #[derive(Debug)] + struct Foo(u32); assert_approx_eq!( 17_u32, 20_u32, "0.12", - "some extra {} about the error", - "info" + "some {adjective} {} about the error: {:?}", + "info", + Foo(8), ); } } From 00dcd443df66ff19ca3e5ae857454ed9415fa192 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 16:16:09 +0200 Subject: [PATCH 252/344] Document CosmWasm message types --- docs/MESSAGE_TYPES.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/MESSAGE_TYPES.md diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md new file mode 100644 index 000000000..477e9a09e --- /dev/null +++ b/docs/MESSAGE_TYPES.md @@ -0,0 +1,41 @@ +## CosmWasm message types + +CosmWasm uses JSON for sending data from the host the Wasm contract and results +out of the Wasm contract. Such JSON messages are created in the client, +typically some JavaScript-based application. There the usage of JSON is feels +very natural for developers. However, JSON has signigicant limitations such as +the lack of a native binary type and inconsistent support for integers > 53 bit. +For this reason, the CosmWasm standard limrary `cosmwasm-std` shipts types that +ensure good user experience in JSON. The following table shows both stadard Rust +types as well as cosmwasm_std types and how they are encoded in JSON. + +| Rust type | JSON type[^1] | Example | Note | +| ------------------- | -------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------- | +| bool | `true` or `false` | `true` | | +| u32/i32 | number | `123` | | +| u64/i64 | number | `123456` | Supported in Rust and Go. Other implementations (`jq`, `JavaScript`) do not support the full uint64/int64 range. | +| usize/isize | number | `123456` | ⚠️ Discouraged as this type has a different size in unit tests (64 bit) and Wasm (32 bit) | +| String | string | `"foo"` | +| &str | string | `"foo"` | ⚠️ Unsuppored since message types must be owned (DeserializeOwned) | +| Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | +| Vec\ | array of JSON type of `T` | `[1, 2, 3]` | +| Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | +| struct MyType { … } | object | `{"foo":12}` | | +| [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | +| [Uint128] | string containing number | `"1234321"` | | +| [Uint256] | string containing number | `"1234321"` | | +| [Uint512] | string containing number | `"1234321"` | | +| [Decimal] | string containing decimal number | `"55.6584"` | | +| [Decimal256] | string containing decimal number | `"55.6584"` | | +| [Binary] | string containing base64 data | `"MTIzCg=="` | | + +[uint64]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint64.html +[uint128]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint128.html +[uint256]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint256.html +[uint512]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint512.html +[decimal]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Decimal.html +[decimal256]: + https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Decimal256.html +[binary]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Binary.html + +[^1]: https://www.json.org/ From ef5e8558ef047b25544d794a302f181809d79195 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 16:27:13 +0200 Subject: [PATCH 253/344] Link MESSAGE_TYPES.md --- contracts/crypto-verify/schema/crypto-verify.json | 2 +- contracts/hackatom/schema/hackatom.json | 2 +- .../ibc-reflect-send/schema/ibc-reflect-send.json | 2 +- contracts/ibc-reflect-send/schema/packet_msg.json | 2 +- contracts/ibc-reflect/schema/packet_msg.json | 2 +- contracts/reflect/schema/reflect.json | 10 +++++----- packages/std/schema/cosmos_msg.json | 2 +- packages/std/schema/query_request.json | 2 +- packages/std/src/binary.rs | 3 ++- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/contracts/crypto-verify/schema/crypto-verify.json b/contracts/crypto-verify/schema/crypto-verify.json index 58eeee35f..aae5dd104 100644 --- a/contracts/crypto-verify/schema/crypto-verify.json +++ b/contracts/crypto-verify/schema/crypto-verify.json @@ -268,7 +268,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Uint128": { diff --git a/contracts/hackatom/schema/hackatom.json b/contracts/hackatom/schema/hackatom.json index 3bdc458a8..23ee0acdb 100644 --- a/contracts/hackatom/schema/hackatom.json +++ b/contracts/hackatom/schema/hackatom.json @@ -380,7 +380,7 @@ "additionalProperties": false, "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" } } diff --git a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json index 4c8d437f3..5f6fe80a2 100644 --- a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json +++ b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json @@ -172,7 +172,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Coin": { diff --git a/contracts/ibc-reflect-send/schema/packet_msg.json b/contracts/ibc-reflect-send/schema/packet_msg.json index aecff49c7..1aeb3db83 100644 --- a/contracts/ibc-reflect-send/schema/packet_msg.json +++ b/contracts/ibc-reflect-send/schema/packet_msg.json @@ -110,7 +110,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Coin": { diff --git a/contracts/ibc-reflect/schema/packet_msg.json b/contracts/ibc-reflect/schema/packet_msg.json index 71e3519d0..11f1cb38e 100644 --- a/contracts/ibc-reflect/schema/packet_msg.json +++ b/contracts/ibc-reflect/schema/packet_msg.json @@ -112,7 +112,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Coin": { diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index 6ade7f08c..076a59f14 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -141,7 +141,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Coin": { @@ -1046,7 +1046,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "IbcQuery": { @@ -1466,7 +1466,7 @@ "additionalProperties": false, "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" } } @@ -1505,7 +1505,7 @@ "additionalProperties": false, "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" } } @@ -1548,7 +1548,7 @@ } }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Event": { diff --git a/packages/std/schema/cosmos_msg.json b/packages/std/schema/cosmos_msg.json index 376f87c19..8361702ac 100644 --- a/packages/std/schema/cosmos_msg.json +++ b/packages/std/schema/cosmos_msg.json @@ -98,7 +98,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Coin": { diff --git a/packages/std/schema/query_request.json b/packages/std/schema/query_request.json index fd674b44c..565373942 100644 --- a/packages/std/schema/query_request.json +++ b/packages/std/schema/query_request.json @@ -112,7 +112,7 @@ ] }, "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Empty": { diff --git a/packages/std/src/binary.rs b/packages/std/src/binary.rs index a548c5f4c..fc66df941 100644 --- a/packages/std/src/binary.rs +++ b/packages/std/src/binary.rs @@ -9,7 +9,8 @@ use crate::errors::{StdError, StdResult}; /// Binary is a wrapper around Vec to add base64 de/serialization /// with serde. It also adds some helper methods to help encode inline. /// -/// This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec +/// This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. +/// See also . #[derive(Clone, Default, PartialEq, Eq, Hash, PartialOrd, Ord, JsonSchema)] pub struct Binary(#[schemars(with = "String")] pub Vec); From b7e3367e11489d888958e3c534b7432ecef357c8 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 16:43:59 +0200 Subject: [PATCH 254/344] Add HexBinary --- contracts/burner/Cargo.lock | 1 + contracts/crypto-verify/Cargo.lock | 1 + contracts/cyberpunk/Cargo.lock | 1 + contracts/floaty/Cargo.lock | 1 + contracts/hackatom/Cargo.lock | 1 + contracts/ibc-reflect-send/Cargo.lock | 1 + contracts/ibc-reflect/Cargo.lock | 1 + contracts/queue/Cargo.lock | 1 + contracts/reflect/Cargo.lock | 1 + contracts/staking/Cargo.lock | 1 + packages/std/Cargo.toml | 2 +- packages/std/src/hex_binary.rs | 579 ++++++++++++++++++++++++++ packages/std/src/lib.rs | 2 + 13 files changed, 592 insertions(+), 1 deletion(-) create mode 100644 packages/std/src/hex_binary.rs diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index ff8dce0dc..63ea0e2e5 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -219,6 +219,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index fcc655777..6ab32bb0b 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -214,6 +214,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index b58efbedc..81a9e6936 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -237,6 +237,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 27e54132f..ba4454eb4 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 561e50433..334e286f6 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index d97307412..bec200b2c 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index b144f5623..8b510fbda 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 8084be415..41e819eff 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 2bc079fd9..44c0c0ba3 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 1b5a2998a..cb6019076 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -208,6 +208,7 @@ dependencies = [ "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 929afed9a..5738560ed 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -42,6 +42,7 @@ base64 = "0.13.0" cosmwasm-derive = { path = "../derive", version = "1.1.1" } derivative = "2" forward_ref = "1" +hex = "0.4" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } serde-json-wasm = { version = "0.4.1" } @@ -55,5 +56,4 @@ cosmwasm-crypto = { path = "../crypto", version = "1.1.1" } cosmwasm-schema = { path = "../schema" } # The chrono dependency is only used in an example, which Rust compiles for us. If this causes trouble, remove it. chrono = { version = "0.4", default-features = false, features = ["alloc", "std"] } -hex = "0.4" hex-literal = "0.3.1" diff --git a/packages/std/src/hex_binary.rs b/packages/std/src/hex_binary.rs new file mode 100644 index 000000000..867b3eda6 --- /dev/null +++ b/packages/std/src/hex_binary.rs @@ -0,0 +1,579 @@ +use std::fmt; +use std::ops::Deref; + +use schemars::JsonSchema; +use serde::{de, ser, Deserialize, Deserializer, Serialize}; + +use crate::{StdError, StdResult}; + +/// This is a wrapper around Vec to add hex de/serialization +/// with serde. It also adds some helper methods to help encode inline. +/// +/// This is similar to `cosmwasm_std::Binary` but uses hex. +/// See also . +#[derive(Clone, Default, PartialEq, Eq, Hash, PartialOrd, Ord, JsonSchema)] +pub struct HexBinary(#[schemars(with = "String")] Vec); + +impl HexBinary { + pub fn from_hex(input: &str) -> StdResult { + let vec = + hex::decode(input).map_err(|e| StdError::generic_err(format!("Invalid hex: {e}")))?; + Ok(Self(vec)) + } + + pub fn to_hex(&self) -> String { + hex::encode(&self.0) + } + + pub fn as_slice(&self) -> &[u8] { + self.0.as_slice() + } + + /// Copies content into fixed-sized array. + /// + /// # Examples + /// + /// Copy to array of explicit length + /// + /// ``` + /// # use cosmwasm_std::HexBinary; + /// let data = HexBinary::from(&[0xfb, 0x1f, 0x37]); + /// let array: [u8; 3] = data.to_array().unwrap(); + /// assert_eq!(array, [0xfb, 0x1f, 0x37]); + /// ``` + /// + /// Copy to integer + /// + /// ``` + /// # use cosmwasm_std::HexBinary; + /// let data = HexBinary::from(&[0x8b, 0x67, 0x64, 0x84, 0xb5, 0xfb, 0x1f, 0x37]); + /// let num = u64::from_be_bytes(data.to_array().unwrap()); + /// assert_eq!(num, 10045108015024774967); + /// ``` + pub fn to_array(&self) -> StdResult<[u8; LENGTH]> { + if self.len() != LENGTH { + return Err(StdError::invalid_data_size(LENGTH, self.len())); + } + + let mut out: [u8; LENGTH] = [0; LENGTH]; + out.copy_from_slice(&self.0); + Ok(out) + } +} + +impl fmt::Display for HexBinary { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.to_hex()) + } +} + +impl fmt::Debug for HexBinary { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Use an output inspired by tuples (https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_tuple) + // but with a custom implementation to avoid the need for an intemediate hex string. + write!(f, "HexBinary(")?; + for byte in self.0.iter() { + write!(f, "{:02x}", byte)?; + } + write!(f, ")")?; + Ok(()) + } +} + +impl From<&[u8]> for HexBinary { + fn from(binary: &[u8]) -> Self { + Self(binary.to_vec()) + } +} + +/// Just like Vec, HexBinary is a smart pointer to [u8]. +/// This implements `*data` for us and allows us to +/// do `&*data`, returning a `&[u8]` from a `&HexBinary`. +/// With [deref coercions](https://doc.rust-lang.org/1.22.1/book/first-edition/deref-coercions.html#deref-coercions), +/// this allows us to use `&data` whenever a `&[u8]` is required. +impl Deref for HexBinary { + type Target = [u8]; + + fn deref(&self) -> &Self::Target { + self.as_slice() + } +} + +// Reference +impl From<&[u8; LENGTH]> for HexBinary { + fn from(source: &[u8; LENGTH]) -> Self { + Self(source.to_vec()) + } +} + +// Owned +impl From<[u8; LENGTH]> for HexBinary { + fn from(source: [u8; LENGTH]) -> Self { + Self(source.into()) + } +} + +impl From> for HexBinary { + fn from(vec: Vec) -> Self { + Self(vec) + } +} + +impl From for Vec { + fn from(original: HexBinary) -> Vec { + original.0 + } +} + +/// Implement `HexBinary == std::vec::Vec` +impl PartialEq> for HexBinary { + fn eq(&self, rhs: &Vec) -> bool { + // Use Vec == Vec + self.0 == *rhs + } +} + +/// Implement `std::vec::Vec == HexBinary` +impl PartialEq for Vec { + fn eq(&self, rhs: &HexBinary) -> bool { + // Use Vec == Vec + *self == rhs.0 + } +} + +/// Implement `HexBinary == &[u8]` +impl PartialEq<&[u8]> for HexBinary { + fn eq(&self, rhs: &&[u8]) -> bool { + // Use &[u8] == &[u8] + self.as_slice() == *rhs + } +} + +/// Implement `&[u8] == HexBinary` +impl PartialEq for &[u8] { + fn eq(&self, rhs: &HexBinary) -> bool { + // Use &[u8] == &[u8] + *self == rhs.as_slice() + } +} + +/// Implement `HexBinary == [u8; LENGTH]` +impl PartialEq<[u8; LENGTH]> for HexBinary { + fn eq(&self, rhs: &[u8; LENGTH]) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `[u8; LENGTH] == HexBinary` +impl PartialEq for [u8; LENGTH] { + fn eq(&self, rhs: &HexBinary) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `HexBinary == &[u8; LENGTH]` +impl PartialEq<&[u8; LENGTH]> for HexBinary { + fn eq(&self, rhs: &&[u8; LENGTH]) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `&[u8; LENGTH] == HexBinary` +impl PartialEq for &[u8; LENGTH] { + fn eq(&self, rhs: &HexBinary) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Serializes as a hex string +impl Serialize for HexBinary { + fn serialize(&self, serializer: S) -> Result + where + S: ser::Serializer, + { + serializer.serialize_str(&self.to_hex()) + } +} + +/// Deserializes as a hex string +impl<'de> Deserialize<'de> for HexBinary { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_str(HexVisitor) + } +} + +struct HexVisitor; + +impl<'de> de::Visitor<'de> for HexVisitor { + type Value = HexBinary; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("valid hex encoded string") + } + + fn visit_str(self, v: &str) -> Result + where + E: de::Error, + { + match HexBinary::from_hex(v) { + Ok(data) => Ok(data), + Err(_) => Err(E::custom(format!("invalid hex: {}", v))), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + use crate::{from_slice, to_vec, StdError}; + use std::collections::hash_map::DefaultHasher; + use std::collections::HashSet; + use std::hash::{Hash, Hasher}; + + #[test] + fn from_hex_works() { + let data = HexBinary::from_hex("").unwrap(); + assert_eq!(data, b""); + let data = HexBinary::from_hex("61").unwrap(); + assert_eq!(data, b"a"); + let data = HexBinary::from_hex("00").unwrap(); + assert_eq!(data, b"\0"); + + let data = HexBinary::from_hex("68656c6c6f").unwrap(); + assert_eq!(data, b"hello"); + let data = HexBinary::from_hex("68656C6C6F").unwrap(); + assert_eq!(data, b"hello"); + let data = HexBinary::from_hex("72616e646f6d695a").unwrap(); + assert_eq!(data.as_slice(), b"randomiZ"); + + // odd + match HexBinary::from_hex("123").unwrap_err() { + StdError::GenericErr { msg, .. } => { + assert_eq!(msg, "Invalid hex: Odd number of digits") + } + _ => panic!("Unexpected error type"), + } + // non-hex + match HexBinary::from_hex("efgh").unwrap_err() { + StdError::GenericErr { msg, .. } => { + assert_eq!(msg, "Invalid hex: Invalid character 'g' at position 2") + } + _ => panic!("Unexpected error type"), + } + // spaces + HexBinary::from_hex("aa ").unwrap_err(); + HexBinary::from_hex(" aa").unwrap_err(); + HexBinary::from_hex("a a").unwrap_err(); + HexBinary::from_hex(" aa ").unwrap_err(); + } + + #[test] + fn to_hex_works() { + let binary: &[u8] = b""; + let encoded = HexBinary::from(binary).to_hex(); + assert_eq!(encoded, ""); + + let binary: &[u8] = b"hello"; + let encoded = HexBinary::from(binary).to_hex(); + assert_eq!(encoded, "68656c6c6f"); + + let binary = vec![12u8, 187, 0, 17, 250, 1]; + let encoded = HexBinary(binary).to_hex(); + assert_eq!(encoded, "0cbb0011fa01"); + } + + #[test] + fn to_array_works() { + // simple + let binary = HexBinary::from(&[1, 2, 3]); + let array: [u8; 3] = binary.to_array().unwrap(); + assert_eq!(array, [1, 2, 3]); + + // empty + let binary = HexBinary::from(&[]); + let array: [u8; 0] = binary.to_array().unwrap(); + assert_eq!(array, [] as [u8; 0]); + + // invalid size + let binary = HexBinary::from(&[1, 2, 3]); + let error = binary.to_array::<8>().unwrap_err(); + match error { + StdError::InvalidDataSize { + expected, actual, .. + } => { + assert_eq!(expected, 8); + assert_eq!(actual, 3); + } + err => panic!("Unexpected error: {:?}", err), + } + + // long array (32 bytes) + let binary = + HexBinary::from_hex("b75d7d24e428c7859440498efe7caa3997cefb08c99bdd581b6b1f9f866096f0") + .unwrap(); + let array: [u8; 32] = binary.to_array().unwrap(); + assert_eq!( + array, + [ + 0xb7, 0x5d, 0x7d, 0x24, 0xe4, 0x28, 0xc7, 0x85, 0x94, 0x40, 0x49, 0x8e, 0xfe, 0x7c, + 0xaa, 0x39, 0x97, 0xce, 0xfb, 0x08, 0xc9, 0x9b, 0xdd, 0x58, 0x1b, 0x6b, 0x1f, 0x9f, + 0x86, 0x60, 0x96, 0xf0, + ] + ); + + // very long array > 32 bytes (requires Rust 1.47+) + let binary = HexBinary::from_hex( + "b75d7d24e428c7859440498efe7caa3997cefb08c99bdd581b6b1f9f866096f073c8c3b0316abe", + ) + .unwrap(); + let array: [u8; 39] = binary.to_array().unwrap(); + assert_eq!( + array, + [ + 0xb7, 0x5d, 0x7d, 0x24, 0xe4, 0x28, 0xc7, 0x85, 0x94, 0x40, 0x49, 0x8e, 0xfe, 0x7c, + 0xaa, 0x39, 0x97, 0xce, 0xfb, 0x08, 0xc9, 0x9b, 0xdd, 0x58, 0x1b, 0x6b, 0x1f, 0x9f, + 0x86, 0x60, 0x96, 0xf0, 0x73, 0xc8, 0xc3, 0xb0, 0x31, 0x6a, 0xbe, + ] + ); + } + + #[test] + fn from_slice_works() { + let original: &[u8] = &[0u8, 187, 61, 11, 250, 0]; + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8, 187, 61, 11, 250, 0]); + } + + #[test] + fn from_fixed_length_array_works() { + let original = &[]; + let binary: HexBinary = original.into(); + assert_eq!(binary.len(), 0); + + let original = &[0u8]; + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8]); + + let original = &[0u8, 187, 61, 11, 250, 0]; + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8, 187, 61, 11, 250, 0]); + + let original = &[ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, + ]; + let binary: HexBinary = original.into(); + assert_eq!( + binary.as_slice(), + [ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, + ] + ); + } + + #[test] + fn from_owned_fixed_length_array_works() { + let original = []; + let binary: HexBinary = original.into(); + assert_eq!(binary.len(), 0); + + let original = [0u8]; + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8]); + + let original = [0u8, 187, 61, 11, 250, 0]; + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8, 187, 61, 11, 250, 0]); + + let original = [ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, + ]; + let binary: HexBinary = original.into(); + assert_eq!( + binary.as_slice(), + [ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, + ] + ); + } + + #[test] + fn from_literal_works() { + let a: HexBinary = b"".into(); + assert_eq!(a.len(), 0); + + let a: HexBinary = b".".into(); + assert_eq!(a.len(), 1); + + let a: HexBinary = b"...".into(); + assert_eq!(a.len(), 3); + + let a: HexBinary = b"...............................".into(); + assert_eq!(a.len(), 31); + + let a: HexBinary = b"................................".into(); + assert_eq!(a.len(), 32); + + let a: HexBinary = (b".................................").into(); + assert_eq!(a.len(), 33); + } + + #[test] + fn from_vec_works() { + let original = vec![0u8, 187, 61, 11, 250, 0]; + let original_ptr = original.as_ptr(); + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!(binary.0.as_ptr(), original_ptr, "vector must not be copied"); + } + + #[test] + fn into_vec_works() { + // Into> for HexBinary + let original = HexBinary(vec![0u8, 187, 61, 11, 250, 0]); + let original_ptr = original.0.as_ptr(); + let vec: Vec = original.into(); + assert_eq!(vec.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!(vec.as_ptr(), original_ptr, "vector must not be copied"); + + // From for Vec + let original = HexBinary(vec![7u8, 35, 49, 101, 0, 255]); + let original_ptr = original.0.as_ptr(); + let vec = Vec::::from(original); + assert_eq!(vec.as_slice(), [7u8, 35, 49, 101, 0, 255]); + assert_eq!(vec.as_ptr(), original_ptr, "vector must not be copied"); + } + + #[test] + fn serialization_works() { + let binary = HexBinary(vec![0u8, 187, 61, 11, 250, 0]); + + let json = to_vec(&binary).unwrap(); + let deserialized: HexBinary = from_slice(&json).unwrap(); + + assert_eq!(binary, deserialized); + } + + #[test] + fn deserialize_from_valid_string() { + let hex = "00bb3d0bfa00"; + // this is the binary behind above string + let expected = vec![0u8, 187, 61, 11, 250, 0]; + + let serialized = to_vec(&hex).unwrap(); + let deserialized: HexBinary = from_slice(&serialized).unwrap(); + assert_eq!(expected, deserialized.as_slice()); + } + + #[test] + fn deserialize_from_invalid_string() { + let invalid_str = "**BAD!**"; + let serialized = to_vec(&invalid_str).unwrap(); + let res = from_slice::(&serialized); + assert!(res.is_err()); + } + + #[test] + fn hex_binary_implements_debug() { + // Some data + let data = HexBinary(vec![0x07, 0x35, 0xAA, 0xcb, 0x00, 0xff]); + assert_eq!(format!("{:?}", data), "HexBinary(0735aacb00ff)",); + + // Empty + let data = HexBinary(vec![]); + assert_eq!(format!("{:?}", data), "HexBinary()",); + } + + #[test] + fn hex_binary_implements_deref() { + // Dereference to [u8] + let data = HexBinary(vec![7u8, 35, 49, 101, 0, 255]); + assert_eq!(*data, [7u8, 35, 49, 101, 0, 255]); + + // This checks deref coercions from &Binary to &[u8] works + let data = HexBinary(vec![7u8, 35, 49, 101, 0, 255]); + assert_eq!(data.len(), 6); + let data_slice: &[u8] = &data; + assert_eq!(data_slice, &[7u8, 35, 49, 101, 0, 255]); + } + + #[test] + fn hex_binary_implements_hash() { + let a1 = HexBinary::from([0, 187, 61, 11, 250, 0]); + let mut hasher = DefaultHasher::new(); + a1.hash(&mut hasher); + let a1_hash = hasher.finish(); + + let a2 = HexBinary::from([0, 187, 61, 11, 250, 0]); + let mut hasher = DefaultHasher::new(); + a2.hash(&mut hasher); + let a2_hash = hasher.finish(); + + let b = HexBinary::from([16, 21, 33, 0, 255, 9]); + let mut hasher = DefaultHasher::new(); + b.hash(&mut hasher); + let b_hash = hasher.finish(); + + assert_eq!(a1_hash, a2_hash); + assert_ne!(a1_hash, b_hash); + } + + /// This requires Hash and Eq to be implemented + #[test] + fn hex_binary_can_be_used_in_hash_set() { + let a1 = HexBinary::from([0, 187, 61, 11, 250, 0]); + let a2 = HexBinary::from([0, 187, 61, 11, 250, 0]); + let b = HexBinary::from([16, 21, 33, 0, 255, 9]); + + let mut set = HashSet::new(); + set.insert(a1.clone()); + set.insert(a2.clone()); + set.insert(b.clone()); + assert_eq!(set.len(), 2); + + let set1 = HashSet::::from_iter(vec![b.clone(), a1.clone()]); + let set2 = HashSet::from_iter(vec![a1, a2, b]); + assert_eq!(set1, set2); + } + + #[test] + fn hex_binary_implements_partial_eq_with_vector() { + let a = HexBinary(vec![5u8; 3]); + let b = vec![5u8; 3]; + let c = vec![9u8; 3]; + assert_eq!(a, b); + assert_eq!(b, a); + assert_ne!(a, c); + assert_ne!(c, a); + } + + #[test] + fn hex_binary_implements_partial_eq_with_slice_and_array() { + let a = HexBinary(vec![0xAA, 0xBB]); + + // Slice: &[u8] + assert_eq!(a, b"\xAA\xBB" as &[u8]); + assert_eq!(b"\xAA\xBB" as &[u8], a); + assert_ne!(a, b"\x11\x22" as &[u8]); + assert_ne!(b"\x11\x22" as &[u8], a); + + // Array reference: &[u8; 2] + assert_eq!(a, b"\xAA\xBB"); + assert_eq!(b"\xAA\xBB", a); + assert_ne!(a, b"\x11\x22"); + assert_ne!(b"\x11\x22", a); + + // Array: [u8; 2] + assert_eq!(a, [0xAA, 0xBB]); + assert_eq!([0xAA, 0xBB], a); + assert_ne!(a, [0x11, 0x22]); + assert_ne!([0x11, 0x22], a); + } +} diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index d539f6c75..1776f0aec 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -9,6 +9,7 @@ mod coins; mod conversion; mod deps; mod errors; +mod hex_binary; mod ibc; mod import_helpers; #[cfg(feature = "iterator")] @@ -33,6 +34,7 @@ pub use crate::errors::{ OverflowError, OverflowOperation, RecoverPubkeyError, StdError, StdResult, SystemError, VerificationError, }; +pub use crate::hex_binary::HexBinary; #[cfg(feature = "stargate")] pub use crate::ibc::{ Ibc3ChannelOpenResponse, IbcAcknowledgement, IbcBasicResponse, IbcChannel, IbcChannelCloseMsg, From a1740c3de82b7fc167b2f7a10ec5b7e349d6cf87 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 16:52:06 +0200 Subject: [PATCH 255/344] Add Binary <-> HexBinary conversion --- packages/std/src/hex_binary.rs | 40 +++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/std/src/hex_binary.rs b/packages/std/src/hex_binary.rs index 867b3eda6..af4a179ed 100644 --- a/packages/std/src/hex_binary.rs +++ b/packages/std/src/hex_binary.rs @@ -4,7 +4,7 @@ use std::ops::Deref; use schemars::JsonSchema; use serde::{de, ser, Deserialize, Deserializer, Serialize}; -use crate::{StdError, StdResult}; +use crate::{Binary, StdError, StdResult}; /// This is a wrapper around Vec to add hex de/serialization /// with serde. It also adds some helper methods to help encode inline. @@ -125,6 +125,18 @@ impl From for Vec { } } +impl From for HexBinary { + fn from(original: Binary) -> Self { + Self(original.into()) + } +} + +impl From for Binary { + fn from(original: HexBinary) -> Binary { + Binary::from(original.0) + } +} + /// Implement `HexBinary == std::vec::Vec` impl PartialEq> for HexBinary { fn eq(&self, rhs: &Vec) -> bool { @@ -451,6 +463,32 @@ mod tests { assert_eq!(vec.as_ptr(), original_ptr, "vector must not be copied"); } + #[test] + fn from_binary_works() { + let original = Binary::from([0u8, 187, 61, 11, 250, 0]); + let original_ptr = original.as_ptr(); + let binary: HexBinary = original.into(); + assert_eq!(binary.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!(binary.0.as_ptr(), original_ptr, "vector must not be copied"); + } + + #[test] + fn into_binary_works() { + // Into for HexBinary + let original = HexBinary(vec![0u8, 187, 61, 11, 250, 0]); + let original_ptr = original.0.as_ptr(); + let bin: Binary = original.into(); + assert_eq!(bin.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!(bin.as_ptr(), original_ptr, "vector must not be copied"); + + // From for Binary + let original = HexBinary(vec![7u8, 35, 49, 101, 0, 255]); + let original_ptr = original.0.as_ptr(); + let bin = Binary::from(original); + assert_eq!(bin.as_slice(), [7u8, 35, 49, 101, 0, 255]); + assert_eq!(bin.as_ptr(), original_ptr, "vector must not be copied"); + } + #[test] fn serialization_works() { let binary = HexBinary(vec![0u8, 187, 61, 11, 250, 0]); From 34298c058c079e3f37f56f7c79959a5e3e370df2 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 16:55:40 +0200 Subject: [PATCH 256/344] Add HexBinary to docs --- docs/MESSAGE_TYPES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md index 477e9a09e..cbcd9a039 100644 --- a/docs/MESSAGE_TYPES.md +++ b/docs/MESSAGE_TYPES.md @@ -28,6 +28,7 @@ types as well as cosmwasm_std types and how they are encoded in JSON. | [Decimal] | string containing decimal number | `"55.6584"` | | | [Decimal256] | string containing decimal number | `"55.6584"` | | | [Binary] | string containing base64 data | `"MTIzCg=="` | | +| [HexBinary] | string containing hex data | `"b5d7d24e428c"` | | [uint64]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint64.html [uint128]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint128.html @@ -37,5 +38,7 @@ types as well as cosmwasm_std types and how they are encoded in JSON. [decimal256]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Decimal256.html [binary]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Binary.html +[hexbinary]: + https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.HexBinary.html [^1]: https://www.json.org/ From ed90bec7c095c8908839a8869d526e3209225a61 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 17:13:40 +0200 Subject: [PATCH 257/344] Add 0x prefixed test --- packages/std/src/hex_binary.rs | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/std/src/hex_binary.rs b/packages/std/src/hex_binary.rs index af4a179ed..7345969b9 100644 --- a/packages/std/src/hex_binary.rs +++ b/packages/std/src/hex_binary.rs @@ -276,11 +276,30 @@ mod tests { } _ => panic!("Unexpected error type"), } + // 0x prefixed + match HexBinary::from_hex("0xaa").unwrap_err() { + StdError::GenericErr { msg, .. } => { + assert_eq!(msg, "Invalid hex: Invalid character 'x' at position 1") + } + _ => panic!("Unexpected error type"), + } // spaces - HexBinary::from_hex("aa ").unwrap_err(); - HexBinary::from_hex(" aa").unwrap_err(); - HexBinary::from_hex("a a").unwrap_err(); - HexBinary::from_hex(" aa ").unwrap_err(); + assert!(matches!( + HexBinary::from_hex("aa ").unwrap_err(), + StdError::GenericErr { .. } + )); + assert!(matches!( + HexBinary::from_hex(" aa").unwrap_err(), + StdError::GenericErr { .. } + )); + assert!(matches!( + HexBinary::from_hex("a a").unwrap_err(), + StdError::GenericErr { .. } + )); + assert!(matches!( + HexBinary::from_hex(" aa ").unwrap_err(), + StdError::GenericErr { .. } + )); } #[test] From b95c5992d0655f87ce11a083c5b6b76353ee6676 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 15 Sep 2022 17:26:45 +0200 Subject: [PATCH 258/344] Add InvalidHex error type --- packages/std/src/errors/std_error.rs | 53 ++++++++++++++++++++++++++++ packages/std/src/hex_binary.rs | 23 ++++++------ 2 files changed, 64 insertions(+), 12 deletions(-) diff --git a/packages/std/src/errors/std_error.rs b/packages/std/src/errors/std_error.rs index 4993c29d5..fa5c27f32 100644 --- a/packages/std/src/errors/std_error.rs +++ b/packages/std/src/errors/std_error.rs @@ -54,6 +54,12 @@ pub enum StdError { #[cfg(feature = "backtraces")] backtrace: Backtrace, }, + #[error("Invalid hex string: {msg}")] + InvalidHex { + msg: String, + #[cfg(feature = "backtraces")] + backtrace: Backtrace, + }, /// Whenever UTF-8 bytes cannot be decoded into a unicode string, e.g. in String::from_utf8 or str::from_utf8. #[error("Cannot decode UTF8 bytes into string: {msg}")] InvalidUtf8 { @@ -147,6 +153,14 @@ impl StdError { } } + pub fn invalid_hex(msg: impl ToString) -> Self { + StdError::InvalidHex { + msg: msg.to_string(), + #[cfg(feature = "backtraces")] + backtrace: Backtrace::capture(), + } + } + pub fn invalid_utf8(msg: impl ToString) -> Self { StdError::InvalidUtf8 { msg: msg.to_string(), @@ -283,6 +297,22 @@ impl PartialEq for StdError { false } } + StdError::InvalidHex { + msg, + #[cfg(feature = "backtraces")] + backtrace: _, + } => { + if let StdError::InvalidHex { + msg: rhs_msg, + #[cfg(feature = "backtraces")] + backtrace: _, + } = rhs + { + msg == rhs_msg + } else { + false + } + } StdError::InvalidUtf8 { msg, #[cfg(feature = "backtraces")] @@ -615,6 +645,29 @@ mod tests { } } + #[test] + fn invalid_hex_works_for_strings() { + let error = StdError::invalid_hex("my text"); + match error { + StdError::InvalidHex { msg, .. } => { + assert_eq!(msg, "my text"); + } + _ => panic!("expect different error"), + } + } + + #[test] + fn invalid_hex_works_for_errors() { + let original = hex::FromHexError::OddLength; + let error = StdError::invalid_hex(original); + match error { + StdError::InvalidHex { msg, .. } => { + assert_eq!(msg, "Odd number of digits"); + } + _ => panic!("expect different error"), + } + } + #[test] fn invalid_utf8_works_for_strings() { let error = StdError::invalid_utf8("my text"); diff --git a/packages/std/src/hex_binary.rs b/packages/std/src/hex_binary.rs index 7345969b9..4aa5f7cc8 100644 --- a/packages/std/src/hex_binary.rs +++ b/packages/std/src/hex_binary.rs @@ -16,8 +16,7 @@ pub struct HexBinary(#[schemars(with = "String")] Vec); impl HexBinary { pub fn from_hex(input: &str) -> StdResult { - let vec = - hex::decode(input).map_err(|e| StdError::generic_err(format!("Invalid hex: {e}")))?; + let vec = hex::decode(input).map_err(StdError::invalid_hex)?; Ok(Self(vec)) } @@ -264,41 +263,41 @@ mod tests { // odd match HexBinary::from_hex("123").unwrap_err() { - StdError::GenericErr { msg, .. } => { - assert_eq!(msg, "Invalid hex: Odd number of digits") + StdError::InvalidHex { msg, .. } => { + assert_eq!(msg, "Odd number of digits") } _ => panic!("Unexpected error type"), } // non-hex match HexBinary::from_hex("efgh").unwrap_err() { - StdError::GenericErr { msg, .. } => { - assert_eq!(msg, "Invalid hex: Invalid character 'g' at position 2") + StdError::InvalidHex { msg, .. } => { + assert_eq!(msg, "Invalid character 'g' at position 2") } _ => panic!("Unexpected error type"), } // 0x prefixed match HexBinary::from_hex("0xaa").unwrap_err() { - StdError::GenericErr { msg, .. } => { - assert_eq!(msg, "Invalid hex: Invalid character 'x' at position 1") + StdError::InvalidHex { msg, .. } => { + assert_eq!(msg, "Invalid character 'x' at position 1") } _ => panic!("Unexpected error type"), } // spaces assert!(matches!( HexBinary::from_hex("aa ").unwrap_err(), - StdError::GenericErr { .. } + StdError::InvalidHex { .. } )); assert!(matches!( HexBinary::from_hex(" aa").unwrap_err(), - StdError::GenericErr { .. } + StdError::InvalidHex { .. } )); assert!(matches!( HexBinary::from_hex("a a").unwrap_err(), - StdError::GenericErr { .. } + StdError::InvalidHex { .. } )); assert!(matches!( HexBinary::from_hex(" aa ").unwrap_err(), - StdError::GenericErr { .. } + StdError::InvalidHex { .. } )); } From 985bac933e191111c82568f545d31cf5e7b67e53 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 19 Sep 2022 13:47:15 +0200 Subject: [PATCH 259/344] Add CHANGELOG entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d772c2592..f12371d6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,11 @@ and this project adheres to - cosmwasm-std: Add testing macro `assert_approx_eq!` for comparing two integers to be relatively close to each other ([#1417]). +- cosmwasm-std: Add `HexBinary` which is like `Binary` but encodes to hex + strings in JSON. Add `StdError::InvalidHex` error case. ([#1425]) [#1417]: https://github.com/CosmWasm/cosmwasm/issues/1417 +[#1425]: https://github.com/CosmWasm/cosmwasm/pull/1425 ## [1.1.1] - 2022-09-15 From ad828814739edf5ebb5f10f0c575344c788b2fca Mon Sep 17 00:00:00 2001 From: Simon Warta <2603011+webmaster128@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:53:38 +0200 Subject: [PATCH 260/344] Update docs/MESSAGE_TYPES.md Co-authored-by: Tomasz Kurcz --- docs/MESSAGE_TYPES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md index cbcd9a039..0195e285f 100644 --- a/docs/MESSAGE_TYPES.md +++ b/docs/MESSAGE_TYPES.md @@ -1,13 +1,13 @@ ## CosmWasm message types -CosmWasm uses JSON for sending data from the host the Wasm contract and results -out of the Wasm contract. Such JSON messages are created in the client, -typically some JavaScript-based application. There the usage of JSON is feels -very natural for developers. However, JSON has signigicant limitations such as -the lack of a native binary type and inconsistent support for integers > 53 bit. -For this reason, the CosmWasm standard limrary `cosmwasm-std` shipts types that -ensure good user experience in JSON. The following table shows both stadard Rust -types as well as cosmwasm_std types and how they are encoded in JSON. +CosmWasm uses JSON for sending data from the host to the Wasm contract and +results out of the Wasm contract. Such JSON messages are created in the client, +typically some JavaScript-based application. There the usage of JSON feels very +natural for developers. However, JSON has significant limitations such as the +lack of a native binary type and inconsistent support for integers > 53 bit. For +this reason, the CosmWasm standard library `cosmwasm-std` ships types that +ensure good user experience in JSON. The following table shows both standard +Rust types as well as `cosmwasm_std` types and how they are encoded in JSON. | Rust type | JSON type[^1] | Example | Note | | ------------------- | -------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------- | From 4ed264955c48ed8e7e32a1cf0d58f98524dcb844 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 19 Sep 2022 15:23:33 +0200 Subject: [PATCH 261/344] Bump MODULE_SERIALIZATION_VERSION to v4 --- CHANGELOG.md | 7 +++++++ packages/vm/src/modules/file_system_cache.rs | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f12371d6e..2520887be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ and this project adheres to [#1417]: https://github.com/CosmWasm/cosmwasm/issues/1417 [#1425]: https://github.com/CosmWasm/cosmwasm/pull/1425 +### Fixed + +- cosmwasm-vm: Bump `MODULE_SERIALIZATION_VERSION` to "v4" because the module + serialization format changed between Wasmer 2.2 and 2.3 ([#1426]). + +[#1426]: https://github.com/CosmWasm/cosmwasm/issues/1426 + ## [1.1.1] - 2022-09-15 ### Fixed diff --git a/packages/vm/src/modules/file_system_cache.rs b/packages/vm/src/modules/file_system_cache.rs index a8e2f97a3..0488ca763 100644 --- a/packages/vm/src/modules/file_system_cache.rs +++ b/packages/vm/src/modules/file_system_cache.rs @@ -32,7 +32,12 @@ use crate::modules::current_wasmer_module_version; /// Version for cosmwasm_vm 1.0.0-beta5 / wasmvm 1.0.0-beta6 that ships with Wasmer 2.1.1. /// - **v3**:
/// Version for Wasmer 2.2.0 which contains a [module breaking change to 2.1.x](https://github.com/wasmerio/wasmer/pull/2747). -const MODULE_SERIALIZATION_VERSION: &str = "v3"; +/// - **v4**:
+/// Version for Wasmer 2.3.0 which contains a module breaking change to 2.2.0 that was not reflected in +/// the module header version (). In cosmwasm-vm 1.1.0-1.1.1 +/// the old value "v3" is still used along with Wasmer 2.3.0 (bug). From cosmwasm 1.1.2 onwards, this is +/// fixed by bumping to "v4". +const MODULE_SERIALIZATION_VERSION: &str = "v4"; /// Representation of a directory that contains compiled Wasm artifacts. pub struct FileSystemCache { @@ -205,7 +210,7 @@ mod tests { cache.store(&checksum, &module).unwrap(); let file_path = format!( - "{}/v3-wasmer1/{}", + "{}/v4-wasmer1/{}", tmp_dir.path().to_string_lossy(), checksum ); From 86d7a78d26246b878701f5e4609251414ba9b242 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 15:46:03 +0200 Subject: [PATCH 262/344] have the QueryResponses macro handle generics --- packages/schema-derive/src/query_responses.rs | 94 ++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 3cd3182cc..9012ae17c 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -7,10 +7,13 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { queries.sort(); let mappings = mappings.map(parse_tuple); + // Handle generics if the type has any + let (impl_generics, type_generics, maybe_where) = input.generics.split_for_impl(); + parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl ::cosmwasm_schema::QueryResponses for #ident { + impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #maybe_where { fn response_schemas_impl() -> ::std::collections::BTreeMap { ::std::collections::BTreeMap::from([ #( #mappings, )* @@ -113,6 +116,95 @@ mod tests { ); } + #[test] + fn generics() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + #[returns(bool)] + Foo, + #[returns(u32)] + Bar(T), + } + }; + + let input2: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg { + #[returns(bool)] + Foo, + #[returns(u32)] + Bar { data: T }, + } + }; + + let input3: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(rename_all = "snake_case")] + pub enum QueryMsg + where T: std::fmt::Debug + SomeTrait, + { + #[returns(bool)] + Foo, + #[returns(u32)] + Bar { data: T }, + } + }; + + let result = query_responses_derive_impl(input); + dbg!(&result); + assert_eq!( + result, + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl ::cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ + ("foo".to_string(), ::cosmwasm_schema::schema_for!(bool)), + ("bar".to_string(), ::cosmwasm_schema::schema_for!(u32)), + ]) + } + } + } + ); + assert_eq!( + query_responses_derive_impl(input2), + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl ::cosmwasm_schema::QueryResponses for QueryMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ + ("foo".to_string(), ::cosmwasm_schema::schema_for!(bool)), + ("bar".to_string(), ::cosmwasm_schema::schema_for!(u32)), + ]) + } + } + } + ); + let a = query_responses_derive_impl(input3); + assert_eq!( + a, + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl ::cosmwasm_schema::QueryResponses for QueryMsg + where T: std::fmt::Debug + SomeTrait, + { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ + ("foo".to_string(), ::cosmwasm_schema::schema_for!(bool)), + ("bar".to_string(), ::cosmwasm_schema::schema_for!(u32)), + ]) + } + } + } + ); + } + #[test] #[should_panic(expected = "missing return type for query: Supply")] fn missing_return() { From 32004b09fb17da06de0f5df692e235edae0a8fe6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 15:51:15 +0200 Subject: [PATCH 263/344] test for QueryMsgs with generics implementing QueryResponses --- packages/schema/tests/idl.rs | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 4da2670a8..885e13d31 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -106,3 +106,43 @@ fn test_query_responses() { // Find the "balance" query in responses api.get("responses").unwrap().get("balance").unwrap(); } + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsgWithGenerics +where + T: JsonSchema, +{ + #[returns(u128)] + QueryData { data: T }, +} + +#[test] +fn test_query_responses_generics() { + let api_str = generate_api! { + instantiate: InstantiateMsg, + query: QueryMsgWithGenerics, + } + .render() + .to_string() + .unwrap(); + + let api: Value = serde_json::from_str(&api_str).unwrap(); + let queries = api + .get("query") + .unwrap() + .get("oneOf") + .unwrap() + .as_array() + .unwrap(); + + // Find the "balance" query in the queries schema + assert_eq!(queries.len(), 1); + assert_eq!( + queries[0].get("required").unwrap().get(0).unwrap(), + "query_data" + ); + + // Find the "balance" query in responses + api.get("responses").unwrap().get("query_data").unwrap(); +} From dd95a5359f597f3e3da7021d0d513c5bbde3fd74 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 16:01:20 +0200 Subject: [PATCH 264/344] style --- packages/schema-derive/src/query_responses.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 9012ae17c..923fad014 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -8,12 +8,12 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let mappings = mappings.map(parse_tuple); // Handle generics if the type has any - let (impl_generics, type_generics, maybe_where) = input.generics.split_for_impl(); + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #maybe_where { + impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #where_clause { fn response_schemas_impl() -> ::std::collections::BTreeMap { ::std::collections::BTreeMap::from([ #( #mappings, )* From 7c6e173530420d8b8f2ecdd6076647ed2ac797e2 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 16:09:24 +0200 Subject: [PATCH 265/344] CHANGELOG --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f12371d6e..c92922d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,15 @@ and this project adheres to to be relatively close to each other ([#1417]). - cosmwasm-std: Add `HexBinary` which is like `Binary` but encodes to hex strings in JSON. Add `StdError::InvalidHex` error case. ([#1425]) - + [#1417]: https://github.com/CosmWasm/cosmwasm/issues/1417 [#1425]: https://github.com/CosmWasm/cosmwasm/pull/1425 +### Fixed + +- cosmwasm-schema: The `QueryResponses` derive macro now supports `QueryMsg`s + with generics. + ## [1.1.1] - 2022-09-15 ### Fixed From 868add40ac71f8e6655f3dbf7290b92b6dd18b68 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 16:12:26 +0200 Subject: [PATCH 266/344] fmt CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e096be8..43d9700e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to to be relatively close to each other ([#1417]). - cosmwasm-std: Add `HexBinary` which is like `Binary` but encodes to hex strings in JSON. Add `StdError::InvalidHex` error case. ([#1425]) - + [#1417]: https://github.com/CosmWasm/cosmwasm/issues/1417 [#1425]: https://github.com/CosmWasm/cosmwasm/pull/1425 From a20d5f910538dcb87bffcd58b8ed943db9fae2aa Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 16:20:34 +0200 Subject: [PATCH 267/344] correct CHANGELOG entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d9700e7..3bf5e4a99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ and this project adheres to with generics. ([#1429]) [#1426]: https://github.com/CosmWasm/cosmwasm/issues/1426 -[#1429]: https://github.com/CosmWasm/cosmwasm/issues/1429 +[#1429]: https://github.com/CosmWasm/cosmwasm/pull/1429 ## [1.1.1] - 2022-09-15 From b102c15ded828343466d89bfec7198e62bc91d49 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 19 Sep 2022 16:36:46 +0200 Subject: [PATCH 268/344] Set version: 1.1.2 --- CHANGELOG.md | 2 ++ Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 20 files changed, 94 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf5e4a99..bdebc3910 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.2] - 2022-09-19 + ### Added - cosmwasm-std: Add testing macro `assert_approx_eq!` for comparing two integers diff --git a/Cargo.lock b/Cargo.lock index 7c315afdc..d1bc68bf0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.1" +version = "1.1.2" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 63ea0e2e5..9216d1d23 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 6ab32bb0b..67c9af15a 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 81a9e6936..af826bf54 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index ba4454eb4..7e4d4f303 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 334e286f6..a6c2f416f 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index bec200b2c..7c7924051 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 8b510fbda..965ddcea0 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 41e819eff..2c5a56c40 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 44c0c0ba3..193e3945d 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index cb6019076..af013cbe2 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index d6c1b9827..3bb6b0da7 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.1" +version = "1.1.2" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.1" } -cosmwasm-std = { path = "../std", version = "1.1.1" } +cosmwasm-vm = { path = "../vm", version = "1.1.2" } +cosmwasm-std = { path = "../std", version = "1.1.2" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 5f2d244c3..d49e02851 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.1" +version = "1.1.2" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 1bdef8765..1215bd588 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.1" +version = "1.1.2" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 7030fe290..9076ab7a7 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.1" +version = "1.1.2" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 154a72d11..1d9e71d94 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.1" +version = "1.1.2" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.1", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.2", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 5738560ed..7685ff14c 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.1" +version = "1.1.2" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.1" } +cosmwasm-derive = { path = "../derive", version = "1.1.2" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.1" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.2" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 8cc921223..ed3c83da7 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.1" +version = "1.1.2" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.1", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.2", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index cb59e0140..c00bc5cf5 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.1" +version = "1.1.2" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.1", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.1" } +cosmwasm-std = { path = "../std", version = "1.1.2", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.2" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From e0a34202a488de35f6086f95d10b363e52828596 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 20 Sep 2022 14:54:32 +0200 Subject: [PATCH 269/344] Add u128/i128 --- docs/MESSAGE_TYPES.md | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md index 0195e285f..40b6ba892 100644 --- a/docs/MESSAGE_TYPES.md +++ b/docs/MESSAGE_TYPES.md @@ -9,26 +9,27 @@ this reason, the CosmWasm standard library `cosmwasm-std` ships types that ensure good user experience in JSON. The following table shows both standard Rust types as well as `cosmwasm_std` types and how they are encoded in JSON. -| Rust type | JSON type[^1] | Example | Note | -| ------------------- | -------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------- | -| bool | `true` or `false` | `true` | | -| u32/i32 | number | `123` | | -| u64/i64 | number | `123456` | Supported in Rust and Go. Other implementations (`jq`, `JavaScript`) do not support the full uint64/int64 range. | -| usize/isize | number | `123456` | ⚠️ Discouraged as this type has a different size in unit tests (64 bit) and Wasm (32 bit) | -| String | string | `"foo"` | -| &str | string | `"foo"` | ⚠️ Unsuppored since message types must be owned (DeserializeOwned) | -| Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | -| Vec\ | array of JSON type of `T` | `[1, 2, 3]` | -| Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | -| struct MyType { … } | object | `{"foo":12}` | | -| [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | -| [Uint128] | string containing number | `"1234321"` | | -| [Uint256] | string containing number | `"1234321"` | | -| [Uint512] | string containing number | `"1234321"` | | -| [Decimal] | string containing decimal number | `"55.6584"` | | -| [Decimal256] | string containing decimal number | `"55.6584"` | | -| [Binary] | string containing base64 data | `"MTIzCg=="` | | -| [HexBinary] | string containing hex data | `"b5d7d24e428c"` | | +| Rust type | JSON type[^1] | Example | Note | +| ------------------- | -------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| bool | `true` or `false` | `true` | | +| u32/i32 | number | `123` | | +| u64/i64 | number | `123456` | Supported in Rust and Go. Other implementations (`jq`, `JavaScript`) do not support the full uint64/int64 range. | +| u128/i128 | string | `"340282366920938463463374607431768211455", "-2766523308300312711084346401884294402"` | | +| usize/isize | number | `123456` | ⚠️ Discouraged as this type has a different size in unit tests (64 bit) and Wasm (32 bit) | +| String | string | `"foo"` | +| &str | string | `"foo"` | ⚠️ Unsuppored since message types must be owned (DeserializeOwned) | +| Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | +| Vec\ | array of JSON type of `T` | `[1, 2, 3]` | +| Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | +| struct MyType { … } | object | `{"foo":12}` | | +| [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | +| [Uint128] | string containing number | `"1234321"` | | +| [Uint256] | string containing number | `"1234321"` | | +| [Uint512] | string containing number | `"1234321"` | | +| [Decimal] | string containing decimal number | `"55.6584"` | | +| [Decimal256] | string containing decimal number | `"55.6584"` | | +| [Binary] | string containing base64 data | `"MTIzCg=="` | | +| [HexBinary] | string containing hex data | `"b5d7d24e428c"` | | [uint64]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint64.html [uint128]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint128.html From 71a13139426f3411c0948cf8efc4faf229104b26 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 20 Sep 2022 15:08:21 +0200 Subject: [PATCH 270/344] Use strings and booleans for Vec example --- docs/MESSAGE_TYPES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md index 40b6ba892..93ae38a50 100644 --- a/docs/MESSAGE_TYPES.md +++ b/docs/MESSAGE_TYPES.md @@ -19,7 +19,7 @@ Rust types as well as `cosmwasm_std` types and how they are encoded in JSON. | String | string | `"foo"` | | &str | string | `"foo"` | ⚠️ Unsuppored since message types must be owned (DeserializeOwned) | | Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | -| Vec\ | array of JSON type of `T` | `[1, 2, 3]` | +| Vec\ | array of JSON type of `T` | `["one", "two", "three"]` (Vec\), `[true, false]` (Vec\) | | Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | | struct MyType { … } | object | `{"foo":12}` | | | [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | From 1177a735b42afcbb340bb7a925847c7b2fbe9c86 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 20 Sep 2022 15:11:41 +0200 Subject: [PATCH 271/344] Create stronger warning for &str and usize --- docs/MESSAGE_TYPES.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/MESSAGE_TYPES.md b/docs/MESSAGE_TYPES.md index 93ae38a50..faaf1e65d 100644 --- a/docs/MESSAGE_TYPES.md +++ b/docs/MESSAGE_TYPES.md @@ -9,27 +9,27 @@ this reason, the CosmWasm standard library `cosmwasm-std` ships types that ensure good user experience in JSON. The following table shows both standard Rust types as well as `cosmwasm_std` types and how they are encoded in JSON. -| Rust type | JSON type[^1] | Example | Note | -| ------------------- | -------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| bool | `true` or `false` | `true` | | -| u32/i32 | number | `123` | | -| u64/i64 | number | `123456` | Supported in Rust and Go. Other implementations (`jq`, `JavaScript`) do not support the full uint64/int64 range. | -| u128/i128 | string | `"340282366920938463463374607431768211455", "-2766523308300312711084346401884294402"` | | -| usize/isize | number | `123456` | ⚠️ Discouraged as this type has a different size in unit tests (64 bit) and Wasm (32 bit) | +| Rust type | JSON type[^1] | Example | Note | +| ------------------- | -------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| bool | `true` or `false` | `true` | | +| u32/i32 | number | `123` | | +| u64/i64 | number | `123456` | Supported in Rust and Go. Other implementations (`jq`, `JavaScript`) do not support the full uint64/int64 range. | +| u128/i128 | string | `"340282366920938463463374607431768211455", "-2766523308300312711084346401884294402"` | | +| usize/isize | number | `123456` | 🚫 Don't use this type because it has a different size in unit tests (64 bit) and Wasm (32 bit). Also it tends to issue float instructions such that the contracts cannot be uploaded. | | String | string | `"foo"` | -| &str | string | `"foo"` | ⚠️ Unsuppored since message types must be owned (DeserializeOwned) | -| Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | +| &str | string | `"foo"` | 🚫 Unsuppored since message types must be owned (DeserializeOwned) | +| Option\ | `null` or JSON type of `T` | `null`, `{"foo":12}` | | | Vec\ | array of JSON type of `T` | `["one", "two", "three"]` (Vec\), `[true, false]` (Vec\) | -| Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | -| struct MyType { … } | object | `{"foo":12}` | | -| [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | -| [Uint128] | string containing number | `"1234321"` | | -| [Uint256] | string containing number | `"1234321"` | | -| [Uint512] | string containing number | `"1234321"` | | -| [Decimal] | string containing decimal number | `"55.6584"` | | -| [Decimal256] | string containing decimal number | `"55.6584"` | | -| [Binary] | string containing base64 data | `"MTIzCg=="` | | -| [HexBinary] | string containing hex data | `"b5d7d24e428c"` | | +| Vec\ | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. | +| struct MyType { … } | object | `{"foo":12}` | | +| [Uint64] | string containing number | `"1234321"` | Used to support full uint64 range in all implementations | +| [Uint128] | string containing number | `"1234321"` | | +| [Uint256] | string containing number | `"1234321"` | | +| [Uint512] | string containing number | `"1234321"` | | +| [Decimal] | string containing decimal number | `"55.6584"` | | +| [Decimal256] | string containing decimal number | `"55.6584"` | | +| [Binary] | string containing base64 data | `"MTIzCg=="` | | +| [HexBinary] | string containing hex data | `"b5d7d24e428c"` | | [uint64]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint64.html [uint128]: https://docs.rs/cosmwasm-std/1.1.1/cosmwasm_std/struct.Uint128.html From 6d3ef7b0d82456dc4afd51bc0c3472969db65fa7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Thu, 29 Sep 2022 12:05:41 +0200 Subject: [PATCH 272/344] Make IntegrityError public --- packages/schema/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index b9fb9e434..6f94ea164 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -6,7 +6,7 @@ mod remove; pub use export::{export_schema, export_schema_with_title}; pub use idl::{Api, IDL_VERSION}; -pub use query_response::QueryResponses; +pub use query_response::{IntegrityError, QueryResponses}; pub use remove::remove_schemas; // Re-exports From 78d805661830a95c2f413318f182a6f027db339b Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Thu, 29 Sep 2022 12:07:29 +0200 Subject: [PATCH 273/344] CHANGELOG update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdebc3910..cb557dd7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to ## [Unreleased] +### Fixed + +- cosmwasm-schema: `IntegrityError` is now public + ## [1.1.2] - 2022-09-19 ### Added From 3fa20ad1b14e18f9b387904142c505a6811dc3d3 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Thu, 29 Sep 2022 13:13:11 +0200 Subject: [PATCH 274/344] Set version: 1.1.3 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d1bc68bf0..9600f87bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.2" +version = "1.1.3" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 9216d1d23..51874e1df 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 67c9af15a..b8b3ca199 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index af826bf54..77c81a089 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 7e4d4f303..5db003e64 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index a6c2f416f..bd2ce66b8 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 7c7924051..d7a6559e5 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 965ddcea0..558797316 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 2c5a56c40..d51d60386 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 193e3945d..bf7254d90 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index af013cbe2..6e1b8311c 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 3bb6b0da7..0605da6ec 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.2" +version = "1.1.3" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.2" } -cosmwasm-std = { path = "../std", version = "1.1.2" } +cosmwasm-vm = { path = "../vm", version = "1.1.3" } +cosmwasm-std = { path = "../std", version = "1.1.3" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index d49e02851..0592c7388 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.2" +version = "1.1.3" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 1215bd588..a1765b779 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.2" +version = "1.1.3" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 9076ab7a7..627f68a68 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.2" +version = "1.1.3" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 1d9e71d94..dd2722f9d 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.2" +version = "1.1.3" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.2", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.3", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 7685ff14c..abc85c844 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.2" +version = "1.1.3" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.2" } +cosmwasm-derive = { path = "../derive", version = "1.1.3" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.2" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.3" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index ed3c83da7..fb377bba1 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.2" +version = "1.1.3" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.2", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.3", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index c00bc5cf5..e94c53734 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.2" +version = "1.1.3" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.2", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.2" } +cosmwasm-std = { path = "../std", version = "1.1.3", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.3" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From 7e865a2b9168679b25d041946eca3feadb192450 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Thu, 29 Sep 2022 13:21:48 +0200 Subject: [PATCH 275/344] Update CHANGELOG (1.1.3) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb557dd7f..b227b0368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.3] - 2022-09-29 + ### Fixed - cosmwasm-schema: `IntegrityError` is now public From 138574aeeb5e019393aeedbc96650efceb68a352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kuras?= Date: Fri, 30 Sep 2022 12:13:23 +0200 Subject: [PATCH 276/344] Properly analyzing schemas generated for untagged enums --- CHANGELOG.md | 2 + packages/schema/src/query_response.rs | 192 ++++++++++++++++++++------ 2 files changed, 149 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b227b0368..b02dce9dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +- cosmwasm-schema: Properly analyzing schemas generated for `untagged` enums + ## [1.1.3] - 2022-09-29 ### Fixed diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 0ca3cfffd..49a82b2c0 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -1,7 +1,7 @@ use std::collections::{BTreeMap, BTreeSet}; use schemars::{ - schema::{InstanceType, RootSchema, SingleOrVec}, + schema::{InstanceType, RootSchema, SingleOrVec, SubschemaValidation}, JsonSchema, }; use thiserror::Error; @@ -45,70 +45,127 @@ pub trait QueryResponses: JsonSchema { fn response_schemas_impl() -> BTreeMap; } +/// Returns possible enum variants from `one_of` analysis +fn enum_variants( + subschemas: SubschemaValidation, +) -> Result>, IntegrityError> { + let iter = subschemas + .one_of + .ok_or(IntegrityError::InvalidQueryMsgSchema)? + .into_iter() + .map(|s| { + let s = s.into_object(); + + if let Some(SingleOrVec::Single(ty)) = s.instance_type { + match *ty { + // We'll have an object if the Rust enum variant was C-like or tuple-like + InstanceType::Object => s + .object + .ok_or(IntegrityError::InvalidQueryMsgSchema)? + .required + .into_iter() + .next() + .ok_or(IntegrityError::InvalidQueryMsgSchema), + // We might have a string here if the Rust enum variant was unit-like + InstanceType::String => { + let values = s.enum_values.ok_or(IntegrityError::InvalidQueryMsgSchema)?; + + if values.len() != 1 { + return Err(IntegrityError::InvalidQueryMsgSchema); + } + + values[0] + .as_str() + .map(String::from) + .ok_or(IntegrityError::InvalidQueryMsgSchema) + } + _ => Err(IntegrityError::InvalidQueryMsgSchema), + } + } else { + Err(IntegrityError::InvalidQueryMsgSchema) + } + }); + + Ok(iter) +} + +fn verify_queries( + query_msg: BTreeSet, + responses: BTreeSet, +) -> Result<(), IntegrityError> { + if query_msg != responses { + return Err(IntegrityError::InconsistentQueries { + query_msg, + responses, + }); + } + + Ok(()) +} + /// `generated_queries` is expected to be a sorted slice here! fn check_api_integrity( generated_queries: BTreeSet, ) -> Result<(), IntegrityError> { let schema = crate::schema_for!(T); - // something more readable below? + let subschemas = if let Some(subschemas) = schema.schema.subschemas { + subschemas + } else { + // No subschemas - no resposnes are expected + return verify_queries(BTreeSet::new(), generated_queries); + }; - let schema_queries: BTreeSet<_> = match schema.schema.subschemas { - Some(subschemas) => subschemas - .one_of - .ok_or(IntegrityError::InvalidQueryMsgSchema)? + let schema_queries = if let Some(any_of) = subschemas.any_of { + // If `any_of` exists, we assume schema is generated from untagged enum + any_of .into_iter() - .map(|s| { - let s = s.into_object(); - - if let Some(SingleOrVec::Single(ty)) = s.instance_type { - match *ty { - // We'll have an object if the Rust enum variant was C-like or tuple-like - InstanceType::Object => s - .object - .ok_or(IntegrityError::InvalidQueryMsgSchema)? - .required - .into_iter() - .next() - .ok_or(IntegrityError::InvalidQueryMsgSchema), - // We might have a string here if the Rust enum variant was unit-like - InstanceType::String => { - let values = - s.enum_values.ok_or(IntegrityError::InvalidQueryMsgSchema)?; - - if values.len() != 1 { - return Err(IntegrityError::InvalidQueryMsgSchema); - } - - values[0] - .as_str() - .map(String::from) - .ok_or(IntegrityError::InvalidQueryMsgSchema) + .map(|schema| dbg!(schema.into_object())) + .filter_map(|obj| { + if let Some(reference) = obj.reference { + // Subschemas can be hidden behind references - we want to map them to proper + // subschemas in such case + + // Only references to definitions are supported + let reference = match reference.strip_prefix("#/definitions/") { + Some(reference) => reference, + None => { + return Some(Err(IntegrityError::ExternalReference { + reference: reference.to_owned(), + })) } - _ => Err(IntegrityError::InvalidQueryMsgSchema), - } + }; + + let schema = match schema.definitions.get(reference) { + Some(schema) => schema.clone(), + None => return Some(Err(IntegrityError::InvalidQueryMsgSchema)), + }; + + Ok(schema.into_object().subschemas).transpose() } else { - Err(IntegrityError::InvalidQueryMsgSchema) + Ok(obj.subschemas).transpose() } }) - .collect::>()?, - None => BTreeSet::new(), + .map(|subschema| enum_variants(*subschema?)) + .collect::, _>>()? + .into_iter() + .flatten() + .collect::>()? + } else { + // If `any_of` is not present, there was no untagged enum on top, we expect normal enum at + // this point + enum_variants(*subschemas)?.collect::>()? }; - if schema_queries != generated_queries { - return Err(IntegrityError::InconsistentQueries { - query_msg: schema_queries, - responses: generated_queries, - }); - } - - Ok(()) + verify_queries(schema_queries, generated_queries) } #[derive(Debug, Error, PartialEq, Eq)] pub enum IntegrityError { #[error("the structure of the QueryMsg schema was unexpected")] InvalidQueryMsgSchema, + #[error("external reference in schema found, but they are not supported")] + ExternalReference { reference: String }, #[error( "inconsistent queries - QueryMsg schema has {query_msg:?}, but query responses have {responses:?}" )] @@ -203,4 +260,49 @@ mod tests { } ); } + + #[derive(Debug, JsonSchema)] + #[serde(rename_all = "snake_case")] + #[allow(dead_code)] + pub enum ExtMsg { + Extension {}, + } + + #[derive(Debug, JsonSchema)] + #[serde(untagged, rename_all = "snake_case")] + #[allow(dead_code)] + pub enum UntaggedMsg { + Good(GoodMsg), + Ext(ExtMsg), + Empty(EmptyMsg), + } + + impl QueryResponses for UntaggedMsg { + fn response_schemas_impl() -> BTreeMap { + BTreeMap::from([ + ("balance_for".to_string(), schema_for!(u128)), + ("account_id_for".to_string(), schema_for!(u128)), + ("supply".to_string(), schema_for!(u128)), + ("liquidity".to_string(), schema_for!(u128)), + ("account_count".to_string(), schema_for!(u128)), + ("extension".to_string(), schema_for!(())), + ]) + } + } + + #[test] + fn untagged_msg_works() { + let response_schemas = UntaggedMsg::response_schemas().unwrap(); + assert_eq!( + response_schemas, + BTreeMap::from([ + ("balance_for".to_string(), schema_for!(u128)), + ("account_id_for".to_string(), schema_for!(u128)), + ("supply".to_string(), schema_for!(u128)), + ("liquidity".to_string(), schema_for!(u128)), + ("account_count".to_string(), schema_for!(u128)), + ("extension".to_string(), schema_for!(())), + ]) + ); + } } From 4ab7f5b7e9f47a232ba6b01e8e0b92945474a1ea Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 3 Oct 2022 14:03:59 +0200 Subject: [PATCH 277/344] Set version: 1.1.4 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9600f87bb..ff0c5a2d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.3" +version = "1.1.4" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 51874e1df..38dcfc1bd 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index b8b3ca199..04af526e6 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 77c81a089..94018c753 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 5db003e64..13e590043 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index bd2ce66b8..b1622509f 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index d7a6559e5..04916a9dd 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 558797316..63ddccfb4 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index d51d60386..317621da9 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index bf7254d90..e78647531 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 6e1b8311c..ca019ffcf 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 0605da6ec..2e9b337d7 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.3" +version = "1.1.4" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.3" } -cosmwasm-std = { path = "../std", version = "1.1.3" } +cosmwasm-vm = { path = "../vm", version = "1.1.4" } +cosmwasm-std = { path = "../std", version = "1.1.4" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 0592c7388..6c368ebb5 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.3" +version = "1.1.4" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index a1765b779..546316b8b 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.3" +version = "1.1.4" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 627f68a68..e452bb1ab 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.3" +version = "1.1.4" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index dd2722f9d..9b463ec85 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.3" +version = "1.1.4" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.3", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.4", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index abc85c844..785671b81 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.3" +version = "1.1.4" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.3" } +cosmwasm-derive = { path = "../derive", version = "1.1.4" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.3" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.4" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index fb377bba1..0eba772ea 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.3" +version = "1.1.4" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.3", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.4", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index e94c53734..67236d670 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.3" +version = "1.1.4" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.3", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.3" } +cosmwasm-std = { path = "../std", version = "1.1.4", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.4" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From 84bded338d244a29ec7911bb6d003eec7a776caa Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 3 Oct 2022 14:33:24 +0200 Subject: [PATCH 278/344] Update CHANGELOG (1.1.4) --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b02dce9dd..cb9adc432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ and this project adheres to ## [Unreleased] -- cosmwasm-schema: Properly analyzing schemas generated for `untagged` enums +## [1.1.4] - 2022-10-03 + +### Fixed + +- cosmwasm-schema: Properly analyze schemas generated for `untagged` enums ## [1.1.3] - 2022-09-29 From 555fbff093ee2804e06c638a1a286cbbb5e2686e Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Fri, 30 Sep 2022 15:04:39 +0200 Subject: [PATCH 279/344] Add query_responses(nested) attribute --- packages/schema-derive/src/lib.rs | 2 +- packages/schema-derive/src/query_responses.rs | 205 ++++++++++++++++-- packages/schema/src/lib.rs | 2 +- packages/schema/src/query_response.rs | 30 +++ packages/schema/tests/idl.rs | 87 +++++++- 5 files changed, 306 insertions(+), 20 deletions(-) diff --git a/packages/schema-derive/src/lib.rs b/packages/schema-derive/src/lib.rs index 94e9d831e..1674a5b47 100644 --- a/packages/schema-derive/src/lib.rs +++ b/packages/schema-derive/src/lib.rs @@ -5,7 +5,7 @@ mod query_responses; use quote::ToTokens; use syn::{parse_macro_input, DeriveInput, ItemEnum}; -#[proc_macro_derive(QueryResponses, attributes(returns))] +#[proc_macro_derive(QueryResponses, attributes(returns, query_responses))] pub fn query_responses_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as ItemEnum); diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 923fad014..bca3207ed 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -1,23 +1,50 @@ -use syn::{parse_quote, Expr, ExprTuple, ItemEnum, ItemImpl, Type, Variant}; +use syn::{parse_quote, Expr, ExprTuple, Ident, ItemEnum, ItemImpl, Type, Variant}; pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { - let ident = input.ident; - let mappings = input.variants.into_iter().map(parse_query); - let mut queries: Vec<_> = mappings.clone().map(|(q, _)| q).collect(); - queries.sort(); - let mappings = mappings.map(parse_tuple); + let is_nested = has_attr(&input, "query_responses", "nested"); - // Handle generics if the type has any - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + if is_nested { + if !has_attr(&input, "serde", "untagged") { + panic!("#[query_responses(nested)] only makes sense in conjunction with #[serde(untagged)]"); + } + let ident = input.ident; + let subquery_calls = input.variants.into_iter().map(parse_subquery); - parse_quote! { - #[automatically_derived] - #[cfg(not(target_arch = "wasm32"))] - impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #where_clause { - fn response_schemas_impl() -> ::std::collections::BTreeMap { - ::std::collections::BTreeMap::from([ - #( #mappings, )* - ]) + // Handle generics if the type has any + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + + let subquery_len = subquery_calls.len(); + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #where_clause { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + let subqueries = [ + #( #subquery_calls, )* + ]; + ::cosmwasm_schema::combine_subqueries::<#subquery_len, #ident>(subqueries) + } + } + } + } else { + let ident = input.ident; + let mappings = input.variants.into_iter().map(parse_query); + let mut queries: Vec<_> = mappings.clone().map(|(q, _)| q).collect(); + queries.sort(); + let mappings = mappings.map(parse_tuple); + + // Handle generics if the type has any + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl #impl_generics ::cosmwasm_schema::QueryResponses for #ident #type_generics #where_clause { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + ::std::collections::BTreeMap::from([ + #( #mappings, )* + ]) + } } } } @@ -40,6 +67,34 @@ fn parse_query(v: Variant) -> (String, Expr) { ) } +/// Extract the nested query -> response mapping out of an enum variant. +fn parse_subquery(v: Variant) -> Expr { + let submsg = match v.fields { + syn::Fields::Named(_) => panic!("nested query response can only contain tuple structs"), + syn::Fields::Unnamed(fields) => { + if fields.unnamed.len() != 1 { + panic!("invalid number of subquery parameters"); + } + + fields.unnamed[0].ty.clone() + } + syn::Fields::Unit => panic!("a unit variant is not a valid subquery"), + }; + parse_quote!(<#submsg as ::cosmwasm_schema::QueryResponses>::response_schemas_impl()) +} + +/// Checks whether the input has the given #[query_responses($attr))] attribute +fn has_attr(input: &ItemEnum, path: &str, attr: &str) -> bool { + input + .attrs + .iter() + .find(|a| { + a.path.get_ident().unwrap() == path + && a.parse_args::().ok().map_or(false, |i| i == attr) + }) + .is_some() +} + fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { parse_quote! { (#q.to_string(), #r) @@ -268,4 +323,122 @@ mod tests { assert_eq!(to_snake_case("SnakeCase"), "snake_case"); assert_eq!(to_snake_case("Wasm123AndCo"), "wasm123_and_co"); } + + #[test] + fn nested_works() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(untagged)] + #[query_responses(nested)] + pub enum ContractQueryMsg { + Cw1(QueryMsg1), + Whitelist(whitelist::QueryMsg), + Cw1WhitelistContract(QueryMsg), + } + }; + let result = query_responses_derive_impl(input); + assert_eq!( + result, + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl ::cosmwasm_schema::QueryResponses for ContractQueryMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + let subqueries = [ + ::response_schemas_impl(), + ::response_schemas_impl(), + ::response_schemas_impl(), + ]; + ::cosmwasm_schema::combine_subqueries::<3usize, ContractQueryMsg>(subqueries) + } + } + } + ); + } + + #[test] + fn nested_empty() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(untagged)] + #[query_responses(nested)] + pub enum EmptyMsg {} + }; + let result = query_responses_derive_impl(input); + assert_eq!( + result, + parse_quote! { + #[automatically_derived] + #[cfg(not(target_arch = "wasm32"))] + impl ::cosmwasm_schema::QueryResponses for EmptyMsg { + fn response_schemas_impl() -> ::std::collections::BTreeMap { + let subqueries = []; + ::cosmwasm_schema::combine_subqueries::<0usize, EmptyMsg>(subqueries) + } + } + } + ); + } + + #[test] + #[should_panic(expected = "invalid number of subquery parameters")] + fn nested_too_many_params() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(untagged)] + #[query_responses(nested)] + pub enum ContractQueryMsg { + Msg1(QueryMsg1, QueryMsg2), + Whitelist(whitelist::QueryMsg), + } + }; + query_responses_derive_impl(input); + } + + #[test] + #[should_panic(expected = "nested query response can only contain tuple structs")] + fn nested_mixed() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(untagged)] + #[query_responses(nested)] + pub enum ContractQueryMsg { + Cw1(cw1::QueryMsg), + Test { + mixed: bool, + } + } + }; + query_responses_derive_impl(input); + } + + #[test] + #[should_panic( + expected = "#[query_responses(nested)] only makes sense in conjunction with #[serde(untagged)]" + )] + fn nested_without_untagged() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[query_responses(nested)] + pub enum ContractQueryMsg { + Cw1(cw1::QueryMsg), + } + }; + query_responses_derive_impl(input); + } + + #[test] + #[should_panic(expected = "a unit variant is not a valid subquery")] + fn nested_unit_variant() { + let input: ItemEnum = parse_quote! { + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] + #[serde(untagged)] + #[query_responses(nested)] + pub enum ContractQueryMsg { + Cw1(cw1::QueryMsg), + Whitelist, + } + }; + query_responses_derive_impl(input); + } } diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 6f94ea164..991473a90 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -6,7 +6,7 @@ mod remove; pub use export::{export_schema, export_schema_with_title}; pub use idl::{Api, IDL_VERSION}; -pub use query_response::{IntegrityError, QueryResponses}; +pub use query_response::{combine_subqueries, IntegrityError, QueryResponses}; pub use remove::remove_schemas; // Re-exports diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 49a82b2c0..03e9d90da 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -30,6 +30,20 @@ pub use cosmwasm_schema_derive::QueryResponses; /// #[returns(AccountInfo)] /// AccountInfo { account: String }, /// } +/// +/// // You can also compose multiple queries using #[query_responses(nested)]: +/// #[derive(JsonSchema, QueryResponses)] +/// #[query_responses(nested)] +/// #[serde(untagged)] +/// enum QueryMsg2 { +/// MsgA(QueryMsg), +/// MsgB(QueryB), +/// } +/// #[derive(JsonSchema, QueryResponses)] +/// enum QueryB { +/// #[returns(AccountInfo)] +/// AccountInfo { account: String }, +/// } /// ``` pub trait QueryResponses: JsonSchema { fn response_schemas() -> Result, IntegrityError> { @@ -45,6 +59,22 @@ pub trait QueryResponses: JsonSchema { fn response_schemas_impl() -> BTreeMap; } +/// Combines multiple response schemas into one. Panics if there are name collisions. +/// Used internally in the implementation of [`QueryResponses`] when using `#[query_responses(nested)]` +pub fn combine_subqueries( + subqueries: [BTreeMap; N], +) -> BTreeMap { + let sub_count = subqueries.iter().flatten().count(); + let map: BTreeMap<_, _> = subqueries.into_iter().flatten().collect(); + if map.len() != sub_count { + panic!( + "name collision in subqueries for {}", + std::any::type_name::() + ) + } + map +} + /// Returns possible enum variants from `one_of` analysis fn enum_variants( subschemas: SubschemaValidation, diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 885e13d31..7dc120016 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -136,13 +136,96 @@ fn test_query_responses_generics() { .as_array() .unwrap(); - // Find the "balance" query in the queries schema + // Find the "query_data" query in the queries schema assert_eq!(queries.len(), 1); assert_eq!( queries[0].get("required").unwrap().get(0).unwrap(), "query_data" ); - // Find the "balance" query in responses + // Find the "query_data" query in responses api.get("responses").unwrap().get("query_data").unwrap(); } + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] +#[serde(untagged)] +#[query_responses(nested)] +pub enum NestedQueryMsg { + Query(QueryMsg), + Sub(SubQueryMsg1), +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] +#[serde(rename_all = "snake_case")] +pub enum SubQueryMsg1 { + #[returns(u128)] + Variant1 { test: String }, +} + +#[test] +fn test_nested_query_responses() { + let api_str = generate_api! { + instantiate: InstantiateMsg, + query: NestedQueryMsg, + } + .render() + .to_string() + .unwrap(); + + let api: Value = serde_json::from_str(&api_str).unwrap(); + let queries = api + .get("query") + .unwrap() + .get("anyOf") + .unwrap() + .as_array() + .unwrap(); + let definitions = api.get("query").unwrap().get("definitions").unwrap(); + + // Find the subqueries + assert_eq!(queries.len(), 2); + assert_eq!( + queries[0].get("$ref").unwrap().as_str().unwrap(), + "#/definitions/QueryMsg" + ); + assert_eq!( + queries[1].get("$ref").unwrap().as_str().unwrap(), + "#/definitions/SubQueryMsg1" + ); + let query_msg_queries = definitions + .get("QueryMsg") + .unwrap() + .get("oneOf") + .unwrap() + .as_array() + .unwrap(); + let sub_query_msg_queries = definitions + .get("SubQueryMsg1") + .unwrap() + .get("oneOf") + .unwrap() + .as_array() + .unwrap(); + + // Find "balance" and "variant1" queries in the query schema + assert_eq!( + query_msg_queries[0] + .get("required") + .unwrap() + .get(0) + .unwrap(), + "balance" + ); + assert_eq!( + sub_query_msg_queries[0] + .get("required") + .unwrap() + .get(0) + .unwrap(), + "variant1" + ); + + // Find "balance" and "variant1" queries in responses + api.get("responses").unwrap().get("balance").unwrap(); + api.get("responses").unwrap().get("variant1").unwrap(); +} From 981b705d36c733aa4f7161ae286b0e2a1146519e Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Fri, 30 Sep 2022 15:19:05 +0200 Subject: [PATCH 280/344] Fix clippy --- packages/schema-derive/src/query_responses.rs | 12 ++++-------- packages/schema/tests/idl.rs | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index bca3207ed..a25048a5c 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -85,14 +85,10 @@ fn parse_subquery(v: Variant) -> Expr { /// Checks whether the input has the given #[query_responses($attr))] attribute fn has_attr(input: &ItemEnum, path: &str, attr: &str) -> bool { - input - .attrs - .iter() - .find(|a| { - a.path.get_ident().unwrap() == path - && a.parse_args::().ok().map_or(false, |i| i == attr) - }) - .is_some() + input.attrs.iter().any(|a| { + a.path.get_ident().unwrap() == path + && a.parse_args::().ok().map_or(false, |i| i == attr) + }) } fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 7dc120016..a3778f222 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -147,7 +147,7 @@ fn test_query_responses_generics() { api.get("responses").unwrap().get("query_data").unwrap(); } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(untagged)] #[query_responses(nested)] pub enum NestedQueryMsg { @@ -155,7 +155,7 @@ pub enum NestedQueryMsg { Sub(SubQueryMsg1), } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] pub enum SubQueryMsg1 { #[returns(u128)] From 29175f793804e5b9a9ad37bf1bbb428e6eb235a6 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Tue, 4 Oct 2022 08:58:45 +0200 Subject: [PATCH 281/344] Fix doc comment --- packages/schema-derive/src/query_responses.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index a25048a5c..b3e42604a 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -83,7 +83,7 @@ fn parse_subquery(v: Variant) -> Expr { parse_quote!(<#submsg as ::cosmwasm_schema::QueryResponses>::response_schemas_impl()) } -/// Checks whether the input has the given #[query_responses($attr))] attribute +/// Checks whether the input has the given `#[$path($attr))]` attribute fn has_attr(input: &ItemEnum, path: &str, attr: &str) -> bool { input.attrs.iter().any(|a| { a.path.get_ident().unwrap() == path From 0dddd18ff00bc9e1978196a3fa2eda7f7b3ea178 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Tue, 4 Oct 2022 09:00:04 +0200 Subject: [PATCH 282/344] Unify error message --- packages/schema-derive/src/query_responses.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index b3e42604a..eaa50be01 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -70,7 +70,7 @@ fn parse_query(v: Variant) -> (String, Expr) { /// Extract the nested query -> response mapping out of an enum variant. fn parse_subquery(v: Variant) -> Expr { let submsg = match v.fields { - syn::Fields::Named(_) => panic!("nested query response can only contain tuple structs"), + syn::Fields::Named(_) => panic!("a struct variant is not a valid subquery"), syn::Fields::Unnamed(fields) => { if fields.unnamed.len() != 1 { panic!("invalid number of subquery parameters"); @@ -392,7 +392,7 @@ mod tests { } #[test] - #[should_panic(expected = "nested query response can only contain tuple structs")] + #[should_panic(expected = "a struct variant is not a valid subquery")] fn nested_mixed() { let input: ItemEnum = parse_quote! { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] From dd21f418e2143164bc6d32e68744526b2a05d799 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Tue, 4 Oct 2022 09:13:49 +0200 Subject: [PATCH 283/344] Remove check for serde(untagged) --- packages/schema-derive/src/query_responses.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index eaa50be01..28764b13a 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -4,9 +4,6 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let is_nested = has_attr(&input, "query_responses", "nested"); if is_nested { - if !has_attr(&input, "serde", "untagged") { - panic!("#[query_responses(nested)] only makes sense in conjunction with #[serde(untagged)]"); - } let ident = input.ident; let subquery_calls = input.variants.into_iter().map(parse_subquery); @@ -408,21 +405,6 @@ mod tests { query_responses_derive_impl(input); } - #[test] - #[should_panic( - expected = "#[query_responses(nested)] only makes sense in conjunction with #[serde(untagged)]" - )] - fn nested_without_untagged() { - let input: ItemEnum = parse_quote! { - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, QueryResponses)] - #[query_responses(nested)] - pub enum ContractQueryMsg { - Cw1(cw1::QueryMsg), - } - }; - query_responses_derive_impl(input); - } - #[test] #[should_panic(expected = "a unit variant is not a valid subquery")] fn nested_unit_variant() { From 780c833cf12809353e41c5ce5996db845a888fb1 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Tue, 4 Oct 2022 09:57:57 +0200 Subject: [PATCH 284/344] Add name collision test --- packages/schema/tests/idl.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index a3778f222..6da66487f 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -229,3 +229,26 @@ fn test_nested_query_responses() { api.get("responses").unwrap().get("balance").unwrap(); api.get("responses").unwrap().get("variant1").unwrap(); } + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] +#[serde(rename_all = "snake_case")] +enum QueryMsg2 { + #[returns(u128)] + Balance {}, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] +#[query_responses(nested)] +enum NestedNameCollision { + Q1(QueryMsg), + Q2(QueryMsg2), +} + +#[test] +#[should_panic = "name collision in subqueries for idl::NestedNameCollision"] +fn nested_name_collision_caught() { + generate_api! { + instantiate: InstantiateMsg, + query: NestedNameCollision, + }; +} From cf79105f54ae5db1de5df5335f4dc3a92f790308 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 10 Oct 2022 11:47:31 +0200 Subject: [PATCH 285/344] Improve error when compiling schema gen for wasm --- CHANGELOG.md | 5 +++++ packages/schema-derive/src/generate_api.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb9adc432..4ade4cbfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to ## [Unreleased] +### Added + +- cosmwasm-schema: Better error messaging when attempting to compile schema + generator for `wasm32` + ## [1.1.4] - 2022-10-03 ### Fixed diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index fbd07eb62..f3f8bbcaa 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -13,6 +13,8 @@ pub fn write_api_impl(input: Options) -> Block { parse_quote! { { + #[cfg(target_arch = "wasm32")] + compile_error!("can't compile schema generator for the `wasm32` arch\nhint: are you trying to compile a smart contract without specifying `--lib`?"); use ::std::env::current_dir; use ::std::fs::{create_dir_all, write}; From e6aa32b8e281fdd131dba6b28a10feccc061d2ad Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 12 Oct 2022 14:21:29 +0200 Subject: [PATCH 286/344] Fix Cosmos docs links (master -> main) --- contracts/reflect/schema/reflect.json | 4 ++-- packages/std/src/results/events.rs | 4 ++-- packages/std/src/results/response.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index 076a59f14..c6785c78c 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -1552,7 +1552,7 @@ "type": "string" }, "Event": { - "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/master/core/events.html [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/core/events.html [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", "type": "object", "required": [ "attributes", @@ -1560,7 +1560,7 @@ ], "properties": { "attributes": { - "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html", + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html", "type": "array", "items": { "$ref": "#/definitions/Attribute" diff --git a/packages/std/src/results/events.rs b/packages/std/src/results/events.rs index 3cad5ed35..5cf0e8d2a 100644 --- a/packages/std/src/results/events.rs +++ b/packages/std/src/results/events.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; /// which then get magically converted to bytes for Tendermint somewhere between /// the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK. /// -/// [*Cosmos SDK* event]: https://docs.cosmos.network/master/core/events.html +/// [*Cosmos SDK* event]: https://docs.cosmos.network/main/core/events.html /// [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[non_exhaustive] @@ -19,7 +19,7 @@ pub struct Event { /// /// You can learn more about these from [*Cosmos SDK* docs]. /// - /// [*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html + /// [*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html pub attributes: Vec, } diff --git a/packages/std/src/results/response.rs b/packages/std/src/results/response.rs index 7e29fe5bd..2fa5ed82d 100644 --- a/packages/std/src/results/response.rs +++ b/packages/std/src/results/response.rs @@ -72,14 +72,14 @@ pub struct Response { /// /// More info about events (and their attributes) can be found in [*Cosmos SDK* docs]. /// - /// [*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html + /// [*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html pub attributes: Vec, /// Extra, custom events separate from the main `wasm` one. These will have /// `wasm-` prepended to the type. /// /// More info about events can be found in [*Cosmos SDK* docs]. /// - /// [*Cosmos SDK* docs]: https://docs.cosmos.network/master/core/events.html + /// [*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html pub events: Vec, /// The binary payload to include in the response. pub data: Option, From 265ddd5db988947e491dcab403ec4594d9e755f6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 12 Oct 2022 14:29:35 +0200 Subject: [PATCH 287/344] Pin tarpaulin version to 0.20.1 --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cedeafeb9..f44cce0f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1218,13 +1218,15 @@ jobs: - checkout - run: name: Run tests with coverage + # See https://github.com/xd009642/tarpaulin/blob/develop/CHANGELOG.md and https://hub.docker.com/r/xd009642/tarpaulin/tags + # for tarpaulin versions. command: | mkdir -p reports/crypto mkdir -p reports/derive mkdir -p reports/schema mkdir -p reports/std mkdir -p reports/storage - docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin \ + docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:0.20.1 \ sh -c "cargo tarpaulin --skip-clean --out Xml --output-dir reports/crypto --packages cosmwasm-crypto && cargo tarpaulin --skip-clean --out Xml --output-dir reports/derive --packages cosmwasm-derive && cargo tarpaulin --skip-clean --out Xml --output-dir reports/schema --packages cosmwasm-schema && cargo tarpaulin --skip-clean --out Xml --output-dir reports/std --packages cosmwasm-std && cargo tarpaulin --skip-clean --out Xml --output-dir reports/storage --packages cosmwasm-storage" - codecov/upload: file: reports/crypto/cobertura.xml From 494da6f178eb062dad8cd24f17b9630837f5b718 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 12 Oct 2022 15:20:24 +0200 Subject: [PATCH 288/344] Upgrade tarpaulin to 0.21.0 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f44cce0f5..1007a49e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1226,7 +1226,7 @@ jobs: mkdir -p reports/schema mkdir -p reports/std mkdir -p reports/storage - docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:0.20.1 \ + docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:0.21.0 \ sh -c "cargo tarpaulin --skip-clean --out Xml --output-dir reports/crypto --packages cosmwasm-crypto && cargo tarpaulin --skip-clean --out Xml --output-dir reports/derive --packages cosmwasm-derive && cargo tarpaulin --skip-clean --out Xml --output-dir reports/schema --packages cosmwasm-schema && cargo tarpaulin --skip-clean --out Xml --output-dir reports/std --packages cosmwasm-std && cargo tarpaulin --skip-clean --out Xml --output-dir reports/storage --packages cosmwasm-storage" - codecov/upload: file: reports/crypto/cobertura.xml From 28cc1d103dac35ce1d97a836e431cab8f2e81fa5 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 12 Oct 2022 12:29:21 +0200 Subject: [PATCH 289/344] Exit early when gas left is insufficient --- CHANGELOG.md | 3 +++ packages/vm/src/imports.rs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ade4cbfa..96490a4ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to - cosmwasm-schema: Better error messaging when attempting to compile schema generator for `wasm32` +- cosmwasm-vm: In the `secp256k1_verify`, `secp256k1_recover_pubkey`, + `ed25519_verify` and `ed25519_batch_verify` import implementations we now exit + early if the gas left is not sufficient to perform the operation. ## [1.1.4] - 2022-10-03 diff --git a/packages/vm/src/imports.rs b/packages/vm/src/imports.rs index 73d5acad7..d99e6b7ec 100644 --- a/packages/vm/src/imports.rs +++ b/packages/vm/src/imports.rs @@ -222,9 +222,9 @@ pub fn do_secp256k1_verify( let signature = read_region(&env.memory(), signature_ptr, ECDSA_SIGNATURE_LEN)?; let pubkey = read_region(&env.memory(), pubkey_ptr, ECDSA_PUBKEY_MAX_LEN)?; - let result = secp256k1_verify(&hash, &signature, &pubkey); let gas_info = GasInfo::with_cost(env.gas_config.secp256k1_verify_cost); process_gas_info::(env, gas_info)?; + let result = secp256k1_verify(&hash, &signature, &pubkey); Ok(result.map_or_else( |err| match err { CryptoError::InvalidHashFormat { .. } @@ -252,9 +252,9 @@ pub fn do_secp256k1_recover_pubkey( Err(_) => return Ok((CryptoError::invalid_recovery_param().code() as u64) << 32), }; - let result = secp256k1_recover_pubkey(&hash, &signature, recover_param); let gas_info = GasInfo::with_cost(env.gas_config.secp256k1_recover_pubkey_cost); process_gas_info::(env, gas_info)?; + let result = secp256k1_recover_pubkey(&hash, &signature, recover_param); match result { Ok(pubkey) => { let pubkey_ptr = write_to_contract::(env, pubkey.as_ref())?; @@ -282,9 +282,9 @@ pub fn do_ed25519_verify( let signature = read_region(&env.memory(), signature_ptr, MAX_LENGTH_ED25519_SIGNATURE)?; let pubkey = read_region(&env.memory(), pubkey_ptr, EDDSA_PUBKEY_LEN)?; - let result = ed25519_verify(&message, &signature, &pubkey); let gas_info = GasInfo::with_cost(env.gas_config.ed25519_verify_cost); process_gas_info::(env, gas_info)?; + let result = ed25519_verify(&message, &signature, &pubkey); Ok(result.map_or_else( |err| match err { CryptoError::InvalidPubkeyFormat { .. } @@ -326,7 +326,6 @@ pub fn do_ed25519_batch_verify( let signatures = decode_sections(&signatures); let public_keys = decode_sections(&public_keys); - let result = ed25519_batch_verify(&messages, &signatures, &public_keys); let gas_cost = if public_keys.len() == 1 { env.gas_config.ed25519_batch_verify_one_pubkey_cost } else { @@ -334,6 +333,7 @@ pub fn do_ed25519_batch_verify( } * signatures.len() as u64; let gas_info = GasInfo::with_cost(max(gas_cost, env.gas_config.ed25519_verify_cost)); process_gas_info::(env, gas_info)?; + let result = ed25519_batch_verify(&messages, &signatures, &public_keys); Ok(result.map_or_else( |err| match err { CryptoError::BatchErr { .. } From b27469877817f86d13c958b6c6ce14efdc6612c4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 12 Oct 2022 18:29:49 +0200 Subject: [PATCH 290/344] Upgrade clippy job to Rust 1.64.0 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1007a49e6..f94bc6fc5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.59.0", "1.63.0"] + rust-version: ["1.59.0", "1.64.0"] - benchmarking: requires: - package_vm From b48a17c35f578d549dc6435e1a883ad1d80b6717 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 20:08:33 -0700 Subject: [PATCH 291/344] Remove non_exhaustive from IBC message types. IBC message types being non exhaustive means that contract authors have to include a wildcard arm in any match expression deailing with them. IMO, this is actually quite undesirable. I my contract to fail to compile if a message is added! --- CHANGELOG.md | 4 ++++ packages/std/src/ibc.rs | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96490a4ab..cf8e6abb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and this project adheres to `ed25519_verify` and `ed25519_batch_verify` import implementations we now exit early if the gas left is not sufficient to perform the operation. +### Changed + +- cosmwasm-std: Remove non_exhaustive from IBC message types + ## [1.1.4] - 2022-10-03 ### Fixed diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index 5765135a2..ed3eb5d86 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -249,7 +249,6 @@ impl IbcAcknowledgement { /// The message that is passed into `ibc_channel_open` #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] -#[non_exhaustive] pub enum IbcChannelOpenMsg { /// The ChanOpenInit step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management OpenInit { channel: IbcChannel }, @@ -315,7 +314,6 @@ pub struct Ibc3ChannelOpenResponse { /// The message that is passed into `ibc_channel_connect` #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] -#[non_exhaustive] pub enum IbcChannelConnectMsg { /// The ChanOpenAck step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management OpenAck { @@ -368,7 +366,6 @@ impl From for IbcChannel { /// The message that is passed into `ibc_channel_close` #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] -#[non_exhaustive] pub enum IbcChannelCloseMsg { /// The ChanCloseInit step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management CloseInit { channel: IbcChannel }, From 41135a8b4ab943b0ad7915ab5da0c48c7bb5af2e Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 15 Oct 2022 00:18:26 +0200 Subject: [PATCH 292/344] Elaborate on CHANGELOG entry --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf8e6abb2..58a713d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,12 @@ and this project adheres to ### Changed -- cosmwasm-std: Remove non_exhaustive from IBC message types +- cosmwasm-std: Remove `non_exhaustive` from IBC types `IbcChannelOpenMsg`, + `IbcChannelConnectMsg` and `IbcChannelCloseMsg` in order to allow exhaustive + matching over the possible scenarios without an unused fallback case + ([#1449]). + +[#1449]: https://github.com/CosmWasm/cosmwasm/pull/1449 ## [1.1.4] - 2022-10-03 From bbfc83478b3b0bc0268115c0d1d58b7b45718480 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 15 Oct 2022 14:50:40 +0200 Subject: [PATCH 293/344] Add missing tag links 1.1.2-1.1.4 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58a713d58..7e2e101a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1492,7 +1492,10 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.1...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.4...HEAD +[1.1.4]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.3...v1.1.4 +[1.1.3]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.2...v1.1.3 +[1.1.2]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.1...v1.1.2 [1.1.1]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.0.0-rc.0...v1.0.0 From 15efb049052f0774041ae518fc35faaa0c5f391c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 15 Oct 2022 15:04:37 +0200 Subject: [PATCH 294/344] Inline wrapping fucntions for Uint64/Uint128 and inprove testing --- packages/std/src/math/uint128.rs | 29 +++++++++++++++++++++++------ packages/std/src/math/uint64.rs | 30 +++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index b04f88ed7..741aca481 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -179,18 +179,22 @@ impl Uint128 { .ok_or_else(|| DivideByZeroError::new(self)) } + #[inline] pub fn wrapping_add(self, other: Self) -> Self { Self(self.0.wrapping_add(other.0)) } + #[inline] pub fn wrapping_sub(self, other: Self) -> Self { Self(self.0.wrapping_sub(other.0)) } + #[inline] pub fn wrapping_mul(self, other: Self) -> Self { Self(self.0.wrapping_mul(other.0)) } + #[inline] pub fn wrapping_pow(self, other: u32) -> Self { Self(self.0.wrapping_pow(other)) } @@ -919,15 +923,28 @@ mod tests { assert_eq!(Uint128(0).saturating_sub(Uint128(1)), Uint128(0)); assert_eq!(Uint128::MAX.saturating_mul(Uint128(2)), Uint128::MAX); assert_eq!(Uint128::MAX.saturating_pow(2), Uint128::MAX); + } - // wrapping_* - assert_eq!(Uint128::MAX.wrapping_add(Uint128(1)), Uint128(0)); - assert_eq!(Uint128(0).wrapping_sub(Uint128(1)), Uint128::MAX); + #[test] + fn uint128_wrapping_methods() { + // wrapping_add + assert_eq!(Uint128(2).wrapping_add(Uint128(2)), Uint128(4)); // non-wrapping + assert_eq!(Uint128::MAX.wrapping_add(Uint128(1)), Uint128(0)); // wrapping + + // wrapping_sub + assert_eq!(Uint128(7).wrapping_sub(Uint128(5)), Uint128(2)); // non-wrapping + assert_eq!(Uint128(0).wrapping_sub(Uint128(1)), Uint128::MAX); // wrapping + + // wrapping_mul + assert_eq!(Uint128(3).wrapping_mul(Uint128(2)), Uint128(6)); // non-wrapping assert_eq!( Uint128::MAX.wrapping_mul(Uint128(2)), - Uint128(u128::MAX - 1) - ); - assert_eq!(Uint128::MAX.wrapping_pow(2), Uint128(1)); + Uint128::MAX - Uint128::one() + ); // wrapping + + // wrapping_pow + assert_eq!(Uint128(2).wrapping_pow(3), Uint128(8)); // non-wrapping + assert_eq!(Uint128::MAX.wrapping_pow(2), Uint128(1)); // wrapping } #[test] diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index e7f65db0f..1eb8678cb 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -175,18 +175,22 @@ impl Uint64 { .ok_or_else(|| DivideByZeroError::new(self)) } + #[inline] pub fn wrapping_add(self, other: Self) -> Self { Self(self.0.wrapping_add(other.0)) } + #[inline] pub fn wrapping_sub(self, other: Self) -> Self { Self(self.0.wrapping_sub(other.0)) } + #[inline] pub fn wrapping_mul(self, other: Self) -> Self { Self(self.0.wrapping_mul(other.0)) } + #[inline] pub fn wrapping_pow(self, other: u32) -> Self { Self(self.0.wrapping_pow(other)) } @@ -835,12 +839,28 @@ mod tests { assert_eq!(Uint64(0).saturating_sub(Uint64(1)), Uint64(0)); assert_eq!(Uint64::MAX.saturating_mul(Uint64(2)), Uint64::MAX); assert_eq!(Uint64::MAX.saturating_pow(2), Uint64::MAX); + } + + #[test] + fn uint64_wrapping_methods() { + // wrapping_add + assert_eq!(Uint64(2).wrapping_add(Uint64(2)), Uint64(4)); // non-wrapping + assert_eq!(Uint64::MAX.wrapping_add(Uint64(1)), Uint64(0)); // wrapping + + // wrapping_sub + assert_eq!(Uint64(7).wrapping_sub(Uint64(5)), Uint64(2)); // non-wrapping + assert_eq!(Uint64(0).wrapping_sub(Uint64(1)), Uint64::MAX); // wrapping + + // wrapping_mul + assert_eq!(Uint64(3).wrapping_mul(Uint64(2)), Uint64(6)); // non-wrapping + assert_eq!( + Uint64::MAX.wrapping_mul(Uint64(2)), + Uint64::MAX - Uint64::one() + ); // wrapping - // wrapping_* - assert_eq!(Uint64::MAX.wrapping_add(Uint64(1)), Uint64(0)); - assert_eq!(Uint64(0).wrapping_sub(Uint64(1)), Uint64::MAX); - assert_eq!(Uint64::MAX.wrapping_mul(Uint64(2)), Uint64(u64::MAX - 1)); - assert_eq!(Uint64::MAX.wrapping_pow(2), Uint64(1)); + // wrapping_pow + assert_eq!(Uint64(2).wrapping_pow(3), Uint64(8)); // non-wrapping + assert_eq!(Uint64::MAX.wrapping_pow(2), Uint64(1)); // wrapping } #[test] From b02f2f4e0ce31843b7abb0dbb1a62e6764c7a9e2 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 15 Oct 2022 15:19:19 +0200 Subject: [PATCH 295/344] Add wrapping methods to Uint256/Uint512 --- CHANGELOG.md | 2 ++ packages/std/src/math/uint256.rs | 61 ++++++++++++++++++++++++++++++++ packages/std/src/math/uint512.rs | 61 ++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e2e101a5..69539f7cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to ### Added +- cosmwasm-std: Add `wrapping_add`, `wrapping_sub`, `wrapping_mul` and + `wrapping_pow` to `Uint256`/`Uint512`. - cosmwasm-schema: Better error messaging when attempting to compile schema generator for `wasm32` - cosmwasm-vm: In the `secp256k1_verify`, `secp256k1_recover_pubkey`, diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index b7677c011..bae551dbe 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -278,6 +278,30 @@ impl Uint256 { Ok(Self(self.0.shl(other))) } + #[inline] + pub fn wrapping_add(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_add(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_sub(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_sub(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_mul(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_mul(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_pow(self, other: u32) -> Self { + let (value, _did_overflow) = self.0.overflowing_pow(other.into()); + Self(value) + } + pub fn saturating_add(self, other: Self) -> Self { Self(self.0.saturating_add(other.0)) } @@ -1173,6 +1197,43 @@ mod tests { assert!(!Uint256::from(123u32).is_zero()); } + #[test] + fn uint256_wrapping_methods() { + // wrapping_add + assert_eq!( + Uint256::from(2u32).wrapping_add(Uint256::from(2u32)), + Uint256::from(4u32) + ); // non-wrapping + assert_eq!( + Uint256::MAX.wrapping_add(Uint256::from(1u32)), + Uint256::from(0u32) + ); // wrapping + + // wrapping_sub + assert_eq!( + Uint256::from(7u32).wrapping_sub(Uint256::from(5u32)), + Uint256::from(2u32) + ); // non-wrapping + assert_eq!( + Uint256::from(0u32).wrapping_sub(Uint256::from(1u32)), + Uint256::MAX + ); // wrapping + + // wrapping_mul + assert_eq!( + Uint256::from(3u32).wrapping_mul(Uint256::from(2u32)), + Uint256::from(6u32) + ); // non-wrapping + assert_eq!( + Uint256::MAX.wrapping_mul(Uint256::from(2u32)), + Uint256::MAX - Uint256::one() + ); // wrapping + + // wrapping_pow + assert_eq!(Uint256::from(2u32).wrapping_pow(3), Uint256::from(8u32)); // non-wrapping + assert_eq!(Uint256::MAX.wrapping_pow(2), Uint256::from(1u32)); // wrapping + } + #[test] fn uint256_json() { let orig = Uint256::from(1234567890987654321u128); diff --git a/packages/std/src/math/uint512.rs b/packages/std/src/math/uint512.rs index 75556c1d8..fe7c1c7a2 100644 --- a/packages/std/src/math/uint512.rs +++ b/packages/std/src/math/uint512.rs @@ -253,6 +253,30 @@ impl Uint512 { Ok(Self(self.0.shr(other))) } + #[inline] + pub fn wrapping_add(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_add(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_sub(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_sub(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_mul(self, other: Self) -> Self { + let (value, _did_overflow) = self.0.overflowing_mul(other.0); + Self(value) + } + + #[inline] + pub fn wrapping_pow(self, other: u32) -> Self { + let (value, _did_overflow) = self.0.overflowing_pow(other.into()); + Self(value) + } + pub fn saturating_add(self, other: Self) -> Self { Self(self.0.saturating_add(other.0)) } @@ -868,6 +892,43 @@ mod tests { assert!(!Uint512::from(123u32).is_zero()); } + #[test] + fn uint512_wrapping_methods() { + // wrapping_add + assert_eq!( + Uint512::from(2u32).wrapping_add(Uint512::from(2u32)), + Uint512::from(4u32) + ); // non-wrapping + assert_eq!( + Uint512::MAX.wrapping_add(Uint512::from(1u32)), + Uint512::from(0u32) + ); // wrapping + + // wrapping_sub + assert_eq!( + Uint512::from(7u32).wrapping_sub(Uint512::from(5u32)), + Uint512::from(2u32) + ); // non-wrapping + assert_eq!( + Uint512::from(0u32).wrapping_sub(Uint512::from(1u32)), + Uint512::MAX + ); // wrapping + + // wrapping_mul + assert_eq!( + Uint512::from(3u32).wrapping_mul(Uint512::from(2u32)), + Uint512::from(6u32) + ); // non-wrapping + assert_eq!( + Uint512::MAX.wrapping_mul(Uint512::from(2u32)), + Uint512::MAX - Uint512::one() + ); // wrapping + + // wrapping_pow + assert_eq!(Uint512::from(2u32).wrapping_pow(3), Uint512::from(8u32)); // non-wrapping + assert_eq!(Uint512::MAX.wrapping_pow(2), Uint512::from(1u32)); // wrapping + } + #[test] fn uint512_json() { let orig = Uint512::from(1234567890987654321u128); From 2801874e6bb02f9bd558b9d6e65aca83dbc12c99 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 17 Oct 2022 15:15:11 +0200 Subject: [PATCH 296/344] Set version: 1.1.5 --- CHANGELOG.md | 5 ++++- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 20 files changed, 96 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69539f7cf..804eeee6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.5] - 2022-10-17 + ### Added - cosmwasm-std: Add `wrapping_add`, `wrapping_sub`, `wrapping_mul` and @@ -1494,7 +1496,8 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.4...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.5...HEAD +[1.1.5]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.4...v1.1.5 [1.1.4]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.3...v1.1.4 [1.1.3]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.2...v1.1.3 [1.1.2]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.1...v1.1.2 diff --git a/Cargo.lock b/Cargo.lock index ff0c5a2d2..cf08d838e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.4" +version = "1.1.5" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "syn", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "chrono", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clap", "clru", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 38dcfc1bd..74d30da63 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 04af526e6..944005ffa 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 94018c753..534bfd594 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 13e590043..45c1cb24d 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index b1622509f..7d5e049e3 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 04916a9dd..36f95673f 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 63ddccfb4..4de6a3aae 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 317621da9..ab7820e12 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index e78647531..2af896587 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index ca019ffcf..6d2fa4c75 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" dependencies = [ "clru", "cosmwasm-crypto", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 2e9b337d7..c6b265fb6 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.4" +version = "1.1.5" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.4" } -cosmwasm-std = { path = "../std", version = "1.1.4" } +cosmwasm-vm = { path = "../vm", version = "1.1.5" } +cosmwasm-std = { path = "../std", version = "1.1.5" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 6c368ebb5..074fbd223 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.1.5" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 546316b8b..96dd06795 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.1.5" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index e452bb1ab..60ae818d7 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.1.5" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 9b463ec85..1b839d6fd 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.1.5" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.4", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.5", path = "../schema-derive" } schemars = "0.8.1" serde = "1.0" serde_json = "1.0" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 785671b81..6aeb426fb 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.4" +version = "1.1.5" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.4" } +cosmwasm-derive = { path = "../derive", version = "1.1.5" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.4" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 0eba772ea..da9736e87 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.1.5" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.4", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.5", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 67236d670..d9453710b 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.4" +version = "1.1.5" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.4", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.4" } +cosmwasm-std = { path = "../std", version = "1.1.5", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.1" From 5e1e527ec9a9bce6c57bf4ac94ecf891ea4454cc Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 17 Oct 2022 17:15:05 +0200 Subject: [PATCH 297/344] Upgrade rust-optimizer to 0.12.9 --- .circleci/config.yml | 2 +- README.md | 2 +- contracts/README.md | 18 +++++++++--------- packages/vm/README.md | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f94bc6fc5..706903684 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1270,7 +1270,7 @@ jobs: name: Build development contracts command: | echo "Building all contracts under ./contracts" - docker run --volumes-from with_code cosmwasm/rust-optimizer:0.12.5 ./contracts/*/ + docker run --volumes-from with_code cosmwasm/rust-optimizer:0.12.9 ./contracts/*/ - run: name: Check development contracts command: | diff --git a/README.md b/README.md index 352bc7ae9..aee4703e1 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,7 @@ but the quickstart guide is: docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 + cosmwasm/rust-optimizer:0.12.9 ``` It will output a highly size-optimized build as `contract.wasm` in `$CODE`. With diff --git a/contracts/README.md b/contracts/README.md index 666235119..30e1103c0 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -18,47 +18,47 @@ reason, use the following commands: docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_burner",target=/code/contracts/burner/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/burner + cosmwasm/rust-optimizer:0.12.9 ./contracts/burner docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_crypto_verify",target=/code/contracts/crypto-verify/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/crypto-verify + cosmwasm/rust-optimizer:0.12.9 ./contracts/crypto-verify docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_floaty",target=/code/contracts/floaty/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/floaty + cosmwasm/rust-optimizer:0.12.9 ./contracts/floaty docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_hackatom",target=/code/contracts/hackatom/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/hackatom + cosmwasm/rust-optimizer:0.12.9 ./contracts/hackatom docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_ibc_reflect",target=/code/contracts/ibc-reflect/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/ibc-reflect + cosmwasm/rust-optimizer:0.12.9 ./contracts/ibc-reflect docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_ibc_reflect_send",target=/code/contracts/ibc-reflect-send/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/ibc-reflect-send + cosmwasm/rust-optimizer:0.12.9 ./contracts/ibc-reflect-send docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_queue",target=/code/contracts/queue/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/queue + cosmwasm/rust-optimizer:0.12.9 ./contracts/queue docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_reflect",target=/code/contracts/reflect/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/reflect + cosmwasm/rust-optimizer:0.12.9 ./contracts/reflect docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_staking",target=/code/contracts/staking/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/staking + cosmwasm/rust-optimizer:0.12.9 ./contracts/staking ``` ## Entry points diff --git a/packages/vm/README.md b/packages/vm/README.md index 00e28f637..f3b0cc1bb 100644 --- a/packages/vm/README.md +++ b/packages/vm/README.md @@ -53,19 +53,19 @@ To rebuild the test contracts, go to the repo root and do docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_hackatom",target=/code/contracts/hackatom/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/hackatom \ + cosmwasm/rust-optimizer:0.12.9 ./contracts/hackatom \ && cp artifacts/hackatom.wasm packages/vm/testdata/hackatom_1.0.wasm docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_ibc_reflect",target=/code/contracts/ibc-reflect/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/ibc-reflect \ + cosmwasm/rust-optimizer:0.12.9 ./contracts/ibc-reflect \ && cp artifacts/ibc_reflect.wasm packages/vm/testdata/ibc_reflect_1.0.wasm docker run --rm -v "$(pwd)":/code \ --mount type=volume,source="devcontract_cache_floaty",target=/code/contracts/floaty/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.5 ./contracts/floaty \ + cosmwasm/rust-optimizer:0.12.9 ./contracts/floaty \ && cp artifacts/floaty.wasm packages/vm/testdata/floaty_1.0.wasm ``` From dea4ad6027345eb4192ef72924dffc5b7e07ac2a Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 18 Oct 2022 17:55:40 +0200 Subject: [PATCH 298/344] Implement Binary/HexBinary <-> CanonicalAddr converters --- CHANGELOG.md | 7 ++++ packages/std/src/addresses.rs | 73 ++++++++++++++++++++++++++++++++--- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804eeee6f..33a7fa37b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to ## [Unreleased] +### Added + +- cosmwasm-std: Add `From` implementations to convert between + `CanonicalAddr`/`Binary` as well as `CanonicalAddr`/`HexBinary` ([#1463]). + +[#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 + ## [1.1.5] - 2022-10-17 ### Added diff --git a/packages/std/src/addresses.rs b/packages/std/src/addresses.rs index f58730085..29810513c 100644 --- a/packages/std/src/addresses.rs +++ b/packages/std/src/addresses.rs @@ -4,7 +4,7 @@ use std::borrow::Cow; use std::fmt; use std::ops::Deref; -use crate::binary::Binary; +use crate::{binary::Binary, HexBinary}; /// A human readable address. /// @@ -144,18 +144,48 @@ impl From<&[u8]> for CanonicalAddr { } } +// Owned vector -> CanonicalAddr impl From> for CanonicalAddr { fn from(source: Vec) -> Self { Self(source.into()) } } +// CanonicalAddr -> Owned vector impl From for Vec { fn from(source: CanonicalAddr) -> Vec { source.0.into() } } +// Owned Binary -> CanonicalAddr +impl From for CanonicalAddr { + fn from(source: Binary) -> Self { + Self(source) + } +} + +// CanonicalAddr -> Owned Binary +impl From for Binary { + fn from(source: CanonicalAddr) -> Binary { + source.0 + } +} + +// Owned HexBinary -> CanonicalAddr +impl From for CanonicalAddr { + fn from(source: HexBinary) -> Self { + Self(source.into()) + } +} + +// CanonicalAddr -> Owned HexBinary +impl From for HexBinary { + fn from(source: CanonicalAddr) -> HexBinary { + source.0.into() + } +} + /// Just like Vec, CanonicalAddr is a smart pointer to [u8]. /// This implements `*canonical_address` for us and allows us to /// do `&*canonical_address`, returning a `&[u8]` from a `&CanonicalAddr`. @@ -278,8 +308,9 @@ mod tests { } #[test] - fn canonical_addr_from_vec_works() { + fn canonical_addr_implements_from_and_to_vector() { // Into for Vec + // This test is a bit pointless because we get Into from the From implementation let original = vec![0u8, 187, 61, 11, 250, 0]; let original_ptr = original.as_ptr(); let addr: CanonicalAddr = original.into(); @@ -292,11 +323,9 @@ mod tests { let addr = CanonicalAddr::from(original); assert_eq!(addr.as_slice(), [0u8, 187, 61, 11, 250, 0]); assert_eq!((addr.0).0.as_ptr(), original_ptr, "must not be copied"); - } - #[test] - fn canonical_addr_into_vec_works() { // Into> for CanonicalAddr + // This test is a bit pointless because we get Into from the From implementation let original = CanonicalAddr::from(vec![0u8, 187, 61, 11, 250, 0]); let original_ptr = (original.0).0.as_ptr(); let vec: Vec = original.into(); @@ -311,6 +340,40 @@ mod tests { assert_eq!(vec.as_ptr(), original_ptr, "must not be copied"); } + #[test] + fn canonical_addr_implements_from_and_to_binary() { + // From for CanonicalAddr + let original = Binary::from([0u8, 187, 61, 11, 250, 0]); + let original_ptr = original.as_ptr(); + let addr = CanonicalAddr::from(original); + assert_eq!(addr.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!((addr.0).0.as_ptr(), original_ptr, "must not be copied"); + + // From for Binary + let original = CanonicalAddr::from(vec![7u8, 35, 49, 101, 0, 255]); + let original_ptr = (original.0).0.as_ptr(); + let bin = Binary::from(original); + assert_eq!(bin.as_slice(), [7u8, 35, 49, 101, 0, 255]); + assert_eq!(bin.as_ptr(), original_ptr, "must not be copied"); + } + + #[test] + fn canonical_addr_implements_from_and_to_hex_binary() { + // From for CanonicalAddr + let original = HexBinary::from([0u8, 187, 61, 11, 250, 0]); + let original_ptr = original.as_ptr(); + let addr = CanonicalAddr::from(original); + assert_eq!(addr.as_slice(), [0u8, 187, 61, 11, 250, 0]); + assert_eq!((addr.0).0.as_ptr(), original_ptr, "must not be copied"); + + // From for HexBinary + let original = CanonicalAddr::from(vec![7u8, 35, 49, 101, 0, 255]); + let original_ptr = (original.0).0.as_ptr(); + let bin = HexBinary::from(original); + assert_eq!(bin.as_slice(), [7u8, 35, 49, 101, 0, 255]); + assert_eq!(bin.as_ptr(), original_ptr, "must not be copied"); + } + #[test] fn canonical_addr_len() { let bytes: &[u8] = &[0u8, 187, 61, 11, 250, 0]; From 044c0b65ced8ab17a53b1a72f1ba3da49d5f1d21 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 18 Oct 2022 18:00:58 +0200 Subject: [PATCH 299/344] Add array to CanonicalAddr converters --- CHANGELOG.md | 2 ++ packages/std/src/addresses.rs | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33a7fa37b..e568a3e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to - cosmwasm-std: Add `From` implementations to convert between `CanonicalAddr`/`Binary` as well as `CanonicalAddr`/`HexBinary` ([#1463]). +- cosmwasm-std: Add `From` implementations to convert `u8` arrays to + `CanonicalAddr` ([#1463]). [#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 diff --git a/packages/std/src/addresses.rs b/packages/std/src/addresses.rs index 29810513c..b218074a3 100644 --- a/packages/std/src/addresses.rs +++ b/packages/std/src/addresses.rs @@ -144,6 +144,20 @@ impl From<&[u8]> for CanonicalAddr { } } +// Array reference +impl From<&[u8; LENGTH]> for CanonicalAddr { + fn from(source: &[u8; LENGTH]) -> Self { + Self(source.into()) + } +} + +// Owned array +impl From<[u8; LENGTH]> for CanonicalAddr { + fn from(source: [u8; LENGTH]) -> Self { + Self(source.into()) + } +} + // Owned vector -> CanonicalAddr impl From> for CanonicalAddr { fn from(source: Vec) -> Self { @@ -307,6 +321,17 @@ mod tests { assert_eq!(canonical_addr_vec.as_slice(), &[0u8, 187, 61, 11, 250, 0]); } + #[test] + fn canonical_addr_implements_from_array() { + let array = [1, 2, 3]; + let addr = CanonicalAddr::from(array); + assert_eq!(addr.as_slice(), [1, 2, 3]); + + let array_ref = b"foo"; + let addr = CanonicalAddr::from(array_ref); + assert_eq!(addr.as_slice(), [0x66, 0x6f, 0x6f]); + } + #[test] fn canonical_addr_implements_from_and_to_vector() { // Into for Vec From 013fda5fbcc2e4463aa032fe701ded71d418d8e6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 18 Oct 2022 16:12:16 +0200 Subject: [PATCH 300/344] Implement PartialEq between CanonicalAddr and HexBinary/Binary --- CHANGELOG.md | 2 ++ packages/std/src/addresses.rs | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e568a3e23..5ad7e956b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to `CanonicalAddr`/`Binary` as well as `CanonicalAddr`/`HexBinary` ([#1463]). - cosmwasm-std: Add `From` implementations to convert `u8` arrays to `CanonicalAddr` ([#1463]). +- cosmwasm-std: Implement `PartialEq` between `CanonicalAddr` and + `HexBinary`/`Binary` ([#1463]). [#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 diff --git a/packages/std/src/addresses.rs b/packages/std/src/addresses.rs index b218074a3..54ca2e171 100644 --- a/packages/std/src/addresses.rs +++ b/packages/std/src/addresses.rs @@ -138,6 +138,34 @@ impl<'a> From<&'a Addr> for Cow<'a, Addr> { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash, JsonSchema)] pub struct CanonicalAddr(pub Binary); +/// Implement `CanonicalAddr == Binary` +impl PartialEq for CanonicalAddr { + fn eq(&self, rhs: &Binary) -> bool { + &self.0 == rhs + } +} + +/// Implement `Binary == CanonicalAddr` +impl PartialEq for Binary { + fn eq(&self, rhs: &CanonicalAddr) -> bool { + self == &rhs.0 + } +} + +/// Implement `CanonicalAddr == HexBinary` +impl PartialEq for CanonicalAddr { + fn eq(&self, rhs: &HexBinary) -> bool { + self.as_slice() == rhs.as_slice() + } +} + +/// Implement `HexBinary == CanonicalAddr` +impl PartialEq for HexBinary { + fn eq(&self, rhs: &CanonicalAddr) -> bool { + self.as_slice() == rhs.0.as_slice() + } +} + impl From<&[u8]> for CanonicalAddr { fn from(source: &[u8]) -> Self { Self(source.into()) @@ -321,6 +349,30 @@ mod tests { assert_eq!(canonical_addr_vec.as_slice(), &[0u8, 187, 61, 11, 250, 0]); } + #[test] + fn canonical_addr_implements_partial_eq_with_binary() { + let addr = CanonicalAddr::from([1, 2, 3]); + let bin1 = Binary::from([1, 2, 3]); + let bin2 = Binary::from([42, 43]); + + assert_eq!(addr, bin1); + assert_eq!(bin1, addr); + assert_ne!(addr, bin2); + assert_ne!(bin2, addr); + } + + #[test] + fn canonical_addr_implements_partial_eq_with_hex_binary() { + let addr = CanonicalAddr::from([1, 2, 3]); + let bin1 = HexBinary::from([1, 2, 3]); + let bin2 = HexBinary::from([42, 43]); + + assert_eq!(addr, bin1); + assert_eq!(bin1, addr); + assert_ne!(addr, bin2); + assert_ne!(bin2, addr); + } + #[test] fn canonical_addr_implements_from_array() { let array = [1, 2, 3]; From e6033ae324f0ca1e56d016d1d858dce2fa82cdee Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 18 Oct 2022 17:01:35 +0200 Subject: [PATCH 301/344] Avoid the usage of CanonicalAddr.0 --- packages/std/src/addresses.rs | 12 ++++++------ packages/std/src/imports.rs | 3 +-- packages/std/src/testing/mock.rs | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/std/src/addresses.rs b/packages/std/src/addresses.rs index 54ca2e171..0cdffe45a 100644 --- a/packages/std/src/addresses.rs +++ b/packages/std/src/addresses.rs @@ -499,17 +499,17 @@ mod tests { #[test] fn canonical_addr_implements_hash() { - let alice1 = CanonicalAddr(Binary::from([0, 187, 61, 11, 250, 0])); + let alice1 = CanonicalAddr::from([0, 187, 61, 11, 250, 0]); let mut hasher = DefaultHasher::new(); alice1.hash(&mut hasher); let alice1_hash = hasher.finish(); - let alice2 = CanonicalAddr(Binary::from([0, 187, 61, 11, 250, 0])); + let alice2 = CanonicalAddr::from([0, 187, 61, 11, 250, 0]); let mut hasher = DefaultHasher::new(); alice2.hash(&mut hasher); let alice2_hash = hasher.finish(); - let bob = CanonicalAddr(Binary::from([16, 21, 33, 0, 255, 9])); + let bob = CanonicalAddr::from([16, 21, 33, 0, 255, 9]); let mut hasher = DefaultHasher::new(); bob.hash(&mut hasher); let bob_hash = hasher.finish(); @@ -521,9 +521,9 @@ mod tests { /// This requires Hash and Eq to be implemented #[test] fn canonical_addr_can_be_used_in_hash_set() { - let alice1 = CanonicalAddr(Binary::from([0, 187, 61, 11, 250, 0])); - let alice2 = CanonicalAddr(Binary::from([0, 187, 61, 11, 250, 0])); - let bob = CanonicalAddr(Binary::from([16, 21, 33, 0, 255, 9])); + let alice1 = CanonicalAddr::from([0, 187, 61, 11, 250, 0]); + let alice2 = CanonicalAddr::from([0, 187, 61, 11, 250, 0]); + let bob = CanonicalAddr::from([16, 21, 33, 0, 255, 9]); let mut set = HashSet::new(); set.insert(alice1.clone()); diff --git a/packages/std/src/imports.rs b/packages/std/src/imports.rs index df03d1d64..f7438a9df 100644 --- a/packages/std/src/imports.rs +++ b/packages/std/src/imports.rs @@ -1,7 +1,6 @@ use std::vec::Vec; use crate::addresses::{Addr, CanonicalAddr}; -use crate::binary::Binary; use crate::errors::{RecoverPubkeyError, StdError, StdResult, SystemError, VerificationError}; use crate::import_helpers::{from_high_half, from_low_half}; use crate::memory::{alloc, build_region, consume_region, Region}; @@ -224,7 +223,7 @@ impl Api for ExternalApi { } let out = unsafe { consume_region(canon) }; - Ok(CanonicalAddr(Binary(out))) + Ok(CanonicalAddr::from(out)) } fn addr_humanize(&self, canonical: &CanonicalAddr) -> StdResult { diff --git a/packages/std/src/testing/mock.rs b/packages/std/src/testing/mock.rs index 0f74c3e3c..f9681d1cc 100644 --- a/packages/std/src/testing/mock.rs +++ b/packages/std/src/testing/mock.rs @@ -902,7 +902,7 @@ mod tests { #[should_panic(expected = "length not correct")] fn addr_humanize_input_length() { let api = MockApi::default(); - let input = CanonicalAddr(Binary(vec![61; 11])); + let input = CanonicalAddr::from(vec![61; 11]); api.addr_humanize(&input).unwrap(); } From 9f6fa34f1447e81823b2bc9009730c6bf98affb6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 18 Oct 2022 22:30:52 +0200 Subject: [PATCH 302/344] Improve documentation of CanonicalAddr --- packages/std/src/addresses.rs | 15 +++++++++++++++ packages/std/src/traits.rs | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/std/src/addresses.rs b/packages/std/src/addresses.rs index 0cdffe45a..ef03d5ab6 100644 --- a/packages/std/src/addresses.rs +++ b/packages/std/src/addresses.rs @@ -135,6 +135,21 @@ impl<'a> From<&'a Addr> for Cow<'a, Addr> { } } +/// A blockchain address in its binary form. +/// +/// The specific implementation is up to the underlying chain and CosmWasm as well as +/// contracts should not make assumptions on that data. In Ethereum for example, an +/// `Addr` would contain a user visible address like 0x14d3cc818735723ab86eaf9502376e847a64ddad +/// and the corresponding `CanonicalAddr` would store the 20 bytes 0x14, 0xD3, ..., 0xAD. +/// In Cosmos, the bech32 format is used for `Addr`s and the `CanonicalAddr` holds the +/// encoded bech32 data without the checksum. Typical sizes are 20 bytes for externally +/// owned addresses and 32 bytes for module addresses (such as x/wasm contract addresses). +/// That being said, a chain might decide to use any size other than 20 or 32 bytes. +/// +/// The safe way to obtain a valid `CanonicalAddr` is using `Api::addr_canonicalize`. In +/// addition to that there are many unsafe ways to convert any binary data into an instance. +/// So the type shoud be treated as a marker to express the intended data type, not as +/// a validity guarantee of any sort. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash, JsonSchema)] pub struct CanonicalAddr(pub Binary); diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 59436a8df..7004f568b 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -95,7 +95,11 @@ pub trait Api { fn addr_validate(&self, human: &str) -> StdResult; /// Takes a human readable address and returns a canonical binary representation of it. - /// This can be used when a compact fixed length representation is needed. + /// This can be used when a compact representation is needed. + /// + /// Please note that the length of the resulting address is defined by the chain and + /// can vary from address to address. On Cosmos chains 20 and 32 bytes are typically used. + /// But that might change. So your contract should not make assumptions on the size. fn addr_canonicalize(&self, human: &str) -> StdResult; /// Takes a canonical address and returns a human readble address. From 0948715950151579aaba487944b630332d83e215 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 19 Oct 2022 00:07:40 +0200 Subject: [PATCH 303/344] Increase dependency requirements to make -Zminimal-versions pass --- Cargo.lock | 3 +++ contracts/burner/Cargo.lock | 3 +++ contracts/burner/Cargo.toml | 2 +- contracts/crypto-verify/Cargo.lock | 3 +++ contracts/crypto-verify/Cargo.toml | 2 +- contracts/cyberpunk/Cargo.lock | 3 +++ contracts/floaty/Cargo.lock | 3 +++ contracts/floaty/Cargo.toml | 2 +- contracts/hackatom/Cargo.lock | 3 +++ contracts/hackatom/Cargo.toml | 2 +- contracts/ibc-reflect-send/Cargo.lock | 3 +++ contracts/ibc-reflect-send/Cargo.toml | 2 +- contracts/ibc-reflect/Cargo.lock | 3 +++ contracts/ibc-reflect/Cargo.toml | 2 +- contracts/queue/Cargo.lock | 3 +++ contracts/queue/Cargo.toml | 2 +- contracts/reflect/Cargo.lock | 3 +++ contracts/reflect/Cargo.toml | 2 +- contracts/staking/Cargo.lock | 3 +++ contracts/staking/Cargo.toml | 4 ++-- devtools/build_min.sh | 14 ++++++++++++++ packages/check/Cargo.toml | 2 +- packages/crypto/Cargo.toml | 6 +++--- packages/schema/Cargo.toml | 8 ++++---- packages/std/Cargo.toml | 10 ++++++++-- packages/vm/Cargo.toml | 6 +++--- 26 files changed, 76 insertions(+), 23 deletions(-) create mode 100755 devtools/build_min.sh diff --git a/Cargo.lock b/Cargo.lock index cf08d838e..ed834d242 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,11 +325,14 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "chrono", "cosmwasm-crypto", "cosmwasm-derive", "cosmwasm-schema", "derivative", + "enumset", "forward_ref", "hex", "hex-literal", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 74d30da63..cb0e9c802 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -215,9 +215,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/burner/Cargo.toml b/contracts/burner/Cargo.toml index 3aae397b0..c225cf0f5 100644 --- a/contracts/burner/Cargo.toml +++ b/contracts/burner/Cargo.toml @@ -34,7 +34,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 944005ffa..bf5ae47ed 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -210,9 +210,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/crypto-verify/Cargo.toml b/contracts/crypto-verify/Cargo.toml index b8ce956c9..445c6b2db 100644 --- a/contracts/crypto-verify/Cargo.toml +++ b/contracts/crypto-verify/Cargo.toml @@ -38,7 +38,7 @@ cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } hex = "0.4" rlp = "0.5" -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } sha2 = "0.10" sha3 = "0.10" diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 534bfd594..c43c066bc 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -233,9 +233,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 45c1cb24d..b89f82ca2 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/floaty/Cargo.toml b/contracts/floaty/Cargo.toml index 67399bdde..dfef47a17 100644 --- a/contracts/floaty/Cargo.toml +++ b/contracts/floaty/Cargo.toml @@ -33,7 +33,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std" } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = "1.0" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 7d5e049e3..d006bb18c 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/hackatom/Cargo.toml b/contracts/hackatom/Cargo.toml index d600b9023..1a91f1100 100644 --- a/contracts/hackatom/Cargo.toml +++ b/contracts/hackatom/Cargo.toml @@ -33,7 +33,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } sha2 = "0.10" thiserror = "1.0" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 36f95673f..8854e32ee 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/ibc-reflect-send/Cargo.toml b/contracts/ibc-reflect-send/Cargo.toml index 1eebbe9bf..ad4d2a17d 100644 --- a/contracts/ibc-reflect-send/Cargo.toml +++ b/contracts/ibc-reflect-send/Cargo.toml @@ -35,7 +35,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator", "staking", "stargate"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 4de6a3aae..e8a671129 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/ibc-reflect/Cargo.toml b/contracts/ibc-reflect/Cargo.toml index 99775b8f5..cb71659a8 100644 --- a/contracts/ibc-reflect/Cargo.toml +++ b/contracts/ibc-reflect/Cargo.toml @@ -35,7 +35,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator", "ibc3"] } cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index ab7820e12..59072bf4f 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/queue/Cargo.toml b/contracts/queue/Cargo.toml index 84a5d4d79..9482d51f7 100644 --- a/contracts/queue/Cargo.toml +++ b/contracts/queue/Cargo.toml @@ -36,7 +36,7 @@ library = [] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", features = ["iterator"] } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 2af896587..1277291e5 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/reflect/Cargo.toml b/contracts/reflect/Cargo.toml index 6ec3c92e4..56b5466b1 100644 --- a/contracts/reflect/Cargo.toml +++ b/contracts/reflect/Cargo.toml @@ -36,7 +36,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate", "cosmwasm_1_1"] } cosmwasm-storage = { path = "../../packages/storage", default-features = false } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "=1.0.103", default-features = false, features = ["derive"] } thiserror = "1.0" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 6d2fa4c75..3fa735588 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -204,9 +204,12 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", + "bitflags", + "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", + "enumset", "forward_ref", "hex", "schemars", diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index 93380313f..839f8919a 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -35,9 +35,9 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking"] } cosmwasm-storage = { path = "../../packages/storage", default-features = false } -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive"] } -snafu = "0.6" +snafu = "0.6.6" [dev-dependencies] cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["staking"] } diff --git a/devtools/build_min.sh b/devtools/build_min.sh new file mode 100755 index 000000000..880cd9129 --- /dev/null +++ b/devtools/build_min.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +rm Cargo.lock +cargo +nightly build -Zminimal-versions + +for contract_dir in contracts/*/; do + ( + cd "$contract_dir" + rm Cargo.lock + cargo +nightly build -Zminimal-versions + ) +done diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index c6b265fb6..692a7881a 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/check" license = "Apache-2.0" [dependencies] -anyhow = "1" +anyhow = "1.0.57" clap = "2" colored = "2" cosmwasm-vm = { path = "../vm", version = "1.1.5" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 074fbd223..106e9fc2d 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -19,16 +19,16 @@ backtraces = [] bench = false [dependencies] -k256 = { version = "0.11", features = ["ecdsa"] } +k256 = { version = "0.11.1", features = ["ecdsa"] } ed25519-zebra = "3" digest = "0.10" rand_core = { version = "0.6", features = ["getrandom"] } -thiserror = "1.0" +thiserror = "1.0.13" [dev-dependencies] criterion = "0.3" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } -serde_json = "1.0" +serde_json = "1.0.40" sha2 = "0.10" base64 = "0.13.0" hex = "0.4" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 1b839d6fd..cc859addf 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -9,12 +9,12 @@ license = "Apache-2.0" [dependencies] cosmwasm-schema-derive = { version = "=1.1.5", path = "../schema-derive" } -schemars = "0.8.1" +schemars = "0.8.3" serde = "1.0" -serde_json = "1.0" -thiserror = "1" +serde_json = "1.0.40" +thiserror = "1.0.13" [dev-dependencies] -anyhow = "1" +anyhow = "1.0.57" semver = "1" tempfile = "3" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 6aeb426fb..9df765a07 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -43,12 +43,18 @@ cosmwasm-derive = { path = "../derive", version = "1.1.5" } derivative = "2" forward_ref = "1" hex = "0.4" -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } serde-json-wasm = { version = "0.4.1" } -thiserror = "1.0" +thiserror = "1.0.13" uint = "0.9.3" +# Dependencies that we do not use ourself. We add those entries +# to bump the min version of them. +bytecheck = "0.6.3" # With this version the simdutf8 dependency became optional +enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62) +bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 + [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index d9453710b..f098535b8 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -45,11 +45,11 @@ cosmwasm-std = { path = "../std", version = "1.1.5", default-features = false } cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } hex = "0.4" parity-wasm = "0.42" -schemars = "0.8.1" +schemars = "0.8.3" serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } -serde_json = "1.0" +serde_json = "1.0.40" sha2 = "0.10.3" -thiserror = "1.0" +thiserror = "1.0.13" wasmer = { version = "=2.3.0", default-features = false, features = ["cranelift", "universal", "singlepass"] } wasmer-middlewares = "=2.3.0" loupe = "0.1.3" From 2ffe1dde6ed1c3558014971aada695d15380ee76 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 19 Oct 2022 08:15:14 +0200 Subject: [PATCH 304/344] Move dependency block from std to vm --- Cargo.lock | 6 +++--- contracts/burner/Cargo.lock | 6 +++--- contracts/crypto-verify/Cargo.lock | 6 +++--- contracts/cyberpunk/Cargo.lock | 6 +++--- contracts/floaty/Cargo.lock | 6 +++--- contracts/hackatom/Cargo.lock | 6 +++--- contracts/ibc-reflect-send/Cargo.lock | 6 +++--- contracts/ibc-reflect/Cargo.lock | 6 +++--- contracts/queue/Cargo.lock | 6 +++--- contracts/reflect/Cargo.lock | 6 +++--- contracts/staking/Cargo.lock | 6 +++--- packages/std/Cargo.toml | 6 ------ packages/vm/Cargo.toml | 6 ++++++ 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed834d242..d9dd32028 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,14 +325,11 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "chrono", "cosmwasm-crypto", "cosmwasm-derive", "cosmwasm-schema", "derivative", - "enumset", "forward_ref", "hex", "hex-literal", @@ -355,11 +352,14 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clap", "clru", "cosmwasm-crypto", "cosmwasm-std", "criterion", + "enumset", "hex", "hex-literal", "leb128", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index cb0e9c802..affe23f6a 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -215,12 +215,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -234,9 +231,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index bf5ae47ed..a045b082b 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -210,12 +210,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -237,9 +234,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index c43c066bc..e8a751704 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -233,12 +233,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -260,9 +257,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index b89f82ca2..e13bdb284 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index d006bb18c..68437cf41 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 8854e32ee..bdcb966e9 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index e8a671129..ed9512973 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 59072bf4f..cf7fa0c42 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -223,9 +220,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 1277291e5..37ba82fbb 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 3fa735588..d8ec30573 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -204,12 +204,9 @@ name = "cosmwasm-std" version = "1.1.5" dependencies = [ "base64", - "bitflags", - "bytecheck", "cosmwasm-crypto", "cosmwasm-derive", "derivative", - "enumset", "forward_ref", "hex", "schemars", @@ -231,9 +228,12 @@ dependencies = [ name = "cosmwasm-vm" version = "1.1.5" dependencies = [ + "bitflags", + "bytecheck", "clru", "cosmwasm-crypto", "cosmwasm-std", + "enumset", "hex", "loupe", "parity-wasm", diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 9df765a07..acc8faa5e 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -49,12 +49,6 @@ serde-json-wasm = { version = "0.4.1" } thiserror = "1.0.13" uint = "0.9.3" -# Dependencies that we do not use ourself. We add those entries -# to bump the min version of them. -bytecheck = "0.6.3" # With this version the simdutf8 dependency became optional -enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62) -bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index f098535b8..da7857ee7 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -54,6 +54,12 @@ wasmer = { version = "=2.3.0", default-features = false, features = ["cranelift" wasmer-middlewares = "=2.3.0" loupe = "0.1.3" +# Dependencies that we do not use ourself. We add those entries +# to bump the min version of them. +bytecheck = "0.6.3" # With this version the simdutf8 dependency became optional +enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62) +bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 + # Wasmer git/local (used for quick local debugging or patching) # wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", default-features = false, features = ["cranelift", "universal", "singlepass"] } # wasmer-middlewares = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c" } From 9c7b0b17215b90be8fa1068edef46eea2008ca64 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 19 Oct 2022 08:17:23 +0200 Subject: [PATCH 305/344] Add CHANGELOG entry --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad7e956b..8d474e466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ and this project adheres to [#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 +### Changed + +- all: Bump a few dependency versions to make the codebase compile with + `-Zminimal-versions` ([#1465]). + +[#1465]: https://github.com/CosmWasm/cosmwasm/pull/1465 + ## [1.1.5] - 2022-10-17 ### Added From 10978b017be862b52a327c397df8e47647ea631f Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 19 Oct 2022 18:14:56 +0200 Subject: [PATCH 306/344] Update storage-plus links in README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aee4703e1..071f804cd 100644 --- a/README.md +++ b/README.md @@ -53,12 +53,14 @@ This code is compiled into Wasm bytecode as part of the smart contract. build a smart contract. - [cosmwasm-storage](https://github.com/CosmWasm/cosmwasm/tree/main/packages/storage) - A crate in this workspace. This optional addition to `cosmwasm-std` includes - convenience helpers for interacting with storage. -- [cw-storage-plus](https://github.com/CosmWasm/cosmwasm-plus/tree/main/packages/storage-plus) - - A crate in `cosmwasm-plus`, which fills the same role as `cosmwasm-storage`, - but with much more powerful types supporting composite primary keys, secondary - indexes, automatic snapshotting, and more. This is newer and a bit less stable - than `cosmwasm-storage` but used in most modern contracts. + convenience helpers for interacting with storage. **This is being deprecated + in favor of + [`cw-storage-plus`](https://github.com/CosmWasm/cw-storage-plus).** +- [cw-storage-plus](https://github.com/CosmWasm/cw-storage-plus) - A crate which + fills the same role as `cosmwasm-storage`, but with much more powerful types + supporting composite primary keys, secondary indexes, automatic snapshotting, + and more. This is used in most modern contracts and likely going to be + stabilized (version `1.0.0`) soon. **Building contracts:** From 2994eb2cec7b6a82c343f274fa2646e8ba102539 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 24 Oct 2022 15:37:22 +0200 Subject: [PATCH 307/344] Remove packages/profiler --- .circleci/config.yml | 32 - .mergify.yml | 1 - CHANGELOG.md | 2 + Cargo.lock | 83 +- codecov.yml | 1 - devtools/check_workspace.sh | 1 - devtools/deadlinks.py | 1 - packages/profiler/Cargo.toml | 28 - packages/profiler/src/code_blocks.rs | 162 ---- packages/profiler/src/instrumentation.rs | 423 -------- packages/profiler/src/main.rs | 96 -- packages/profiler/src/measure.rs | 140 --- packages/profiler/src/operators.rs | 1111 ---------------------- packages/profiler/src/profiling.rs | 56 -- packages/profiler/src/utils.rs | 31 - packages/profiler/testdata/hackatom.wasm | Bin 171952 -> 0 bytes 16 files changed, 3 insertions(+), 2165 deletions(-) delete mode 100644 packages/profiler/Cargo.toml delete mode 100644 packages/profiler/src/code_blocks.rs delete mode 100644 packages/profiler/src/instrumentation.rs delete mode 100644 packages/profiler/src/main.rs delete mode 100644 packages/profiler/src/measure.rs delete mode 100644 packages/profiler/src/operators.rs delete mode 100644 packages/profiler/src/profiling.rs delete mode 100644 packages/profiler/src/utils.rs delete mode 100644 packages/profiler/testdata/hackatom.wasm diff --git a/.circleci/config.yml b/.circleci/config.yml index 706903684..86559e71b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,6 @@ workflows: - package_std - package_storage - package_vm - - package_profiler - contract_burner - contract_crypto_verify - contract_cyberpunk @@ -377,33 +376,6 @@ jobs: - target/debug/deps key: cargocache-v2-package_vm-rust:1.59.0-{{ checksum "Cargo.lock" }} - package_profiler: - docker: - - image: rust:1.59.0 - steps: - - checkout - - run: - name: Version information - command: rustc --version; cargo --version; rustup --version; rustup target list --installed - - restore_cache: - keys: - - cargocache-v2-package_profiler-rust:1.59.0-{{ checksum "Cargo.lock" }} - - run: - name: Build - working_directory: ~/project/packages/profiler - command: cargo build --locked - - run: - name: Run tests - working_directory: ~/project/packages/profiler - command: cargo test --locked - - save_cache: - paths: - - /usr/local/cargo/registry - - target/debug/.fingerprint - - target/debug/build - - target/debug/deps - key: cargocache-v2-package_profiler-rust:1.59.0-{{ checksum "Cargo.lock" }} - contract_burner: docker: - image: rust:1.59.0 @@ -1037,10 +1009,6 @@ jobs: name: Clippy linting on derive working_directory: ~/project/packages/derive command: cargo clippy --all-targets -- -D warnings - - run: - name: Clippy linting on profiler - working_directory: ~/project/packages/profiler - command: cargo clippy --all-targets -- -D warnings - run: name: Clippy linting on schema working_directory: ~/project/packages/schema diff --git a/.mergify.yml b/.mergify.yml index f48f4adbc..5be421839 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -9,7 +9,6 @@ pull_request_rules: - label!=WIP # We need to list them all individually. Here is why: https://doc.mergify.io/conditions.html#validating-all-status-check - "status-success=ci/circleci: package_crypto" - - "status-success=ci/circleci: package_profiler" - "status-success=ci/circleci: package_schema" - "status-success=ci/circleci: package_std" - "status-success=ci/circleci: package_storage" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d474e466..475dc4eaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ and this project adheres to - all: Bump a few dependency versions to make the codebase compile with `-Zminimal-versions` ([#1465]). +- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we + cannot properly measure different runtimes for differet Wasm opcodes. [#1465]: https://github.com/CosmWasm/cosmwasm/pull/1465 diff --git a/Cargo.lock b/Cargo.lock index d9dd32028..08d78e81a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -282,21 +282,6 @@ dependencies = [ "syn", ] -[[package]] -name = "cosmwasm-profiler" -version = "0.0.0" -dependencies = [ - "cosmwasm-std", - "cosmwasm-vm", - "csv", - "hackatom", - "loupe", - "walrus", - "wasmer", - "wasmer-types", - "wasmer-vm", -] - [[package]] name = "cosmwasm-schema" version = "1.1.5" @@ -896,18 +881,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "hackatom" -version = "0.0.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "schemars", - "serde", - "sha2 0.10.3", - "thiserror", -] - [[package]] name = "half" version = "1.8.2" @@ -932,15 +905,6 @@ dependencies = [ "ahash", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "hermit-abi" version = "0.1.19" @@ -971,12 +935,6 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - [[package]] name = "ident_case" version = "1.0.1" @@ -1861,12 +1819,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicode-segmentation" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" - [[package]] name = "unicode-width" version = "0.1.9" @@ -1902,32 +1854,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "walrus" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb08e48cde54c05f363d984bb54ce374f49e242def9468d2e1b6c2372d291f8" -dependencies = [ - "anyhow", - "id-arena", - "leb128", - "log", - "walrus-macro", - "wasmparser 0.77.0", -] - -[[package]] -name = "walrus-macro" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e5bd22c71e77d60140b0bd5be56155a37e5bd14e24f5f87298040d0cc40d7" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -2018,7 +1944,6 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "wat", "winapi", ] @@ -2050,7 +1975,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-types", - "wasmparser 0.83.0", + "wasmparser", ] [[package]] @@ -2257,12 +2182,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wasmparser" -version = "0.77.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35c86d22e720a07d954ebbed772d01180501afe7d03d464f413bb5f8914a8d6" - [[package]] name = "wasmparser" version = "0.83.0" diff --git a/codecov.yml b/codecov.yml index f04225aed..b1de3c37b 100644 --- a/codecov.yml +++ b/codecov.yml @@ -11,7 +11,6 @@ coverage: ignore: - "contracts" - - "packages/profiler" # Disabled due to "cargo_tarpaulin: Failed to get test coverage! Error: Failed to run tests: Error running test - SIGILL raised in 5835" - "packages/vm" diff --git a/devtools/check_workspace.sh b/devtools/check_workspace.sh index 7e9c04d06..9609054c4 100755 --- a/devtools/check_workspace.sh +++ b/devtools/check_workspace.sh @@ -5,7 +5,6 @@ command -v shellcheck >/dev/null && shellcheck "$0" cargo fmt (cd packages/crypto && cargo check && cargo clippy --all-targets -- -D warnings) (cd packages/derive && cargo check && cargo clippy --all-targets -- -D warnings) -(cd packages/profiler && cargo check && cargo clippy --all-targets -- -D warnings) ( cd packages/std cargo check diff --git a/devtools/deadlinks.py b/devtools/deadlinks.py index 0d7a8bc69..79d3cc81f 100755 --- a/devtools/deadlinks.py +++ b/devtools/deadlinks.py @@ -70,7 +70,6 @@ def check_project(project): projects = [ "cosmwasm_crypto", "cosmwasm_derive", - "cosmwasm_profiler", "cosmwasm_schema", "cosmwasm_std", "cosmwasm_storage", diff --git a/packages/profiler/Cargo.toml b/packages/profiler/Cargo.toml deleted file mode 100644 index 4c611faaf..000000000 --- a/packages/profiler/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "cosmwasm-profiler" -version = "0.0.0" -authors = ["Tomasz Kurcz "] -edition = "2021" -description = "A profiling utility for compiled Cosmwasm smart contracts" -repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/profiler" -license = "Apache-2.0" -readme = "README.md" -publish = false - -[dependencies] -cosmwasm-vm = { path = "../vm" } -cosmwasm-std = { path = "../std" } -loupe = "0.1.3" -walrus = "0.19.0" -wasmer = { version = "=2.3.0", default-features = false, features = ["compiler"] } -wasmer-types = "=2.3.0" -wasmer-vm = "=2.3.0" -# wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", default-features = false, features = ["compiler"] } -# wasmer-types = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c" } -# wasmer-vm = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c" } -hackatom = { path = "../../contracts/hackatom", default-features = false } -csv = "1.1.6" - -[dev-dependencies] -wasmer = { version = "=2.3.0", features = ["compiler"] } -# wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", features = ["compiler"] } diff --git a/packages/profiler/src/code_blocks.rs b/packages/profiler/src/code_blocks.rs deleted file mode 100644 index 937c14d65..000000000 --- a/packages/profiler/src/code_blocks.rs +++ /dev/null @@ -1,162 +0,0 @@ -use std::collections::HashMap; -use std::hash::Hash; - -use loupe::MemoryUsage; - -use crate::operators::OperatorSymbol; - -#[derive(Debug, Hash, PartialEq, Eq, MemoryUsage, Copy, Clone)] -pub struct BlockId(pub u64); - -impl BlockId { - pub fn as_u64(&self) -> u64 { - self.0 - } -} - -impl From for BlockId { - fn from(hash: u64) -> Self { - Self(hash) - } -} - -impl PartialEq for BlockId { - fn eq(&self, rhs: &u64) -> bool { - self.0 == *rhs - } -} - -impl PartialEq for u64 { - fn eq(&self, rhs: &BlockId) -> bool { - rhs.0 == *self - } -} - -/// Stores non-branching Wasm code blocks so that the exact -/// list of operators can be looked up by hash later. -#[derive(Debug, MemoryUsage)] -pub struct BlockStore { - inner: HashMap, -} - -impl BlockStore { - pub fn new() -> Self { - Self { - inner: HashMap::new(), - } - } - - #[cfg(test)] - pub fn len(&self) -> usize { - self.inner.len() - } - - /// Register a new code block in the store. Returns a hash that can be later - /// used to get the code block. - pub fn register_block(&mut self, block: impl Into) -> BlockId { - let block = block.into(); - let hash = block.get_hash(); - - // let hash = calculate_hash(&v); - self.inner.insert(hash, block); - hash - } - - /// Get a code block by hash. - pub fn get_block(&self, hash: impl Into) -> Option<&CodeBlock> { - self.inner.get(&hash.into()) - } -} - -/// Represents a non-branching Wasm code block. -#[derive(Debug, MemoryUsage, Hash, PartialEq, Eq)] -pub struct CodeBlock { - inner: Vec, -} - -impl CodeBlock { - pub fn get_hash(&self) -> BlockId { - use std::hash::Hasher as _; - - let mut s = std::collections::hash_map::DefaultHasher::new(); - self.hash(&mut s); - BlockId(s.finish()) - } -} - -impl<'b, Op> From<&'b [Op]> for CodeBlock -where - &'b Op: Into, -{ - fn from(ops: &'b [Op]) -> Self { - Self { - inner: ops.iter().map(|item| item.into()).collect(), - } - } -} - -impl From> for CodeBlock { - fn from(ops: Vec) -> Self { - Self { inner: ops } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - use wasmer::wasmparser::{Operator, Type, TypeOrFuncType}; - - #[test] - fn block_store() { - let mut store = BlockStore::new(); - - let code_block1 = [ - Operator::GlobalGet { global_index: 333 }, - Operator::I64Const { value: 555 }, - Operator::I64LtU, - Operator::If { - ty: TypeOrFuncType::Type(Type::EmptyBlockType), - }, - Operator::I32Const { value: 1 }, - Operator::GlobalSet { global_index: 222 }, - Operator::Unreachable, - Operator::End, - ]; - let code_block2 = [ - Operator::GlobalGet { global_index: 333 }, - Operator::I64Const { value: 222 }, - Operator::I64Sub, - Operator::GlobalSet { global_index: 333 }, - ]; - - let code_block1_hash = store.register_block(&code_block1[..]); - let code_block2_hash = store.register_block(&code_block2[..]); - let code_block1_another_hash = store.register_block(&code_block1[..]); - - assert_eq!(code_block1_hash, code_block1_another_hash); - assert_ne!(code_block1_hash, code_block2_hash); - - let cb1_expected = CodeBlock::from(vec![ - OperatorSymbol::GlobalGet, - OperatorSymbol::I64Const, - OperatorSymbol::I64LtU, - OperatorSymbol::If, - OperatorSymbol::I32Const, - OperatorSymbol::GlobalSet, - OperatorSymbol::Unreachable, - OperatorSymbol::End, - ]); - - let cb2_expected = CodeBlock::from(vec![ - OperatorSymbol::GlobalGet, - OperatorSymbol::I64Const, - OperatorSymbol::I64Sub, - OperatorSymbol::GlobalSet, - ]); - - assert_eq!(store.get_block(code_block1_hash), Some(&cb1_expected)); - assert_eq!(store.get_block(code_block2_hash), Some(&cb2_expected)); - assert_eq!(store.get_block(234), None); - } -} diff --git a/packages/profiler/src/instrumentation.rs b/packages/profiler/src/instrumentation.rs deleted file mode 100644 index e20a77a40..000000000 --- a/packages/profiler/src/instrumentation.rs +++ /dev/null @@ -1,423 +0,0 @@ -use std::{ - path::Path, - sync::{Arc, Mutex}, -}; - -use cosmwasm_vm::{ - testing::{MockApi, MockQuerier, MockStorage}, - Backend, Instance, -}; -use loupe::MemoryUsage; -use wasmer::{ - internals::WithEnv, wasmparser::Operator, Exports, Function, FunctionMiddleware, HostFunction, - LocalFunctionIndex, ModuleMiddleware, WasmerEnv, -}; -use wasmer_types::{FunctionIndex, ImportIndex}; - -use crate::{code_blocks::BlockStore, operators::OperatorSymbol}; - -pub enum Module<'d> { - Path(&'d Path), - #[cfg(test)] - Bytes(&'d [u8]), -} - -impl<'d> Module<'d> { - pub fn from_path + ?Sized>(path: &'d P) -> Self { - Self::Path(path.as_ref()) - } - - #[cfg(test)] - pub fn from_bytes(bytes: &'d [u8]) -> Self { - Self::Bytes(bytes) - } - - pub fn instrument( - &self, - block_store: Arc>, - env: Env, - start_measurement_fn: F1, - take_measurement_fn: F2, - ) -> InstrumentedInstance - where - Env: WasmerEnv + 'static, - F1: HostFunction<(u32, u32), (), WithEnv, Env>, - F2: HostFunction<(u32, u32, u64), (), WithEnv, Env>, - { - let profiling = Arc::new(Profiling::new(block_store)); - - // Create the module with our middleware. - // let mut compiler_config = Cranelift::default(); - // compiler_config.push_middleware(profiling.clone()); - // let store = Store::new(&Universal::new(compiler_config).engine()); - let mut walrus_module = match self { - Module::Path(path) => walrus::Module::from_file(path).unwrap(), - #[cfg(test)] - Module::Bytes(bytes) => walrus::Module::from_buffer(bytes).unwrap(), - }; - add_imports(&mut walrus_module); - let wasm = walrus_module.emit_wasm(); - //let wasmer_module = wasmer::Module::new(&store, wasm).unwrap(); - - let wasmer_module = - cosmwasm_vm::internals::compile(&wasm, None, &[profiling.clone()]).unwrap(); - let store = wasmer_module.store(); - - // Mock imports that do nothing. - let mut fns_to_import = Exports::new(); - fns_to_import.insert( - "start_measurement", - Function::new_native_with_env(store, env.clone(), start_measurement_fn), - ); - fns_to_import.insert( - "take_measurement", - Function::new_native_with_env(store, env, take_measurement_fn), - ); - - let backend = Backend { - api: MockApi::default(), - storage: MockStorage::default(), - querier: MockQuerier::new(&[]), - }; - let instance = cosmwasm_vm::internals::instance_from_module( - &wasmer_module, - backend, - 999999999, - false, - Some(vec![("profiling", fns_to_import)].into_iter().collect()), - ) - .unwrap(); - - InstrumentedInstance { - profiling, - instance, - } - } -} - -type MockInstance = Instance; - -pub struct InstrumentedInstance { - #[allow(dead_code)] - profiling: Arc, - instance: MockInstance, -} - -impl InstrumentedInstance { - pub fn vm_instance(&mut self) -> &mut MockInstance { - &mut self.instance - } -} - -/// Add the imports we need to make instrumentation work. -/// Returns the ids for both fns. -fn add_imports(module: &mut walrus::Module) -> (usize, usize) { - use walrus::ValType::*; - - let start_type = module.types.add(&[I32, I32], &[]); - let take_type = module.types.add(&[I32, I32, I64], &[]); - - let (fn1, _) = module.add_import_func("profiling", "start_measurement", start_type); - let (fn2, _) = module.add_import_func("profiling", "take_measurement", take_type); - - (fn1.index(), fn2.index()) -} - -#[non_exhaustive] -#[derive(Debug, MemoryUsage)] -pub struct Profiling { - block_store: Arc>, - indexes: Mutex>, -} - -impl Profiling { - pub fn new(block_store: Arc>) -> Self { - Self { - block_store, - indexes: Mutex::new(None), - } - } -} - -impl ModuleMiddleware for Profiling { - fn generate_function_middleware( - &self, - local_function_index: wasmer::LocalFunctionIndex, - ) -> Box { - Box::new(FunctionProfiling::new( - self.block_store.clone(), - self.indexes.lock().unwrap().clone().unwrap(), - local_function_index, - )) - } - - fn transform_module_info(&self, module_info: &mut wasmer_vm::ModuleInfo) { - let mut indexes = self.indexes.lock().unwrap(); - - if indexes.is_some() { - panic!("Profiling::transform_module_info: Attempting to use a `Profiling` middleware from multiple modules."); - } - - let fn1 = module_info - .imports - .iter() - .find_map(|((module, field, _), index)| { - if (module.as_str(), field.as_str()) == ("profiling", "start_measurement") { - if let ImportIndex::Function(fn_index) = index { - return Some(fn_index); - } - } - None - }) - .unwrap(); - - let fn2 = module_info - .imports - .iter() - .find_map(|((module, field, _), index)| { - if (module.as_str(), field.as_str()) == ("profiling", "take_measurement") { - if let ImportIndex::Function(fn_index) = index { - return Some(fn_index); - } - } - None - }) - .unwrap(); - - *indexes = Some(ProfilingIndexes { - start_measurement: *fn1, - take_measurement: *fn2, - }); - } -} - -#[derive(Debug)] -struct FunctionProfiling { - block_store: Arc>, - accumulated_ops: Vec, - indexes: ProfilingIndexes, - block_count: u32, - fn_index: LocalFunctionIndex, -} - -impl FunctionProfiling { - fn new( - block_store: Arc>, - indexes: ProfilingIndexes, - fn_index: LocalFunctionIndex, - ) -> Self { - Self { - block_store, - accumulated_ops: Vec::new(), - indexes, - block_count: 0, - fn_index, - } - } -} - -impl FunctionMiddleware for FunctionProfiling { - fn feed<'a>( - &mut self, - operator: wasmer::wasmparser::Operator<'a>, - state: &mut wasmer::MiddlewareReaderState<'a>, - ) -> Result<(), wasmer::MiddlewareError> { - // Possible sources and targets of a branch. Finalize the cost of the previous basic block and perform necessary checks. - match operator { - Operator::Loop { .. } // loop headers are branch targets - | Operator::End // block ends are branch targets - | Operator::Else // "else" is the "end" of an if branch - | Operator::Br { .. } // branch source - | Operator::BrTable { .. } // branch source - | Operator::BrIf { .. } // branch source - | Operator::Call { .. } // function call - branch source - | Operator::CallIndirect { .. } // function call - branch source - | Operator::Return // end of function - branch source - => { - if !self.accumulated_ops.is_empty() { - let mut store = self.block_store.lock().unwrap(); - let block_id = store.register_block(std::mem::take(&mut self.accumulated_ops)); - - // We're at the end of a code block. Finalize the measurement. - state.extend(&[ - Operator::I32Const { value: self.fn_index.as_u32() as i32 }, - Operator::I32Const { value: self.block_count as i32 }, - Operator::I64Const { value: block_id.as_u64() as i64 }, - Operator::Call{ function_index: self.indexes.take_measurement.as_u32() }, - ]); - } - } - _ => { - if self.accumulated_ops.is_empty() { - // We know we're at the beginning of a code block. - // Call start_measurement before executing it. - state.extend(&[ - Operator::I32Const { value: self.fn_index.as_u32() as i32 }, - Operator::I32Const { value: self.block_count as i32 }, - Operator::Call{ function_index: self.indexes.start_measurement.as_u32() }, - ]); - } - self.accumulated_ops.push(OperatorSymbol::from(&operator)); - } - } - - state.push_operator(operator); - Ok(()) - } -} - -#[derive(Debug, MemoryUsage, Clone)] -struct ProfilingIndexes { - start_measurement: FunctionIndex, - take_measurement: FunctionIndex, -} - -#[cfg(test)] -mod tests { - use super::*; - - use crate::code_blocks::CodeBlock; - - use std::sync::Arc; - use wasmer::{wat2wasm, WasmerEnv}; - - const WAT: &[u8] = br#" - (module - (type $t0 (func (param i32) (result i32))) - (func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32) - get_local $p0 - i32.const 1 - i32.add) - (func $multisub (export "multisub") (type $t0) (param $p0 i32) (result i32) - get_local $p0 - i32.const 2 - i32.mul - call $sub_one - i32.const 1 - i32.sub) - (func $sub_one (type $t0) (param $p0 i32) (result i32) - get_local $p0 - i32.const 1 - i32.sub)) - "#; - - struct Fixture { - instance: InstrumentedInstance, - } - - #[derive(Debug, Clone, WasmerEnv)] - struct FixtureEnv { - start_calls: Arc>>, - end_calls: Arc>>, - } - - impl FixtureEnv { - fn new() -> Self { - Self { - start_calls: Arc::new(Mutex::new(Vec::new())), - end_calls: Arc::new(Mutex::new(Vec::new())), - } - } - } - - impl Fixture { - fn new() -> Self { - let wasm = wat2wasm(WAT).unwrap(); - let module = Module::from_bytes(&wasm); - - let env = FixtureEnv::new(); - let start_measurement_fn = |env: &FixtureEnv, fun: u32, block: u32| { - env.start_calls.lock().unwrap().push((fun, block)); - }; - let take_measurement_fn = |env: &FixtureEnv, fun: u32, block: u32, hash: u64| { - env.end_calls.lock().unwrap().push((fun, block, hash)); - }; - - let block_store = Arc::new(Mutex::new(BlockStore::new())); - - Self { - instance: module.instrument( - block_store, - env, - start_measurement_fn, - take_measurement_fn, - ), - } - } - } - - // #[test] - // fn instrumentation_does_not_mess_up_local_fns() { - // let fixture = Fixture::new(); - - // let result = fixture.add_one().call(&[Value::I32(42)]).unwrap(); - // assert_eq!(result[0], Value::I32(43)); - - // let result = fixture.multisub().call(&[Value::I32(4)]).unwrap(); - // assert_eq!(result[0], Value::I32(6)); - // } - - #[test] - fn instrumentation_registers_code_blocks() { - let fixture = Fixture::new(); - - let block_store = fixture.instance.profiling.block_store.lock().unwrap(); - assert_eq!(block_store.len(), 4); - println!("{:?}", block_store); - - // The body of $add_one. - let expected_block = CodeBlock::from(vec![ - OperatorSymbol::LocalGet, - OperatorSymbol::I32Const, - OperatorSymbol::I32Add, - ]); - let block = block_store.get_block(expected_block.get_hash()); - assert_eq!(block, Some(&expected_block)); - - // The body of $sub_one - let expected_block = CodeBlock::from(vec![ - OperatorSymbol::LocalGet, - OperatorSymbol::I32Const, - OperatorSymbol::I32Sub, - ]); - let block = block_store.get_block(expected_block.get_hash()); - assert_eq!(block, Some(&expected_block)); - - // The body of $multisub until the `call` instruction. - let expected_block = CodeBlock::from(vec![ - OperatorSymbol::LocalGet, - OperatorSymbol::I32Const, - OperatorSymbol::I32Mul, - ]); - let block = block_store.get_block(expected_block.get_hash()); - assert_eq!(block, Some(&expected_block)); - - // The body of $multisub after the `call` instruction. - let expected_block = - CodeBlock::from(vec![OperatorSymbol::I32Const, OperatorSymbol::I32Sub]); - let block = block_store.get_block(expected_block.get_hash()); - assert_eq!(block, Some(&expected_block)); - } - - // #[test] - // fn instrumentation_works() { - // let fixture = Fixture::new(); - - // fixture.add_one().call(&[Value::I32(42)]).unwrap(); - // fixture.multisub().call(&[Value::I32(4)]).unwrap(); - - // let start_measurement_calls = fixture.instance.env.start_calls.lock().unwrap(); - // let take_measurement_calls = fixture.instance.env.end_calls.lock().unwrap(); - - // assert_eq!(*start_measurement_calls, [(1, 0), (0, 0), (2, 0), (0, 0)]); - // assert_eq!( - // *take_measurement_calls, - // [ - // (1, 0, 8893795678467789947), - // (0, 0, 14205319683222620312), - // (2, 0, 10205745157157101990), - // (0, 0, 13601349546502136404) - // ] - // ); - // } -} diff --git a/packages/profiler/src/main.rs b/packages/profiler/src/main.rs deleted file mode 100644 index 7966fecf6..000000000 --- a/packages/profiler/src/main.rs +++ /dev/null @@ -1,96 +0,0 @@ -mod code_blocks; -mod instrumentation; -mod measure; -mod operators; -// mod profiling; -mod utils; - -use std::sync::{Arc, Mutex}; - -use cosmwasm_std::{coins, Response}; -use cosmwasm_vm::{ - testing::{instantiate, mock_env, mock_info, query, MockApi, MockQuerier, MockStorage}, - Instance, -}; - -use crate::{ - code_blocks::{BlockId, BlockStore}, - instrumentation::Module, - measure::Measurements, -}; - -type Env = Arc>; -type MockInstance = Instance; - -fn main() { - fn start_measurement(env: &Env, fn_index: u32, local_block_id: u32) { - env.lock() - .unwrap() - .start_measurement(fn_index, local_block_id); - } - - fn take_measurement( - env: &Env, - fn_index: u32, - local_block_id: u32, - block_id: impl Into, - ) { - env.lock() - .unwrap() - .take_measurement(fn_index, local_block_id, block_id); - } - - let measurements = Arc::new(Mutex::new(Measurements::new())); - let block_store = Arc::new(Mutex::new(BlockStore::new())); - - let mut instance = Module::from_path("testdata/hackatom.wasm").instrument( - block_store.clone(), - measurements.clone(), - start_measurement, - take_measurement, - ); - - eprintln!("Warm-up round: 10 executions..."); - for _ in 1..10 { - call_things(instance.vm_instance()); - } - - { - let mut measurements = measurements.lock().unwrap(); - measurements.clear(); - } - - eprintln!("Profiling 10 executions..."); - // This could probably be multi-threaded. - for _ in 1..10 { - call_things(instance.vm_instance()); - } - - let measurements = measurements.lock().unwrap(); - measurements.compile_csv(block_store, std::io::stdout()); -} - -// Pretty much stolen from `/contracts/hackatom/tests/integration.rs` -fn call_things(deps: &mut MockInstance) { - use hackatom::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; - - let verifier = String::from("verifies"); - let beneficiary = String::from("benefits"); - let creator = String::from("creator"); - let msg = InstantiateMsg { - verifier, - beneficiary, - }; - let info = mock_info(&creator, &coins(1000, "earth")); - let res: Response = instantiate(deps, mock_env(), info, msg).unwrap(); - assert_eq!(0, res.messages.len()); - - // now let's query - let query_response = query(deps, mock_env(), QueryMsg::Verifier {}).unwrap(); - assert_eq!(query_response.as_slice(), b"{\"verifier\":\"verifies\"}"); - - // bad query returns parse error (pass wrong type - this connection is not enforced) - let qres = query(deps, mock_env(), ExecuteMsg::Release {}); - let msg = qres.unwrap_err(); - assert!(msg.contains("Error parsing")); -} diff --git a/packages/profiler/src/measure.rs b/packages/profiler/src/measure.rs deleted file mode 100644 index 21e7c0591..000000000 --- a/packages/profiler/src/measure.rs +++ /dev/null @@ -1,140 +0,0 @@ -use std::collections::{HashMap, VecDeque}; -use std::sync::{Arc, Mutex}; -use std::time::{self, Duration}; - -use crate::code_blocks::{BlockId, BlockStore}; -use crate::utils::InsertPush as _; - -#[derive(wasmer::WasmerEnv, Default, Debug, Clone)] -pub struct Measurements { - started: HashMap<(u32, u32), VecDeque>, - pub taken: HashMap>, -} - -impl Measurements { - pub fn new() -> Self { - Self::default() - } - - pub fn start_measurement(&mut self, fn_index: u32, local_block_id: u32) { - self.started - .insert_push((fn_index, local_block_id), time::Instant::now()); - } - - // TODO: Error handling? This will be called from Wasm code probably. - pub fn take_measurement( - &mut self, - fn_index: u32, - local_block_id: u32, - block_id: impl Into, - ) { - match self.started.get_mut(&(fn_index, local_block_id)) { - Some(q) => { - let start = q - .pop_front() - .expect("trying to finalize a measurement that was never started"); - self.taken.insert_push(block_id.into(), start.elapsed()); - } - None => panic!("trying to finalize a measurement that was never started"), - } - } - - pub fn compile_csv(&self, block_store: Arc>, sink: impl std::io::Write) { - let block_store = block_store.lock().unwrap(); - let mut wtr = csv::WriterBuilder::new() - .terminator(csv::Terminator::CRLF) - .flexible(true) - .from_writer(sink); - - // Header row - wtr.write_record(&["block", "executions", "avg in ns", "min in ns", "max in ns"]) - .unwrap(); - - for (block_id, timings) in &self.taken { - let avg = timings.iter().sum::().as_nanos() / timings.len() as u128; - let min = timings.iter().min().unwrap().as_nanos(); - let max = timings.iter().max().unwrap().as_nanos(); - let executions = timings.len(); - - let block = format!("{:?}", block_store.get_block(*block_id).unwrap()); - wtr.write_record(&[ - block, - executions.to_string(), - avg.to_string(), - min.to_string(), - max.to_string(), - ]) - .unwrap(); - - // wtr.write_record(timings.iter().map(|d| d.as_nanos().to_string())) - // .unwrap(); - } - - wtr.flush().unwrap(); - } - - pub fn clear(&mut self) { - self.started = HashMap::new(); - self.taken = HashMap::new(); - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn take_measurements_of_different_blocks() { - // TODO: This is probably very confusing. What's a good way to refactor? - - let mut measure = Measurements::new(); - - measure.start_measurement(0, 0); - measure.start_measurement(0, 1); - std::thread::sleep(time::Duration::from_millis(100)); - measure.start_measurement(0, 0); - measure.start_measurement(1, 0); - - measure.take_measurement(0, 0, 0); - measure.take_measurement(0, 0, 0); - measure.take_measurement(1, 0, 1); - - assert_eq!(measure.started[&(0, 0)].len(), 0); - assert_eq!(measure.started[&(0, 1)].len(), 1); - assert_eq!(measure.started[&(1, 0)].len(), 0); - - let ms0 = &measure.taken[&BlockId(0)]; - let ms1 = &measure.taken[&BlockId(1)]; - - assert!(ms0[0] > time::Duration::from_millis(100)); - assert!(ms0[1] < time::Duration::from_millis(25)); - assert!(ms1[0] < time::Duration::from_millis(25)); - } - - #[test] - fn take_measurements_serial() { - let mut measure = Measurements::new(); - - measure.start_measurement(0, 0); - std::thread::sleep(time::Duration::from_millis(50)); - measure.start_measurement(0, 0); - measure.take_measurement(0, 0, 0); - measure.take_measurement(0, 0, 0); - - measure.start_measurement(0, 0); - std::thread::sleep(time::Duration::from_millis(50)); - measure.start_measurement(0, 0); - std::thread::sleep(time::Duration::from_millis(50)); - measure.take_measurement(0, 0, 0); - measure.take_measurement(0, 0, 0); - - assert_eq!(measure.taken[&BlockId(0)].len(), 4); - - let ms = &measure.taken[&BlockId(0)]; - - assert!(ms[0] < time::Duration::from_millis(60)); - assert!(ms[1] < time::Duration::from_millis(20)); - assert!(ms[2] > time::Duration::from_millis(100)); - assert!(ms[3] < time::Duration::from_millis(60)); - } -} diff --git a/packages/profiler/src/operators.rs b/packages/profiler/src/operators.rs deleted file mode 100644 index 10298a602..000000000 --- a/packages/profiler/src/operators.rs +++ /dev/null @@ -1,1111 +0,0 @@ -use std::hash::Hash; - -use loupe::MemoryUsage; -use wasmer::wasmparser::Operator; - -#[derive(Debug, Clone, Hash, PartialEq, Eq, MemoryUsage)] -pub enum OperatorSymbol { - Unreachable, - Nop, - Block, - Loop, - If, - Else, - Try, - Catch, - Throw, - Rethrow, - End, - Br, - BrIf, - BrTable, - Return, - Call, - CallIndirect, - ReturnCall, - ReturnCallIndirect, - Delegate, - CatchAll, - Drop, - Select, - TypedSelect, - LocalGet, - LocalSet, - LocalTee, - GlobalGet, - GlobalSet, - I32Load, - I64Load, - F32Load, - F64Load, - I32Load8S, - I32Load8U, - I32Load16S, - I32Load16U, - I64Load8S, - I64Load8U, - I64Load16S, - I64Load16U, - I64Load32S, - I64Load32U, - I32Store, - I64Store, - F32Store, - F64Store, - I32Store8, - I32Store16, - I64Store8, - I64Store16, - I64Store32, - MemorySize, - MemoryGrow, - I32Const, - I64Const, - F32Const, - F64Const, - RefNull, - RefIsNull, - RefFunc, - I32Eqz, - I32Eq, - I32Ne, - I32LtS, - I32LtU, - I32GtS, - I32GtU, - I32LeS, - I32LeU, - I32GeS, - I32GeU, - I64Eqz, - I64Eq, - I64Ne, - I64LtS, - I64LtU, - I64GtS, - I64GtU, - I64LeS, - I64LeU, - I64GeS, - I64GeU, - F32Eq, - F32Ne, - F32Lt, - F32Gt, - F32Le, - F32Ge, - F64Eq, - F64Ne, - F64Lt, - F64Gt, - F64Le, - F64Ge, - I32Clz, - I32Ctz, - I32Popcnt, - I32Add, - I32Sub, - I32Mul, - I32DivS, - I32DivU, - I32RemS, - I32RemU, - I32And, - I32Or, - I32Xor, - I32Shl, - I32ShrS, - I32ShrU, - I32Rotl, - I32Rotr, - I64Clz, - I64Ctz, - I64Popcnt, - I64Add, - I64Sub, - I64Mul, - I64DivS, - I64DivU, - I64RemS, - I64RemU, - I64And, - I64Or, - I64Xor, - I64Shl, - I64ShrS, - I64ShrU, - I64Rotl, - I64Rotr, - F32Abs, - F32Neg, - F32Ceil, - F32Floor, - F32Trunc, - F32Nearest, - F32Sqrt, - F32Add, - F32Sub, - F32Mul, - F32Div, - F32Min, - F32Max, - F32Copysign, - F64Abs, - F64Neg, - F64Ceil, - F64Floor, - F64Trunc, - F64Nearest, - F64Sqrt, - F64Add, - F64Sub, - F64Mul, - F64Div, - F64Min, - F64Max, - F64Copysign, - I32WrapI64, - I32TruncF32S, - I32TruncF32U, - I32TruncF64S, - I32TruncF64U, - I64ExtendI32S, - I64ExtendI32U, - I64TruncF32S, - I64TruncF32U, - I64TruncF64S, - I64TruncF64U, - F32ConvertI32S, - F32ConvertI32U, - F32ConvertI64S, - F32ConvertI64U, - F32DemoteF64, - F64ConvertI32S, - F64ConvertI32U, - F64ConvertI64S, - F64ConvertI64U, - F64PromoteF32, - I32ReinterpretF32, - I64ReinterpretF64, - F32ReinterpretI32, - F64ReinterpretI64, - I32Extend8S, - I32Extend16S, - I64Extend8S, - I64Extend16S, - I64Extend32S, - - // 0xFC operators - // Non-trapping Float-to-int Conversions - I32TruncSatF32S, - I32TruncSatF32U, - I32TruncSatF64S, - I32TruncSatF64U, - I64TruncSatF32S, - I64TruncSatF32U, - I64TruncSatF64S, - I64TruncSatF64U, - - // 0xFC operators - // bulk memory https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md - MemoryInit, - DataDrop, - MemoryCopy, - MemoryFill, - TableInit, - ElemDrop, - TableCopy, - TableFill, - TableGet, - TableSet, - TableGrow, - TableSize, - - // 0xFE operators - // https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md - MemoryAtomicNotify, - MemoryAtomicWait32, - MemoryAtomicWait64, - AtomicFence, - I32AtomicLoad, - I64AtomicLoad, - I32AtomicLoad8U, - I32AtomicLoad16U, - I64AtomicLoad8U, - I64AtomicLoad16U, - I64AtomicLoad32U, - I32AtomicStore, - I64AtomicStore, - I32AtomicStore8, - I32AtomicStore16, - I64AtomicStore8, - I64AtomicStore16, - I64AtomicStore32, - I32AtomicRmwAdd, - I64AtomicRmwAdd, - I32AtomicRmw8AddU, - I32AtomicRmw16AddU, - I64AtomicRmw8AddU, - I64AtomicRmw16AddU, - I64AtomicRmw32AddU, - I32AtomicRmwSub, - I64AtomicRmwSub, - I32AtomicRmw8SubU, - I32AtomicRmw16SubU, - I64AtomicRmw8SubU, - I64AtomicRmw16SubU, - I64AtomicRmw32SubU, - I32AtomicRmwAnd, - I64AtomicRmwAnd, - I32AtomicRmw8AndU, - I32AtomicRmw16AndU, - I64AtomicRmw8AndU, - I64AtomicRmw16AndU, - I64AtomicRmw32AndU, - I32AtomicRmwOr, - I64AtomicRmwOr, - I32AtomicRmw8OrU, - I32AtomicRmw16OrU, - I64AtomicRmw8OrU, - I64AtomicRmw16OrU, - I64AtomicRmw32OrU, - I32AtomicRmwXor, - I64AtomicRmwXor, - I32AtomicRmw8XorU, - I32AtomicRmw16XorU, - I64AtomicRmw8XorU, - I64AtomicRmw16XorU, - I64AtomicRmw32XorU, - I32AtomicRmwXchg, - I64AtomicRmwXchg, - I32AtomicRmw8XchgU, - I32AtomicRmw16XchgU, - I64AtomicRmw8XchgU, - I64AtomicRmw16XchgU, - I64AtomicRmw32XchgU, - I32AtomicRmwCmpxchg, - I64AtomicRmwCmpxchg, - I32AtomicRmw8CmpxchgU, - I32AtomicRmw16CmpxchgU, - I64AtomicRmw8CmpxchgU, - I64AtomicRmw16CmpxchgU, - I64AtomicRmw32CmpxchgU, - - // 0xFD operators - // SIMD https://webassembly.github.io/simd/core/binary/instructions.html - V128Load, - V128Load8x8S, - V128Load8x8U, - V128Load16x4S, - V128Load16x4U, - V128Load32x2S, - V128Load32x2U, - V128Load8Splat, - V128Load16Splat, - V128Load32Splat, - V128Load64Splat, - V128Load32Zero, - V128Load64Zero, - V128Store, - V128Load8Lane, - V128Load16Lane, - V128Load32Lane, - V128Load64Lane, - V128Store8Lane, - V128Store16Lane, - V128Store32Lane, - V128Store64Lane, - V128Const, - I8x16Shuffle, - I8x16ExtractLaneS, - I8x16ExtractLaneU, - I8x16ReplaceLane, - I16x8ExtractLaneS, - I16x8ExtractLaneU, - I16x8ReplaceLane, - I32x4ExtractLane, - I32x4ReplaceLane, - I64x2ExtractLane, - I64x2ReplaceLane, - F32x4ExtractLane, - F32x4ReplaceLane, - F64x2ExtractLane, - F64x2ReplaceLane, - I8x16Swizzle, - I8x16Splat, - I16x8Splat, - I32x4Splat, - I64x2Splat, - F32x4Splat, - F64x2Splat, - I8x16Eq, - I8x16Ne, - I8x16LtS, - I8x16LtU, - I8x16GtS, - I8x16GtU, - I8x16LeS, - I8x16LeU, - I8x16GeS, - I8x16GeU, - I16x8Eq, - I16x8Ne, - I16x8LtS, - I16x8LtU, - I16x8GtS, - I16x8GtU, - I16x8LeS, - I16x8LeU, - I16x8GeS, - I16x8GeU, - I32x4Eq, - I32x4Ne, - I32x4LtS, - I32x4LtU, - I32x4GtS, - I32x4GtU, - I32x4LeS, - I32x4LeU, - I32x4GeS, - I32x4GeU, - I64x2Eq, - I64x2Ne, - I64x2LtS, - I64x2GtS, - I64x2LeS, - I64x2GeS, - F32x4Eq, - F32x4Ne, - F32x4Lt, - F32x4Gt, - F32x4Le, - F32x4Ge, - F64x2Eq, - F64x2Ne, - F64x2Lt, - F64x2Gt, - F64x2Le, - F64x2Ge, - V128Not, - V128And, - V128AndNot, - V128Or, - V128Xor, - V128Bitselect, - V128AnyTrue, - I8x16Abs, - I8x16Neg, - I8x16Popcnt, - I8x16AllTrue, - I8x16Bitmask, - I8x16NarrowI16x8S, - I8x16NarrowI16x8U, - I8x16Shl, - I8x16ShrS, - I8x16ShrU, - I8x16Add, - I8x16AddSatS, - I8x16AddSatU, - I8x16Sub, - I8x16SubSatS, - I8x16SubSatU, - I8x16MinS, - I8x16MinU, - I8x16MaxS, - I8x16MaxU, - I8x16RoundingAverageU, - I16x8ExtAddPairwiseI8x16S, - I16x8ExtAddPairwiseI8x16U, - I16x8Abs, - I16x8Neg, - I16x8Q15MulrSatS, - I16x8AllTrue, - I16x8Bitmask, - I16x8NarrowI32x4S, - I16x8NarrowI32x4U, - I16x8ExtendLowI8x16S, - I16x8ExtendHighI8x16S, - I16x8ExtendLowI8x16U, - I16x8ExtendHighI8x16U, - I16x8Shl, - I16x8ShrS, - I16x8ShrU, - I16x8Add, - I16x8AddSatS, - I16x8AddSatU, - I16x8Sub, - I16x8SubSatS, - I16x8SubSatU, - I16x8Mul, - I16x8MinS, - I16x8MinU, - I16x8MaxS, - I16x8MaxU, - I16x8RoundingAverageU, - I16x8ExtMulLowI8x16S, - I16x8ExtMulHighI8x16S, - I16x8ExtMulLowI8x16U, - I16x8ExtMulHighI8x16U, - I32x4ExtAddPairwiseI16x8S, - I32x4ExtAddPairwiseI16x8U, - I32x4Abs, - I32x4Neg, - I32x4AllTrue, - I32x4Bitmask, - I32x4ExtendLowI16x8S, - I32x4ExtendHighI16x8S, - I32x4ExtendLowI16x8U, - I32x4ExtendHighI16x8U, - I32x4Shl, - I32x4ShrS, - I32x4ShrU, - I32x4Add, - I32x4Sub, - I32x4Mul, - I32x4MinS, - I32x4MinU, - I32x4MaxS, - I32x4MaxU, - I32x4DotI16x8S, - I32x4ExtMulLowI16x8S, - I32x4ExtMulHighI16x8S, - I32x4ExtMulLowI16x8U, - I32x4ExtMulHighI16x8U, - I64x2Abs, - I64x2Neg, - I64x2AllTrue, - I64x2Bitmask, - I64x2ExtendLowI32x4S, - I64x2ExtendHighI32x4S, - I64x2ExtendLowI32x4U, - I64x2ExtendHighI32x4U, - I64x2Shl, - I64x2ShrS, - I64x2ShrU, - I64x2Add, - I64x2Sub, - I64x2Mul, - I64x2ExtMulLowI32x4S, - I64x2ExtMulHighI32x4S, - I64x2ExtMulLowI32x4U, - I64x2ExtMulHighI32x4U, - F32x4Ceil, - F32x4Floor, - F32x4Trunc, - F32x4Nearest, - F32x4Abs, - F32x4Neg, - F32x4Sqrt, - F32x4Add, - F32x4Sub, - F32x4Mul, - F32x4Div, - F32x4Min, - F32x4Max, - F32x4PMin, - F32x4PMax, - F64x2Ceil, - F64x2Floor, - F64x2Trunc, - F64x2Nearest, - F64x2Abs, - F64x2Neg, - F64x2Sqrt, - F64x2Add, - F64x2Sub, - F64x2Mul, - F64x2Div, - F64x2Min, - F64x2Max, - F64x2PMin, - F64x2PMax, - I32x4TruncSatF32x4S, - I32x4TruncSatF32x4U, - F32x4ConvertI32x4S, - F32x4ConvertI32x4U, - I32x4TruncSatF64x2SZero, - I32x4TruncSatF64x2UZero, - F64x2ConvertLowI32x4S, - F64x2ConvertLowI32x4U, - F32x4DemoteF64x2Zero, - F64x2PromoteLowF32x4, - - // unsorted - I8x16RelaxedSwizzle, - I32x4RelaxedTruncSatF32x4S, - I32x4RelaxedTruncSatF32x4U, - I32x4RelaxedTruncSatF64x2SZero, - I32x4RelaxedTruncSatF64x2UZero, - F32x4Fma, - F32x4Fms, - F64x2Fma, - F64x2Fms, - I8x16LaneSelect, - I16x8LaneSelect, - I32x4LaneSelect, - I64x2LaneSelect, - F32x4RelaxedMin, - F32x4RelaxedMax, - F64x2RelaxedMin, - F64x2RelaxedMax, -} - -impl From<&Operator<'_>> for OperatorSymbol { - fn from(op: &Operator<'_>) -> Self { - match op { - Operator::Unreachable => OperatorSymbol::Unreachable, - Operator::Nop => OperatorSymbol::Nop, - Operator::Block { .. } => OperatorSymbol::Block, - Operator::Loop { .. } => OperatorSymbol::Loop, - Operator::If { .. } => OperatorSymbol::If, - Operator::Else => OperatorSymbol::Else, - Operator::Try { .. } => OperatorSymbol::Try, - Operator::Catch { .. } => OperatorSymbol::Catch, - Operator::Throw { .. } => OperatorSymbol::Throw, - Operator::Rethrow { .. } => OperatorSymbol::Rethrow, - Operator::End => OperatorSymbol::End, - Operator::Br { .. } => OperatorSymbol::Br, - Operator::BrIf { .. } => OperatorSymbol::BrIf, - Operator::BrTable { .. } => OperatorSymbol::BrTable, - Operator::Return => OperatorSymbol::Return, - Operator::Call { .. } => OperatorSymbol::Call, - Operator::CallIndirect { .. } => OperatorSymbol::CallIndirect, - Operator::ReturnCall { .. } => OperatorSymbol::ReturnCall, - Operator::ReturnCallIndirect { .. } => OperatorSymbol::ReturnCallIndirect, - Operator::Delegate { .. } => OperatorSymbol::Delegate, - Operator::CatchAll => OperatorSymbol::CatchAll, - Operator::Drop => OperatorSymbol::Drop, - Operator::Select => OperatorSymbol::Select, - Operator::TypedSelect { .. } => OperatorSymbol::TypedSelect, - Operator::LocalGet { .. } => OperatorSymbol::LocalGet, - Operator::LocalSet { .. } => OperatorSymbol::LocalSet, - Operator::LocalTee { .. } => OperatorSymbol::LocalTee, - Operator::GlobalGet { .. } => OperatorSymbol::GlobalGet, - Operator::GlobalSet { .. } => OperatorSymbol::GlobalSet, - Operator::I32Load { .. } => OperatorSymbol::I32Load, - Operator::I64Load { .. } => OperatorSymbol::I64Load, - Operator::F32Load { .. } => OperatorSymbol::F32Load, - Operator::F64Load { .. } => OperatorSymbol::F64Load, - Operator::I32Load8S { .. } => OperatorSymbol::I32Load8S, - Operator::I32Load8U { .. } => OperatorSymbol::I32Load8U, - Operator::I32Load16S { .. } => OperatorSymbol::I32Load16S, - Operator::I32Load16U { .. } => OperatorSymbol::I32Load16U, - Operator::I64Load8S { .. } => OperatorSymbol::I64Load8S, - Operator::I64Load8U { .. } => OperatorSymbol::I64Load8U, - Operator::I64Load16S { .. } => OperatorSymbol::I64Load16S, - Operator::I64Load16U { .. } => OperatorSymbol::I64Load16U, - Operator::I64Load32S { .. } => OperatorSymbol::I64Load32S, - Operator::I64Load32U { .. } => OperatorSymbol::I64Load32U, - Operator::I32Store { .. } => OperatorSymbol::I32Store, - Operator::I64Store { .. } => OperatorSymbol::I64Store, - Operator::F32Store { .. } => OperatorSymbol::F32Store, - Operator::F64Store { .. } => OperatorSymbol::F64Store, - Operator::I32Store8 { .. } => OperatorSymbol::I32Store8, - Operator::I32Store16 { .. } => OperatorSymbol::I32Store16, - Operator::I64Store8 { .. } => OperatorSymbol::I64Store8, - Operator::I64Store16 { .. } => OperatorSymbol::I64Store16, - Operator::I64Store32 { .. } => OperatorSymbol::I64Store32, - Operator::MemorySize { .. } => OperatorSymbol::MemorySize, - Operator::MemoryGrow { .. } => OperatorSymbol::MemoryGrow, - Operator::I32Const { .. } => OperatorSymbol::I32Const, - Operator::I64Const { .. } => OperatorSymbol::I64Const, - Operator::F32Const { .. } => OperatorSymbol::F32Const, - Operator::F64Const { .. } => OperatorSymbol::F64Const, - Operator::RefNull { .. } => OperatorSymbol::RefNull, - Operator::RefIsNull => OperatorSymbol::RefIsNull, - Operator::RefFunc { .. } => OperatorSymbol::RefFunc, - Operator::I32Eqz => OperatorSymbol::I32Eqz, - Operator::I32Eq => OperatorSymbol::I32Eq, - Operator::I32Ne => OperatorSymbol::I32Ne, - Operator::I32LtS => OperatorSymbol::I32LtS, - Operator::I32LtU => OperatorSymbol::I32LtU, - Operator::I32GtS => OperatorSymbol::I32GtS, - Operator::I32GtU => OperatorSymbol::I32GtU, - Operator::I32LeS => OperatorSymbol::I32LeS, - Operator::I32LeU => OperatorSymbol::I32LeU, - Operator::I32GeS => OperatorSymbol::I32GeS, - Operator::I32GeU => OperatorSymbol::I32GeU, - Operator::I64Eqz => OperatorSymbol::I64Eqz, - Operator::I64Eq => OperatorSymbol::I64Eq, - Operator::I64Ne => OperatorSymbol::I64Ne, - Operator::I64LtS => OperatorSymbol::I64LtS, - Operator::I64LtU => OperatorSymbol::I64LtU, - Operator::I64GtS => OperatorSymbol::I64GtS, - Operator::I64GtU => OperatorSymbol::I64GtU, - Operator::I64LeS => OperatorSymbol::I64LeS, - Operator::I64LeU => OperatorSymbol::I64LeU, - Operator::I64GeS => OperatorSymbol::I64GeS, - Operator::I64GeU => OperatorSymbol::I64GeU, - Operator::F32Eq => OperatorSymbol::F32Eq, - Operator::F32Ne => OperatorSymbol::F32Ne, - Operator::F32Lt => OperatorSymbol::F32Lt, - Operator::F32Gt => OperatorSymbol::F32Gt, - Operator::F32Le => OperatorSymbol::F32Le, - Operator::F32Ge => OperatorSymbol::F32Ge, - Operator::F64Eq => OperatorSymbol::F64Eq, - Operator::F64Ne => OperatorSymbol::F64Ne, - Operator::F64Lt => OperatorSymbol::F64Lt, - Operator::F64Gt => OperatorSymbol::F64Gt, - Operator::F64Le => OperatorSymbol::F64Le, - Operator::F64Ge => OperatorSymbol::F64Ge, - Operator::I32Clz => OperatorSymbol::I32Clz, - Operator::I32Ctz => OperatorSymbol::I32Ctz, - Operator::I32Popcnt => OperatorSymbol::I32Popcnt, - Operator::I32Add => OperatorSymbol::I32Add, - Operator::I32Sub => OperatorSymbol::I32Sub, - Operator::I32Mul => OperatorSymbol::I32Mul, - Operator::I32DivS => OperatorSymbol::I32DivS, - Operator::I32DivU => OperatorSymbol::I32DivU, - Operator::I32RemS => OperatorSymbol::I32RemS, - Operator::I32RemU => OperatorSymbol::I32RemU, - Operator::I32And => OperatorSymbol::I32And, - Operator::I32Or => OperatorSymbol::I32Or, - Operator::I32Xor => OperatorSymbol::I32Xor, - Operator::I32Shl => OperatorSymbol::I32Shl, - Operator::I32ShrS => OperatorSymbol::I32ShrS, - Operator::I32ShrU => OperatorSymbol::I32ShrU, - Operator::I32Rotl => OperatorSymbol::I32Rotl, - Operator::I32Rotr => OperatorSymbol::I32Rotr, - Operator::I64Clz => OperatorSymbol::I64Clz, - Operator::I64Ctz => OperatorSymbol::I64Ctz, - Operator::I64Popcnt => OperatorSymbol::I64Popcnt, - Operator::I64Add => OperatorSymbol::I64Add, - Operator::I64Sub => OperatorSymbol::I64Sub, - Operator::I64Mul => OperatorSymbol::I64Mul, - Operator::I64DivS => OperatorSymbol::I64DivS, - Operator::I64DivU => OperatorSymbol::I64DivU, - Operator::I64RemS => OperatorSymbol::I64RemS, - Operator::I64RemU => OperatorSymbol::I64RemU, - Operator::I64And => OperatorSymbol::I64And, - Operator::I64Or => OperatorSymbol::I64Or, - Operator::I64Xor => OperatorSymbol::I64Xor, - Operator::I64Shl => OperatorSymbol::I64Shl, - Operator::I64ShrS => OperatorSymbol::I64ShrS, - Operator::I64ShrU => OperatorSymbol::I64ShrU, - Operator::I64Rotl => OperatorSymbol::I64Rotl, - Operator::I64Rotr => OperatorSymbol::I64Rotr, - Operator::F32Abs => OperatorSymbol::F32Abs, - Operator::F32Neg => OperatorSymbol::F32Neg, - Operator::F32Ceil => OperatorSymbol::F32Ceil, - Operator::F32Floor => OperatorSymbol::F32Floor, - Operator::F32Trunc => OperatorSymbol::F32Trunc, - Operator::F32Nearest => OperatorSymbol::F32Nearest, - Operator::F32Sqrt => OperatorSymbol::F32Sqrt, - Operator::F32Add => OperatorSymbol::F32Add, - Operator::F32Sub => OperatorSymbol::F32Sub, - Operator::F32Mul => OperatorSymbol::F32Mul, - Operator::F32Div => OperatorSymbol::F32Div, - Operator::F32Min => OperatorSymbol::F32Min, - Operator::F32Max => OperatorSymbol::F32Max, - Operator::F32Copysign => OperatorSymbol::F32Copysign, - Operator::F64Abs => OperatorSymbol::F64Abs, - Operator::F64Neg => OperatorSymbol::F64Neg, - Operator::F64Ceil => OperatorSymbol::F64Ceil, - Operator::F64Floor => OperatorSymbol::F64Floor, - Operator::F64Trunc => OperatorSymbol::F64Trunc, - Operator::F64Nearest => OperatorSymbol::F64Nearest, - Operator::F64Sqrt => OperatorSymbol::F64Sqrt, - Operator::F64Add => OperatorSymbol::F64Add, - Operator::F64Sub => OperatorSymbol::F64Sub, - Operator::F64Mul => OperatorSymbol::F64Mul, - Operator::F64Div => OperatorSymbol::F64Div, - Operator::F64Min => OperatorSymbol::F64Min, - Operator::F64Max => OperatorSymbol::F64Max, - Operator::F64Copysign => OperatorSymbol::F64Copysign, - Operator::I32WrapI64 => OperatorSymbol::I32WrapI64, - Operator::I32TruncF32S => OperatorSymbol::I32TruncF32S, - Operator::I32TruncF32U => OperatorSymbol::I32TruncF32U, - Operator::I32TruncF64S => OperatorSymbol::I32TruncF64S, - Operator::I32TruncF64U => OperatorSymbol::I32TruncF64U, - Operator::I64ExtendI32S => OperatorSymbol::I64ExtendI32S, - Operator::I64ExtendI32U => OperatorSymbol::I64ExtendI32U, - Operator::I64TruncF32S => OperatorSymbol::I64TruncF32S, - Operator::I64TruncF32U => OperatorSymbol::I64TruncF32U, - Operator::I64TruncF64S => OperatorSymbol::I64TruncF64S, - Operator::I64TruncF64U => OperatorSymbol::I64TruncF64U, - Operator::F32ConvertI32S => OperatorSymbol::F32ConvertI32S, - Operator::F32ConvertI32U => OperatorSymbol::F32ConvertI32U, - Operator::F32ConvertI64S => OperatorSymbol::F32ConvertI64S, - Operator::F32ConvertI64U => OperatorSymbol::F32ConvertI64U, - Operator::F32DemoteF64 => OperatorSymbol::F32DemoteF64, - Operator::F64ConvertI32S => OperatorSymbol::F64ConvertI32S, - Operator::F64ConvertI32U => OperatorSymbol::F64ConvertI32U, - Operator::F64ConvertI64S => OperatorSymbol::F64ConvertI64S, - Operator::F64ConvertI64U => OperatorSymbol::F64ConvertI64U, - Operator::F64PromoteF32 => OperatorSymbol::F64PromoteF32, - Operator::I32ReinterpretF32 => OperatorSymbol::I32ReinterpretF32, - Operator::I64ReinterpretF64 => OperatorSymbol::I64ReinterpretF64, - Operator::F32ReinterpretI32 => OperatorSymbol::F32ReinterpretI32, - Operator::F64ReinterpretI64 => OperatorSymbol::F64ReinterpretI64, - Operator::I32Extend8S => OperatorSymbol::I32Extend8S, - Operator::I32Extend16S => OperatorSymbol::I32Extend16S, - Operator::I64Extend8S => OperatorSymbol::I64Extend8S, - Operator::I64Extend16S => OperatorSymbol::I64Extend16S, - Operator::I64Extend32S => OperatorSymbol::I64Extend32S, - - // 0xFC operators - // Non-trapping Float-to-int Conversions - Operator::I32TruncSatF32S => OperatorSymbol::I32TruncSatF32S, - Operator::I32TruncSatF32U => OperatorSymbol::I32TruncSatF32U, - Operator::I32TruncSatF64S => OperatorSymbol::I32TruncSatF64S, - Operator::I32TruncSatF64U => OperatorSymbol::I32TruncSatF64U, - Operator::I64TruncSatF32S => OperatorSymbol::I64TruncSatF32S, - Operator::I64TruncSatF32U => OperatorSymbol::I64TruncSatF32U, - Operator::I64TruncSatF64S => OperatorSymbol::I64TruncSatF64S, - Operator::I64TruncSatF64U => OperatorSymbol::I64TruncSatF64U, - - // 0xFC operators - // bulk memory https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md - Operator::MemoryInit { .. } => OperatorSymbol::MemoryInit, - Operator::DataDrop { .. } => OperatorSymbol::DataDrop, - Operator::MemoryCopy { .. } => OperatorSymbol::MemoryCopy, - Operator::MemoryFill { .. } => OperatorSymbol::MemoryFill, - Operator::TableInit { .. } => OperatorSymbol::TableInit, - Operator::ElemDrop { .. } => OperatorSymbol::ElemDrop, - Operator::TableCopy { .. } => OperatorSymbol::TableCopy, - Operator::TableFill { .. } => OperatorSymbol::TableFill, - Operator::TableGet { .. } => OperatorSymbol::TableGet, - Operator::TableSet { .. } => OperatorSymbol::TableSet, - Operator::TableGrow { .. } => OperatorSymbol::TableGrow, - Operator::TableSize { .. } => OperatorSymbol::TableSize, - - // 0xFE operators - // https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md - Operator::MemoryAtomicNotify { .. } => OperatorSymbol::MemoryAtomicNotify, - Operator::MemoryAtomicWait32 { .. } => OperatorSymbol::MemoryAtomicWait32, - Operator::MemoryAtomicWait64 { .. } => OperatorSymbol::MemoryAtomicWait64, - Operator::AtomicFence { .. } => OperatorSymbol::AtomicFence, - Operator::I32AtomicLoad { .. } => OperatorSymbol::I32AtomicLoad, - Operator::I64AtomicLoad { .. } => OperatorSymbol::I64AtomicLoad, - Operator::I32AtomicLoad8U { .. } => OperatorSymbol::I32AtomicLoad8U, - Operator::I32AtomicLoad16U { .. } => OperatorSymbol::I32AtomicLoad16U, - Operator::I64AtomicLoad8U { .. } => OperatorSymbol::I64AtomicLoad8U, - Operator::I64AtomicLoad16U { .. } => OperatorSymbol::I64AtomicLoad16U, - Operator::I64AtomicLoad32U { .. } => OperatorSymbol::I64AtomicLoad32U, - Operator::I32AtomicStore { .. } => OperatorSymbol::I32AtomicStore, - Operator::I64AtomicStore { .. } => OperatorSymbol::I64AtomicStore, - Operator::I32AtomicStore8 { .. } => OperatorSymbol::I32AtomicStore8, - Operator::I32AtomicStore16 { .. } => OperatorSymbol::I32AtomicStore16, - Operator::I64AtomicStore8 { .. } => OperatorSymbol::I64AtomicStore8, - Operator::I64AtomicStore16 { .. } => OperatorSymbol::I64AtomicStore16, - Operator::I64AtomicStore32 { .. } => OperatorSymbol::I64AtomicStore32, - Operator::I32AtomicRmwAdd { .. } => OperatorSymbol::I32AtomicRmwAdd, - Operator::I64AtomicRmwAdd { .. } => OperatorSymbol::I64AtomicRmwAdd, - Operator::I32AtomicRmw8AddU { .. } => OperatorSymbol::I32AtomicRmw8AddU, - Operator::I32AtomicRmw16AddU { .. } => OperatorSymbol::I32AtomicRmw16AddU, - Operator::I64AtomicRmw8AddU { .. } => OperatorSymbol::I64AtomicRmw8AddU, - Operator::I64AtomicRmw16AddU { .. } => OperatorSymbol::I64AtomicRmw16AddU, - Operator::I64AtomicRmw32AddU { .. } => OperatorSymbol::I64AtomicRmw32AddU, - Operator::I32AtomicRmwSub { .. } => OperatorSymbol::I32AtomicRmwSub, - Operator::I64AtomicRmwSub { .. } => OperatorSymbol::I64AtomicRmwSub, - Operator::I32AtomicRmw8SubU { .. } => OperatorSymbol::I32AtomicRmw8SubU, - Operator::I32AtomicRmw16SubU { .. } => OperatorSymbol::I32AtomicRmw16SubU, - Operator::I64AtomicRmw8SubU { .. } => OperatorSymbol::I64AtomicRmw8SubU, - Operator::I64AtomicRmw16SubU { .. } => OperatorSymbol::I64AtomicRmw16SubU, - Operator::I64AtomicRmw32SubU { .. } => OperatorSymbol::I64AtomicRmw32SubU, - Operator::I32AtomicRmwAnd { .. } => OperatorSymbol::I32AtomicRmwAnd, - Operator::I64AtomicRmwAnd { .. } => OperatorSymbol::I64AtomicRmwAnd, - Operator::I32AtomicRmw8AndU { .. } => OperatorSymbol::I32AtomicRmw8AndU, - Operator::I32AtomicRmw16AndU { .. } => OperatorSymbol::I32AtomicRmw16AndU, - Operator::I64AtomicRmw8AndU { .. } => OperatorSymbol::I64AtomicRmw8AndU, - Operator::I64AtomicRmw16AndU { .. } => OperatorSymbol::I64AtomicRmw16AndU, - Operator::I64AtomicRmw32AndU { .. } => OperatorSymbol::I64AtomicRmw32AndU, - Operator::I32AtomicRmwOr { .. } => OperatorSymbol::I32AtomicRmwOr, - Operator::I64AtomicRmwOr { .. } => OperatorSymbol::I64AtomicRmwOr, - Operator::I32AtomicRmw8OrU { .. } => OperatorSymbol::I32AtomicRmw8OrU, - Operator::I32AtomicRmw16OrU { .. } => OperatorSymbol::I32AtomicRmw16OrU, - Operator::I64AtomicRmw8OrU { .. } => OperatorSymbol::I64AtomicRmw8OrU, - Operator::I64AtomicRmw16OrU { .. } => OperatorSymbol::I64AtomicRmw16OrU, - Operator::I64AtomicRmw32OrU { .. } => OperatorSymbol::I64AtomicRmw32OrU, - Operator::I32AtomicRmwXor { .. } => OperatorSymbol::I32AtomicRmwXor, - Operator::I64AtomicRmwXor { .. } => OperatorSymbol::I64AtomicRmwXor, - Operator::I32AtomicRmw8XorU { .. } => OperatorSymbol::I32AtomicRmw8XorU, - Operator::I32AtomicRmw16XorU { .. } => OperatorSymbol::I32AtomicRmw16XorU, - Operator::I64AtomicRmw8XorU { .. } => OperatorSymbol::I64AtomicRmw8XorU, - Operator::I64AtomicRmw16XorU { .. } => OperatorSymbol::I64AtomicRmw16XorU, - Operator::I64AtomicRmw32XorU { .. } => OperatorSymbol::I64AtomicRmw32XorU, - Operator::I32AtomicRmwXchg { .. } => OperatorSymbol::I32AtomicRmwXchg, - Operator::I64AtomicRmwXchg { .. } => OperatorSymbol::I64AtomicRmwXchg, - Operator::I32AtomicRmw8XchgU { .. } => OperatorSymbol::I32AtomicRmw8XchgU, - Operator::I32AtomicRmw16XchgU { .. } => OperatorSymbol::I32AtomicRmw16XchgU, - Operator::I64AtomicRmw8XchgU { .. } => OperatorSymbol::I64AtomicRmw8XchgU, - Operator::I64AtomicRmw16XchgU { .. } => OperatorSymbol::I64AtomicRmw16XchgU, - Operator::I64AtomicRmw32XchgU { .. } => OperatorSymbol::I64AtomicRmw32XchgU, - Operator::I32AtomicRmwCmpxchg { .. } => OperatorSymbol::I32AtomicRmwCmpxchg, - Operator::I64AtomicRmwCmpxchg { .. } => OperatorSymbol::I64AtomicRmwCmpxchg, - Operator::I32AtomicRmw8CmpxchgU { .. } => OperatorSymbol::I32AtomicRmw8CmpxchgU, - Operator::I32AtomicRmw16CmpxchgU { .. } => OperatorSymbol::I32AtomicRmw16CmpxchgU, - Operator::I64AtomicRmw8CmpxchgU { .. } => OperatorSymbol::I64AtomicRmw8CmpxchgU, - Operator::I64AtomicRmw16CmpxchgU { .. } => OperatorSymbol::I64AtomicRmw16CmpxchgU, - Operator::I64AtomicRmw32CmpxchgU { .. } => OperatorSymbol::I64AtomicRmw32CmpxchgU, - - // 0xFD operators - // SIMD https://webassembly.github.io/simd/core/binary/instructions.html - Operator::V128Load { .. } => OperatorSymbol::V128Load, - Operator::V128Load8x8S { .. } => OperatorSymbol::V128Load8x8S, - Operator::V128Load8x8U { .. } => OperatorSymbol::V128Load8x8U, - Operator::V128Load16x4S { .. } => OperatorSymbol::V128Load16x4S, - Operator::V128Load16x4U { .. } => OperatorSymbol::V128Load16x4U, - Operator::V128Load32x2S { .. } => OperatorSymbol::V128Load32x2S, - Operator::V128Load32x2U { .. } => OperatorSymbol::V128Load32x2U, - Operator::V128Load8Splat { .. } => OperatorSymbol::V128Load8Splat, - Operator::V128Load16Splat { .. } => OperatorSymbol::V128Load16Splat, - Operator::V128Load32Splat { .. } => OperatorSymbol::V128Load32Splat, - Operator::V128Load64Splat { .. } => OperatorSymbol::V128Load64Splat, - Operator::V128Load32Zero { .. } => OperatorSymbol::V128Load32Zero, - Operator::V128Load64Zero { .. } => OperatorSymbol::V128Load64Zero, - Operator::V128Store { .. } => OperatorSymbol::V128Store, - Operator::V128Load8Lane { .. } => OperatorSymbol::V128Load8Lane, - Operator::V128Load16Lane { .. } => OperatorSymbol::V128Load16Lane, - Operator::V128Load32Lane { .. } => OperatorSymbol::V128Load32Lane, - Operator::V128Load64Lane { .. } => OperatorSymbol::V128Load64Lane, - Operator::V128Store8Lane { .. } => OperatorSymbol::V128Store8Lane, - Operator::V128Store16Lane { .. } => OperatorSymbol::V128Store16Lane, - Operator::V128Store32Lane { .. } => OperatorSymbol::V128Store32Lane, - Operator::V128Store64Lane { .. } => OperatorSymbol::V128Store64Lane, - Operator::V128Const { .. } => OperatorSymbol::V128Const, - Operator::I8x16Shuffle { .. } => OperatorSymbol::I8x16Shuffle, - Operator::I8x16ExtractLaneS { .. } => OperatorSymbol::I8x16ExtractLaneS, - Operator::I8x16ExtractLaneU { .. } => OperatorSymbol::I8x16ExtractLaneU, - Operator::I8x16ReplaceLane { .. } => OperatorSymbol::I8x16ReplaceLane, - Operator::I16x8ExtractLaneS { .. } => OperatorSymbol::I16x8ExtractLaneS, - Operator::I16x8ExtractLaneU { .. } => OperatorSymbol::I16x8ExtractLaneU, - Operator::I16x8ReplaceLane { .. } => OperatorSymbol::I16x8ReplaceLane, - Operator::I32x4ExtractLane { .. } => OperatorSymbol::I32x4ExtractLane, - Operator::I32x4ReplaceLane { .. } => OperatorSymbol::I32x4ReplaceLane, - Operator::I64x2ExtractLane { .. } => OperatorSymbol::I64x2ExtractLane, - Operator::I64x2ReplaceLane { .. } => OperatorSymbol::I64x2ReplaceLane, - Operator::F32x4ExtractLane { .. } => OperatorSymbol::F32x4ExtractLane, - Operator::F32x4ReplaceLane { .. } => OperatorSymbol::F32x4ReplaceLane, - Operator::F64x2ExtractLane { .. } => OperatorSymbol::F64x2ExtractLane, - Operator::F64x2ReplaceLane { .. } => OperatorSymbol::F64x2ReplaceLane, - Operator::I8x16Swizzle => OperatorSymbol::I8x16Swizzle, - Operator::I8x16Splat => OperatorSymbol::I8x16Splat, - Operator::I16x8Splat => OperatorSymbol::I16x8Splat, - Operator::I32x4Splat => OperatorSymbol::I32x4Splat, - Operator::I64x2Splat => OperatorSymbol::I64x2Splat, - Operator::F32x4Splat => OperatorSymbol::F32x4Splat, - Operator::F64x2Splat => OperatorSymbol::F64x2Splat, - Operator::I8x16Eq => OperatorSymbol::I8x16Eq, - Operator::I8x16Ne => OperatorSymbol::I8x16Ne, - Operator::I8x16LtS => OperatorSymbol::I8x16LtS, - Operator::I8x16LtU => OperatorSymbol::I8x16LtU, - Operator::I8x16GtS => OperatorSymbol::I8x16GtS, - Operator::I8x16GtU => OperatorSymbol::I8x16GtU, - Operator::I8x16LeS => OperatorSymbol::I8x16LeS, - Operator::I8x16LeU => OperatorSymbol::I8x16LeU, - Operator::I8x16GeS => OperatorSymbol::I8x16GeS, - Operator::I8x16GeU => OperatorSymbol::I8x16GeU, - Operator::I16x8Eq => OperatorSymbol::I16x8Eq, - Operator::I16x8Ne => OperatorSymbol::I16x8Ne, - Operator::I16x8LtS => OperatorSymbol::I16x8LtS, - Operator::I16x8LtU => OperatorSymbol::I16x8LtU, - Operator::I16x8GtS => OperatorSymbol::I16x8GtS, - Operator::I16x8GtU => OperatorSymbol::I16x8GtU, - Operator::I16x8LeS => OperatorSymbol::I16x8LeS, - Operator::I16x8LeU => OperatorSymbol::I16x8LeU, - Operator::I16x8GeS => OperatorSymbol::I16x8GeS, - Operator::I16x8GeU => OperatorSymbol::I16x8GeU, - Operator::I32x4Eq => OperatorSymbol::I32x4Eq, - Operator::I32x4Ne => OperatorSymbol::I32x4Ne, - Operator::I32x4LtS => OperatorSymbol::I32x4LtS, - Operator::I32x4LtU => OperatorSymbol::I32x4LtU, - Operator::I32x4GtS => OperatorSymbol::I32x4GtS, - Operator::I32x4GtU => OperatorSymbol::I32x4GtU, - Operator::I32x4LeS => OperatorSymbol::I32x4LeS, - Operator::I32x4LeU => OperatorSymbol::I32x4LeU, - Operator::I32x4GeS => OperatorSymbol::I32x4GeS, - Operator::I32x4GeU => OperatorSymbol::I32x4GeU, - Operator::I64x2Eq => OperatorSymbol::I64x2Eq, - Operator::I64x2Ne => OperatorSymbol::I64x2Ne, - Operator::I64x2LtS => OperatorSymbol::I64x2LtS, - Operator::I64x2GtS => OperatorSymbol::I64x2GtS, - Operator::I64x2LeS => OperatorSymbol::I64x2LeS, - Operator::I64x2GeS => OperatorSymbol::I64x2GeS, - Operator::F32x4Eq => OperatorSymbol::F32x4Eq, - Operator::F32x4Ne => OperatorSymbol::F32x4Ne, - Operator::F32x4Lt => OperatorSymbol::F32x4Lt, - Operator::F32x4Gt => OperatorSymbol::F32x4Gt, - Operator::F32x4Le => OperatorSymbol::F32x4Le, - Operator::F32x4Ge => OperatorSymbol::F32x4Ge, - Operator::F64x2Eq => OperatorSymbol::F64x2Eq, - Operator::F64x2Ne => OperatorSymbol::F64x2Ne, - Operator::F64x2Lt => OperatorSymbol::F64x2Lt, - Operator::F64x2Gt => OperatorSymbol::F64x2Gt, - Operator::F64x2Le => OperatorSymbol::F64x2Le, - Operator::F64x2Ge => OperatorSymbol::F64x2Ge, - Operator::V128Not => OperatorSymbol::V128Not, - Operator::V128And => OperatorSymbol::V128And, - Operator::V128AndNot => OperatorSymbol::V128AndNot, - Operator::V128Or => OperatorSymbol::V128Or, - Operator::V128Xor => OperatorSymbol::V128Xor, - Operator::V128Bitselect => OperatorSymbol::V128Bitselect, - Operator::V128AnyTrue => OperatorSymbol::V128AnyTrue, - Operator::I8x16Abs => OperatorSymbol::I8x16Abs, - Operator::I8x16Neg => OperatorSymbol::I8x16Neg, - Operator::I8x16Popcnt => OperatorSymbol::I8x16Popcnt, - Operator::I8x16AllTrue => OperatorSymbol::I8x16AllTrue, - Operator::I8x16Bitmask => OperatorSymbol::I8x16Bitmask, - Operator::I8x16NarrowI16x8S => OperatorSymbol::I8x16NarrowI16x8S, - Operator::I8x16NarrowI16x8U => OperatorSymbol::I8x16NarrowI16x8U, - Operator::I8x16Shl => OperatorSymbol::I8x16Shl, - Operator::I8x16ShrS => OperatorSymbol::I8x16ShrS, - Operator::I8x16ShrU => OperatorSymbol::I8x16ShrU, - Operator::I8x16Add => OperatorSymbol::I8x16Add, - Operator::I8x16AddSatS => OperatorSymbol::I8x16AddSatS, - Operator::I8x16AddSatU => OperatorSymbol::I8x16AddSatU, - Operator::I8x16Sub => OperatorSymbol::I8x16Sub, - Operator::I8x16SubSatS => OperatorSymbol::I8x16SubSatS, - Operator::I8x16SubSatU => OperatorSymbol::I8x16SubSatU, - Operator::I8x16MinS => OperatorSymbol::I8x16MinS, - Operator::I8x16MinU => OperatorSymbol::I8x16MinU, - Operator::I8x16MaxS => OperatorSymbol::I8x16MaxS, - Operator::I8x16MaxU => OperatorSymbol::I8x16MaxU, - Operator::I8x16RoundingAverageU => OperatorSymbol::I8x16RoundingAverageU, - Operator::I16x8ExtAddPairwiseI8x16S => OperatorSymbol::I16x8ExtAddPairwiseI8x16S, - Operator::I16x8ExtAddPairwiseI8x16U => OperatorSymbol::I16x8ExtAddPairwiseI8x16U, - Operator::I16x8Abs => OperatorSymbol::I16x8Abs, - Operator::I16x8Neg => OperatorSymbol::I16x8Neg, - Operator::I16x8Q15MulrSatS => OperatorSymbol::I16x8Q15MulrSatS, - Operator::I16x8AllTrue => OperatorSymbol::I16x8AllTrue, - Operator::I16x8Bitmask => OperatorSymbol::I16x8Bitmask, - Operator::I16x8NarrowI32x4S => OperatorSymbol::I16x8NarrowI32x4S, - Operator::I16x8NarrowI32x4U => OperatorSymbol::I16x8NarrowI32x4U, - Operator::I16x8ExtendLowI8x16S => OperatorSymbol::I16x8ExtendLowI8x16S, - Operator::I16x8ExtendHighI8x16S => OperatorSymbol::I16x8ExtendHighI8x16S, - Operator::I16x8ExtendLowI8x16U => OperatorSymbol::I16x8ExtendLowI8x16U, - Operator::I16x8ExtendHighI8x16U => OperatorSymbol::I16x8ExtendHighI8x16U, - Operator::I16x8Shl => OperatorSymbol::I16x8Shl, - Operator::I16x8ShrS => OperatorSymbol::I16x8ShrS, - Operator::I16x8ShrU => OperatorSymbol::I16x8ShrU, - Operator::I16x8Add => OperatorSymbol::I16x8Add, - Operator::I16x8AddSatS => OperatorSymbol::I16x8AddSatS, - Operator::I16x8AddSatU => OperatorSymbol::I16x8AddSatU, - Operator::I16x8Sub => OperatorSymbol::I16x8Sub, - Operator::I16x8SubSatS => OperatorSymbol::I16x8SubSatS, - Operator::I16x8SubSatU => OperatorSymbol::I16x8SubSatU, - Operator::I16x8Mul => OperatorSymbol::I16x8Mul, - Operator::I16x8MinS => OperatorSymbol::I16x8MinS, - Operator::I16x8MinU => OperatorSymbol::I16x8MinU, - Operator::I16x8MaxS => OperatorSymbol::I16x8MaxS, - Operator::I16x8MaxU => OperatorSymbol::I16x8MaxU, - Operator::I16x8RoundingAverageU => OperatorSymbol::I16x8RoundingAverageU, - Operator::I16x8ExtMulLowI8x16S => OperatorSymbol::I16x8ExtMulLowI8x16S, - Operator::I16x8ExtMulHighI8x16S => OperatorSymbol::I16x8ExtMulHighI8x16S, - Operator::I16x8ExtMulLowI8x16U => OperatorSymbol::I16x8ExtMulLowI8x16U, - Operator::I16x8ExtMulHighI8x16U => OperatorSymbol::I16x8ExtMulHighI8x16U, - Operator::I32x4ExtAddPairwiseI16x8S => OperatorSymbol::I32x4ExtAddPairwiseI16x8S, - Operator::I32x4ExtAddPairwiseI16x8U => OperatorSymbol::I32x4ExtAddPairwiseI16x8U, - Operator::I32x4Abs => OperatorSymbol::I32x4Abs, - Operator::I32x4Neg => OperatorSymbol::I32x4Neg, - Operator::I32x4AllTrue => OperatorSymbol::I32x4AllTrue, - Operator::I32x4Bitmask => OperatorSymbol::I32x4Bitmask, - Operator::I32x4ExtendLowI16x8S => OperatorSymbol::I32x4ExtendLowI16x8S, - Operator::I32x4ExtendHighI16x8S => OperatorSymbol::I32x4ExtendHighI16x8S, - Operator::I32x4ExtendLowI16x8U => OperatorSymbol::I32x4ExtendLowI16x8U, - Operator::I32x4ExtendHighI16x8U => OperatorSymbol::I32x4ExtendHighI16x8U, - Operator::I32x4Shl => OperatorSymbol::I32x4Shl, - Operator::I32x4ShrS => OperatorSymbol::I32x4ShrS, - Operator::I32x4ShrU => OperatorSymbol::I32x4ShrU, - Operator::I32x4Add => OperatorSymbol::I32x4Add, - Operator::I32x4Sub => OperatorSymbol::I32x4Sub, - Operator::I32x4Mul => OperatorSymbol::I32x4Mul, - Operator::I32x4MinS => OperatorSymbol::I32x4MinS, - Operator::I32x4MinU => OperatorSymbol::I32x4MinU, - Operator::I32x4MaxS => OperatorSymbol::I32x4MaxS, - Operator::I32x4MaxU => OperatorSymbol::I32x4MaxU, - Operator::I32x4DotI16x8S => OperatorSymbol::I32x4DotI16x8S, - Operator::I32x4ExtMulLowI16x8S => OperatorSymbol::I32x4ExtMulLowI16x8S, - Operator::I32x4ExtMulHighI16x8S => OperatorSymbol::I32x4ExtMulHighI16x8S, - Operator::I32x4ExtMulLowI16x8U => OperatorSymbol::I32x4ExtMulLowI16x8U, - Operator::I32x4ExtMulHighI16x8U => OperatorSymbol::I32x4ExtMulHighI16x8U, - Operator::I64x2Abs => OperatorSymbol::I64x2Abs, - Operator::I64x2Neg => OperatorSymbol::I64x2Neg, - Operator::I64x2AllTrue => OperatorSymbol::I64x2AllTrue, - Operator::I64x2Bitmask => OperatorSymbol::I64x2Bitmask, - Operator::I64x2ExtendLowI32x4S => OperatorSymbol::I64x2ExtendLowI32x4S, - Operator::I64x2ExtendHighI32x4S => OperatorSymbol::I64x2ExtendHighI32x4S, - Operator::I64x2ExtendLowI32x4U => OperatorSymbol::I64x2ExtendLowI32x4U, - Operator::I64x2ExtendHighI32x4U => OperatorSymbol::I64x2ExtendHighI32x4U, - Operator::I64x2Shl => OperatorSymbol::I64x2Shl, - Operator::I64x2ShrS => OperatorSymbol::I64x2ShrS, - Operator::I64x2ShrU => OperatorSymbol::I64x2ShrU, - Operator::I64x2Add => OperatorSymbol::I64x2Add, - Operator::I64x2Sub => OperatorSymbol::I64x2Sub, - Operator::I64x2Mul => OperatorSymbol::I64x2Mul, - Operator::I64x2ExtMulLowI32x4S => OperatorSymbol::I64x2ExtMulLowI32x4S, - Operator::I64x2ExtMulHighI32x4S => OperatorSymbol::I64x2ExtMulHighI32x4S, - Operator::I64x2ExtMulLowI32x4U => OperatorSymbol::I64x2ExtMulLowI32x4U, - Operator::I64x2ExtMulHighI32x4U => OperatorSymbol::I64x2ExtMulHighI32x4U, - Operator::F32x4Ceil => OperatorSymbol::F32x4Ceil, - Operator::F32x4Floor => OperatorSymbol::F32x4Floor, - Operator::F32x4Trunc => OperatorSymbol::F32x4Trunc, - Operator::F32x4Nearest => OperatorSymbol::F32x4Nearest, - Operator::F32x4Abs => OperatorSymbol::F32x4Abs, - Operator::F32x4Neg => OperatorSymbol::F32x4Neg, - Operator::F32x4Sqrt => OperatorSymbol::F32x4Sqrt, - Operator::F32x4Add => OperatorSymbol::F32x4Add, - Operator::F32x4Sub => OperatorSymbol::F32x4Sub, - Operator::F32x4Mul => OperatorSymbol::F32x4Mul, - Operator::F32x4Div => OperatorSymbol::F32x4Div, - Operator::F32x4Min => OperatorSymbol::F32x4Min, - Operator::F32x4Max => OperatorSymbol::F32x4Max, - Operator::F32x4PMin => OperatorSymbol::F32x4PMin, - Operator::F32x4PMax => OperatorSymbol::F32x4PMax, - Operator::F64x2Ceil => OperatorSymbol::F64x2Ceil, - Operator::F64x2Floor => OperatorSymbol::F64x2Floor, - Operator::F64x2Trunc => OperatorSymbol::F64x2Trunc, - Operator::F64x2Nearest => OperatorSymbol::F64x2Nearest, - Operator::F64x2Abs => OperatorSymbol::F64x2Abs, - Operator::F64x2Neg => OperatorSymbol::F64x2Neg, - Operator::F64x2Sqrt => OperatorSymbol::F64x2Sqrt, - Operator::F64x2Add => OperatorSymbol::F64x2Add, - Operator::F64x2Sub => OperatorSymbol::F64x2Sub, - Operator::F64x2Mul => OperatorSymbol::F64x2Mul, - Operator::F64x2Div => OperatorSymbol::F64x2Div, - Operator::F64x2Min => OperatorSymbol::F64x2Min, - Operator::F64x2Max => OperatorSymbol::F64x2Max, - Operator::F64x2PMin => OperatorSymbol::F64x2PMin, - Operator::F64x2PMax => OperatorSymbol::F64x2PMax, - Operator::I32x4TruncSatF32x4S => OperatorSymbol::I32x4TruncSatF32x4S, - Operator::I32x4TruncSatF32x4U => OperatorSymbol::I32x4TruncSatF32x4U, - Operator::F32x4ConvertI32x4S => OperatorSymbol::F32x4ConvertI32x4S, - Operator::F32x4ConvertI32x4U => OperatorSymbol::F32x4ConvertI32x4U, - Operator::I32x4TruncSatF64x2SZero => OperatorSymbol::I32x4TruncSatF64x2SZero, - Operator::I32x4TruncSatF64x2UZero => OperatorSymbol::I32x4TruncSatF64x2UZero, - Operator::F64x2ConvertLowI32x4S => OperatorSymbol::F64x2ConvertLowI32x4S, - Operator::F64x2ConvertLowI32x4U => OperatorSymbol::F64x2ConvertLowI32x4U, - Operator::F32x4DemoteF64x2Zero => OperatorSymbol::F32x4DemoteF64x2Zero, - Operator::F64x2PromoteLowF32x4 => OperatorSymbol::F64x2PromoteLowF32x4, - - // unsorted - Operator::I8x16RelaxedSwizzle => OperatorSymbol::I8x16RelaxedSwizzle, - Operator::I32x4RelaxedTruncSatF32x4S => OperatorSymbol::I32x4RelaxedTruncSatF32x4S, - Operator::I32x4RelaxedTruncSatF32x4U => OperatorSymbol::I32x4RelaxedTruncSatF32x4U, - Operator::I32x4RelaxedTruncSatF64x2SZero => { - OperatorSymbol::I32x4RelaxedTruncSatF64x2SZero - } - Operator::I32x4RelaxedTruncSatF64x2UZero => { - OperatorSymbol::I32x4RelaxedTruncSatF64x2UZero - } - Operator::F32x4Fma => OperatorSymbol::F32x4Fma, - Operator::F32x4Fms => OperatorSymbol::F32x4Fms, - Operator::F64x2Fma => OperatorSymbol::F64x2Fma, - Operator::F64x2Fms => OperatorSymbol::F64x2Fms, - Operator::I8x16LaneSelect => OperatorSymbol::I8x16LaneSelect, - Operator::I16x8LaneSelect => OperatorSymbol::I16x8LaneSelect, - Operator::I32x4LaneSelect => OperatorSymbol::I32x4LaneSelect, - Operator::I64x2LaneSelect => OperatorSymbol::I64x2LaneSelect, - Operator::F32x4RelaxedMin => OperatorSymbol::F32x4RelaxedMin, - Operator::F32x4RelaxedMax => OperatorSymbol::F32x4RelaxedMax, - Operator::F64x2RelaxedMin => OperatorSymbol::F64x2RelaxedMin, - Operator::F64x2RelaxedMax => OperatorSymbol::F64x2RelaxedMax, - } - } -} - -impl From> for OperatorSymbol { - fn from(op: Operator<'_>) -> Self { - op.into() - } -} diff --git a/packages/profiler/src/profiling.rs b/packages/profiler/src/profiling.rs deleted file mode 100644 index d758f52d6..000000000 --- a/packages/profiler/src/profiling.rs +++ /dev/null @@ -1,56 +0,0 @@ -use std::{ - path::Path, - sync::{Arc, Mutex}, -}; - -use crate::{ - instrumentation::{InstrumentedInstance, Module}, - measure::Measurements, -}; - -use wasmer::WasmerEnv; - -pub struct ProfiledInstance { - instance: InstrumentedInstance, - measurements: Arc>, -} - -impl ProfiledInstance { - pub fn from_path(path: &impl AsRef) -> Self { - Self::new(Module::from_path(path)) - } - - pub fn from_bytes(bytes: &[u8]) -> Self { - Self::new(Module::from_bytes(bytes)) - } - - fn new(module: Module) -> Self { - let env = ProfilingEnv::default(); - let measurements = env.measurements.clone(); - - let start_fn = |env: &ProfilingEnv, fn_num: u32, block_num: u32| { - env.measurements - .lock() - .unwrap() - .start_measurement(fn_num, block_num); - }; - let take_fn = |env: &ProfilingEnv, fn_num: u32, block_num: u32, block_hash: u64| { - env.measurements - .lock() - .unwrap() - .take_measurement(fn_num, block_num, block_hash); - }; - - let instance = module.instrument(env, start_fn, take_fn); - - Self { - instance, - measurements, - } - } -} - -#[derive(Clone, WasmerEnv, Default)] -pub struct ProfilingEnv { - measurements: Arc>, -} diff --git a/packages/profiler/src/utils.rs b/packages/profiler/src/utils.rs deleted file mode 100644 index f25e3d5f4..000000000 --- a/packages/profiler/src/utils.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::collections::{HashMap, VecDeque}; -use std::hash::Hash; - -/// For KV stores that keep vectors/vecdeques as their values, provides a way -/// to quickly push to a vector under a given key. If the vector doesn't exist -/// yet, it's created. -pub trait InsertPush { - fn insert_push(&mut self, k: K, item: I); -} - -impl InsertPush for HashMap> { - fn insert_push(&mut self, k: K, item: I) { - if self.get(&k).is_none() { - self.insert(k.clone(), Vec::new()); - } - - let q = self.get_mut(&k).unwrap(); - q.push(item); - } -} - -impl InsertPush for HashMap> { - fn insert_push(&mut self, k: K, item: I) { - if self.get(&k).is_none() { - self.insert(k.clone(), VecDeque::new()); - } - - let q = self.get_mut(&k).unwrap(); - q.push_back(item); - } -} diff --git a/packages/profiler/testdata/hackatom.wasm b/packages/profiler/testdata/hackatom.wasm deleted file mode 100644 index 1e7ea8c2a6ac76af2c9227b2e88c2d45e1ed502e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 171952 zcmeFa4Y*y`S>L%o&d0s?oO5;bE!#@G&%rcTgH$WjksM=+wi?;aU>ZZsjN!@DGPc0J zavWPxJPu^6>qc>uL;(d1C}4sDnZyY;D5)vR;7$bN_7TMN5#SC2Tq=qSqIE!kpVlc3 zncx3?*V<>Fd#^t2K<0U{l6&@Ed#|6@Qz1 z9^^mn9<-JP$AjuNe^5W!U#8uB$36GA@A#fuckQ_Cj-;Wx3GV*)U3cx?k)*nvw1;nd z`~5qTrtW*U-EqgRTkpT^?z`@|jd!fdQY*XtwtL=w&t13k`lX-}$!N?y1W9 z@7Qtsz2EqTO*>zI>-{@+-SxfiN;18=W>mau$L;jC>(+bU`8_*#yesMH@$`;6zVQuj zc>Np4>a2)`-*emU+wUBE)VyQI_q_A_9OBM>@7%HLUANwT=WTc01H8YU9m`sIyPdcD zd7h_f+OnTk%1z!(CY#L(rmo3<{A6j?;+3?W@-Wr^xNc2PG$&d~mf3qbf6ww?p0}x! z@PBJTO(a}3XrZ0ATKUwHsj0k`G(<1zTJPpf^}~Na#u%2ifH7@#TWQh=ujF~NnNAAA zM%qkQ0BqW6G!4|G5&p9Vc)|WNa!k?*LBZtYdDf=wBxMYfZ4IHFu&h^N!uO-Lv~HQPH=zcRaA;_IGmi9Zj39G^}V;#cY0xb5Cszvs4h?8vjpUk1Nr+WG$VKazbQ{i*aHe8V&8&!ks= zIQ`-DN76^qA5DKO{qgi*`jPY}(w~HTZ@7Nr=6|%|4c~ax$I?UT7qYK^-9Mkb>+bdc z$3J-6y>H*S>&o}0d((}Z-}#O=?7si@4`ko9<8^oZZ+Cv*_P2ibZQr~86X}(YrJqb+ zxBijr^VzSZ>#zJm`s?ZI{$qOO8=g)7efrz!^XY$1|2X}VbmMQOue*ru$Zvg`D?XqRcfXHN!g-q8K* zu(>IlP+3y6XUp~1BuS@8%jBA*VReUXJ!yLVrq_?%SSLK3Er(RI?uTi?OV%juS=F6o z_HEXCv&`w;fNoY*0WrHWNxq5t?J}D!GX88x=$_%xR34fN!zh|N%QUu@X)Ft2`I#53 zH9et$Y<3gyx5{F+$ou*z{<}||CjCe3Sdn8&!wF*9i-rtNBuIrzOkiD z2B{F*QiH8>tt(~NoB$sa-+I{~Qw0Fb%Qds5HJhvT z6-8bofU_y<3&OnA6~ELJBILq$PNpU|aNBbz`0IFwmRIHHV>5+Ow)Vi~P-An;8%E)~c$4+`NB0yA=HA zv?OStUYC_91&PbzZ_QC#FVBQLCg<1>t*|HM?L&QxC z)BgXRW?TH9xNVCG6J9x%NWd9O!*Da%n}$tzdk;dlxqE;#+%`zd7xo_&Uk|3N$+EF) zFpzu+P(W^L3yr@?p&A?}A+5fz;KLB0VgByx`Lvq74$y!|j z&8BRPkHcimi>UQd?0_tp4#T*v*VNS-LoAio0#h31C6g$y@i!=|L_vz67Jzy(KsMSv z;!hw-Ary@fh{*o6R(Ck5Cz%F_u=M(|8|#FJK@_Na2~LRu6T)6~XW5jpQ0*4IOUVtg zs_L*)eu?4DB*~^EDLOz~ewq8Ajno?QVXQS%J!;KV&vy575R|Hy|)M zjO_hhUB)?9sril`=#DH>6aCtT_LYUn?gn%5JWl6Yo;~50l<}` z#?)?T%m)8fAN(zjuzq)mni~yb3R5SxMol#6stQSl$~$C135U#yaM$SW5CK6_tbqQCPMjgMB7wA_QK7GH!?CRQ8fv4G^m0lNDxH0Iu z!|o(^IF*2ez(k9hz3F0!8Bs|wEyHa|WqNrn#3b~Koj#M@VC37AC0IT?V$S0gbIxQp z!bAYxkg?|s&-usiFvPx5tOajW<^lSy&pQNxCvJ%s`b1mt+*+p2d*Z#nkk|wA04yB z4fb7$y2I`0rQW$|3Z;*~=$|eT6*pres4@GE)DTFPR#tnHr@`gtYt*W^VN1918l;4Juqktox#M`WU!K73BF1Gzbp)T-0m8?WAs8t!!0i}icC32%d63aS#4~L zt52ugHXS(yk~2V6XmGvN8r49t3~w}b%ZXYPe3|)PW0+Z^sg>9bmECY#rOHdAt<~uA zR_I5x)|8nABIeRTSHJH@o$>R)02wor?G`~mb+WTo7Y*52sTozWjVe2)=98fb<L9oLs8e!ZN-NmYME=euYG6 zxFZ8K@X3l-u;2p!cmm$Pc>;lu7L4xk;v}QN zBOG`ZhELPTj&(q$7`v?_WaT3^y@>u1c+Ea!KY~W22_c9ym*@v0&4iQnsm?|eqF13J zz1r)t0^q~#^f3z6piP1yB@nR(ZGr)7$j{ZO4GH8v6? zjd+9>Wlr(1Zca6X!U-WBkD{28myyXWD5m<~q_XYOEi>7j1At#@cDNQaCS;7HvM^W5 zzfWahE)mdaG5JKX?1`<#!+SU9D4U}9M9~hn$QcMRqY*-&Sf(gDwGdU#B@Utd?p_KN z0lIsb1_jWI+tHgpZ^Lt)i}04c6)=@>gQTq^kv`3Ik%QkDxe^%sawU>nDl!SK#H1Kb zF>U=$8slNa@fPF5l}OE%Xm7)*m8qD^PQ+M~Y=hg9tq;vBuyk_5tMLA3d3{Y z5ZtFi%a&k^;kpkc-ztpVjomK8E*SRpHg3(uFx^I({3vy3ilQJc?vOj4g@3b;Z471} z8!BY}idYY&ih%yxENzCkn;BSc@k6i~^Pzu{Mn#PfEqW4hZ*hoB(`{i05s%nQI>bO9 zKo~xv0rBCPtSfVfXubq-Mw>051_9Oy<4FD~t*1zIs1hAx>xqR#H6{J;95(Qy@Pf2Z z!D1XOdaT&z2N;+zW=h^vL;UGi{t_6`BnnUsTYY*ITBwpbOUmi0ntUz_z+0%Mh;-F} zoHaFWy=BaYmOc$aEsO4*%t&mItvXlPsu*GNpCTp~{}oncqBSaPzj2tC|L30B>91>~ zma37S>Az;$vPk$ppT*cn;(tw>U7MPJ$uw+8q&a=|CI@*AwUq0x;|~_&E`A6`?ZT$; z8Rf_8n4YYJlhCALE26^cv#v~FgDDGw(TUqqrm1C1vFHLbq!q2duL+NX|Q>w-Ux{ zve8gNM!<&T^)mN+lRPq)XJ&+wnTV40XGRHR83%kulvHnAFiNCa0!rNan2!=0*TtcP zwv$r97HRu{VWuDuuoQ)OKj;Wpy*`B|G6I@SUzu=CJep$+AT8kak^Sx?5@1P&CNQ9Y zb@@%2u`Rq+iIF&C)_^UB*;N!n!MKyVc|lF7f2=#C`3JHzmo(qP`lj+m^pA%oUlrI* ziD^dpnwg6#`Rb7yIF>L!@|ERQtwk!M=Y{>YvMi!*m|U!uBXcY0f6B~f8=|d!8s02R z0#!W{r(y*Y#6bqa_U--T5nn z89GA}`SV|w_4hO_dXV|LdtM&Ju+u1QG2;j~RwQ>Y$sQCO867F+zGm zDS)Jt=>T-hWY5VY<@ZDiVe7 zV)5m3erYQ#0Nd2E#gwufVzvJ&04DlptfpC&_OrwY8)k1?Z;g9X%u0O(s9AjT*mfA1 z0{#IA!4q0DcxcU9J)Sbdz_noL$Wuk}9o7KodA3IgHZEBC{P~i|@l;yudJEnhs8PWI zqXO)_2B2smWkd4eIwMgOs6p=3q%8?C7wVGiu^%@-2!0WZ%seu(&Mg0>EVHzET94GJAsITB#LdV z)U;2_>wpm zRec#UkQM$?5V$WHc5DsfB}I69TAc_z&t+z6h3ffB-m@r93~4=cc`%#J_P9J5PQ^7m ze{O4d;M!7_;Aq1CCVr;;b&Nrf8%2N#@5pmj1D>Ns;7D8CamZv`P=0_h+MIN=@#x@( z7qi83f4X+o7jtZZjX+3JnD@5ApUR}OGI@qXsC}*dEJGaOXR=ycsLhX2>`6E~>d5Ui z&Rzy;Hzc>!3i|S;9w>AW<1A|4<31pUE5)cjI?~BNh4l=;;IWiE4z%Lj+(n&E$Z!nB%(FPZ` zSG0OdMXcS+MF<$Q%x;wW`!cf(thy|JxZ81oN-Ui<`i_^+UhhuNkt$5!-+FaCx!%=Gt>}NCg7zFCFU=b?gx- z;t{THM^fJqiQZani#1uX{F7Mlm6?)39db%LZOI^UN9D7DOUv8|pBF zsO{XbpCGPhI>G;uMi7)oWUxdo@_#eU|Dw38_UkF@RSDppei5jjvZj7c?hX;Z-P z%;V{Ds|-kjPLbL`K8uCSK+$<(fY-nRoFPzx$&C(8*a-Jaihi)FmDN*_V4!XQc7*py zPwhExyemW7Oc<~e@_G#ENe$^@KNmiRLd1r|A?^gu&O)5@Y~=$978X84njs%Yr0G^z zE-UO=5jB`So?@wyob!VpKw)VI0pssqvNi3eqE>*##o6%>g1rb7vhAX|Y^qS;#G*8la>C9F>S6wQ<=UUC_4=TUsYOa9uX7Qk` zwN2R#cKJH4Zm}z+`rO1rqZ+Ssnk8)L?6v($quXZvg_<5PC&fBW@c`@$bT{(GPOOYBm#q|`AvOFszb#G)-O)}Xtb)P#`SEWKqEP4nWAVQc}R?H;3e>j3Q&GK?i7;s@j%+6WcDPXjl1VGKv?Xs~VhJrg20r{A^5% z^vjxktzR>EZ&9=bt{L?!n_z-|Spq(5znC-`iLxl$MPD=AXhLy>>Pg3lK#zks;%z1u z5JNS(Ldnpckf3;o+XU0wV5hct!R$zl-NdnnLwxWyrVDQueo(uLJw|p7X9+Zd;nTEZRAX(1nzCzgQZ~99cN#7uL-jbPF_W=H(4yk6>Mf3}$gVDq14SSoX$2 z7W!^@vOO)DNI!#-DS6qzD)dU0#mtN*hIva^$G*V^v`h=1aEwB-9Ir1X?z4o+>GJHJibz-)EBrTGd zQCO+bs80E{tk^Q$$wG#?a_lA6vNX9DVm!;$$XOY)jH~`YiiCU&Qcs9jY5Tl1zBYj> zoC7kgLiv7=C$Qz6mkCjYEV}b-_?oeH9cDpE%wBU|>*rJIr`W3@!d9&;;u7s)$ z+UI{`RSlX5L1;_{@H1V(sP}ycdME5jRbEu>9WB^nLD2>6Z%A(J|0`p%SP|3o#{^Ti z4ilLy7YUOOchUZyHe6$dI=!olb=l1_MImCWN4c+AdCs?pcAv*vmVj{1wh-{(mA7AK-V(1bPX6Lx+?^zT%U#FDcS(I4>+Syq+- z9Qj}Y{n#8-yz>P$o7cf1Kjl2=XK`?p^gE*I-ya8Oaq@b#N#fi@C_#Vjx1^_)mm`tX zf2}ZrmCjBn%aA;GbxWK@lV$SV<}uA$(>3RA!;Hdn@&P(Clg?bcCuM!G-`dTU@E%Rp zA-Z;Rw$@Dc@E%gu+gt2C!6fD|890*JXr(B#1&?Glf!;3%naxwlYyrAuCx1MN&|FCg zl6+#wrq8R3dJ2j*ed0;j;I`~kcfeGKdM!0jC+ccwiO*cI;v@Q3TBC2Q&^9j_3)aik zo|uHt{P6oA`hTl&LahDE%hZA?mRp5p`&=G18%NSevC#^Bz5~DDT-}kRu zd@qo-?WrH-0cBTc68Z}!fdWmG`*e7nban+@%t+B`<30B{pBTf!IVOxi00*^(SE%9S zj15!q+&D-)T(S_)Mq=vP4y5^V`nQ}|^h+0*SQLy?$$eI+7FP86BB6LSJQdha8hcCYjgA3{-vRC1q966c1szQj266l0KI60LwnSM&gEF7 z|FG{~PxKN3)+AMf2#+IC602*xm~(84FzDz+!3X^LCUkDy<^#bDk5gNO!c)oJv!r=7 zwXKZB;Knv3VQO*|KGW8LIlm;Mg|{trx8qcVo1$KYKKX+}pPoog+C7j?sKiLh&*pM~ zJIs1!^6|`n<1hl%KB7dTR(WL4?65~LQb}kslnNGzN%Qyt$jI>IT}poAR_s%qa_x6#;^k$1vrilU6{99U6sy z^QXsBofoEhoS|hoo#$0Akb&1TU1uEBES7TkLd2FO)d22$m< zHX@%jVKJg3I1Y}}aZl5^iEPEQBX(h%5_!;Rt9+CABuL=U!(Y7zQQ8Rhxc4w6@h6(T zCb>IGLf;ExqEaEK^1rLv6iwa`+{db_wQI@CrSE&=rJHB_w)x6mf=Vov4FPedI=Wk4 zrulPfzghnILXg;Mbxx3~-T>Eui8>#w1iz_O-dLNcvtgy`@JG~P^z?mzsLOLs!=fEt$37$COe3`LzQMaNR*$j(q~SNEJfRoNMnV|K>f zR(CiJZ55XEn3EJ#w=)z)wuf~)V^S|!qa2}NPj{9Lw=>vbhKSVxVLAjeR2}w9O)Qx> zIt#21wB^roA4IHLYtC!U&H@uGvN`6p77zMSJ+n4UgxzQcMqBBfK6QEjDO+p_cSYOe z4S-=D!aa2(WHi&iqM6{$dDARQW%SY_)2y91^;i6;5qi9%CUfS$bWELz*zY|zu}^fA zgWz2>%il0C#|XxvZRZfqXJEl-r#TBQI=b;!79HIgD81cLP&u<5kWG(Y+$+1h8}zUX zc=nF+&ZCy+ZMK8LdXJEqy4#-xR$sMsxlV_@JAw1PywDlXcOMa^G z#vIX75bDPDZ z5NGU7?~5BT;ymEt8sCf%Rv;A=Hq(?#!VS7yb{0Jsn|d|vun7qXjcIaGJM8x$YnE~4 zi|8oN@;`B3v%@AY+74q@5E9GCL#)I@b4)zAm0A-E6CmlN1<~tsvY4s%)xeWEZNihB zHlO=yZnysBum8#){n(%X&M*C$Axd+MnSYT6Du|IeO8#dhyf3Cu|3axdo{$JvoBXrxWoP|qS&+{!~%`(P% zNVC;hT`gIicFJPTjB#Bo(XQVz!HcS$vnY8_?D4uDHf)gOB!Q#^0Q-YV7Z?;|P%kPf zuF#?)t!z|OU1r5qydIVD*P7FB2Xo40*TI}3(3;cFK8(*0CJD+|=K_?!$bImCQa9VU|krvK>us}eoTtgh7&GsIG z05*s6|0i(zmG#YBz$O!H_ZT~pn@7$-6FOf?M@e{aR4k<<1M5zIV=UBzDa*zHwc0oLu^y}=el06 z)CLuAwqO&BQ#uRCY}D}+MFnb5uqGHZ`xXS?^k>C{B*H`)7C0EE3_}Ovc@#v-JQno| z!cZvz+JT~_p?eWi9z#-%h16L-|Es_G!IsQK!9k_5U{){-FEkXDpjn;m%_uYhrAeqA zx|$V!=qgiS3qb^xNHE@4)e~Ch(joWSXB8rhdo4%J^N=Ywd*8Y`vk*aKMSBHlc!ucs zZh4@Jo`bh2?+TZ9baOtz%(&p8*bk<^l1HO(U&P3|(fd0aU0MT*x+63jv;Cp);Nf;( zhq4i$c|=#ZyQ7_J3eJlrN2@N$aOviJE-mWIE=zsc#qeND35$Te!cAhg9RZ$J-TXpl z?Un7QK^tJaQh$g-yTaEId{OJna9`_+%U?r5)myodRp+XQg-cXd=$V0D9U6=ru|tDb z=n=ROIr%C@1vh(f=7>ECy#&b=edo&doyFxOWTgenV-?=toF5SOu$Z2BKO*T5sU#s( zTTnV=+nxVMD{FeH#PRyk+D-bKcj&w+G(?9a>R71KC90m-iG3zf#iJoqS;_J zi&&1thshQ(z0-h2I~iyd#kPngR@W)YhCRWkzdR;2u|F zwwH37NyaTW&$|XqG#Mh^PM)xqnZwGf7uQK(t54-++P#IZ1(Q}dU6UDTwq`-MTO={a zQ&A=+N05`OYruH2E<>>NTP=;3=!4q%<6(sM_~TM>LKAwd_Kul8S4liAJWzVQCCgi$ zFE*Dtzc!qUJtKfv_F&ZBVANocQt6o0IyW>m(q@c<EWw5w)fH@3|Nh5j8%$$1> zb78}__~q@I=rKx@mh)!inx4DaLce`Bq)}g(<r>{BasZ2VUE-5i zE-jXVnSfLgrouDNmW6Y>A-rRc(E(o7Q(q+zYLA(|pt7!wWN1p`Drqc>qhJ&m&tn=k zf@z3pz>Ztj@uu!L27mEo_n`IcrA0b0!{|&8&4aUbbvwMMroa1(udBzb3A|I`WWE;6 z6IXL2P6ai$qMkLuN}%L?rR6vqW+N1Wa1Z%_LSs$C>7a|w%gfTP(*93!rce%#*_qcY z;=U#mi;O1NQs^ZO@gl`CRYIh;6r<*cau7Vf_eRzjO{}JU+iQ>EuZmj=LcAtV$@W;< z(pYNE&15%<6c7@&J>F6m!(deA(U;Bny<9U+%Vg}oUtD%O7jpH;arY1cW z1XSi(Vm)d?Y*HBLTsqxIvm9qe!`_=J0YOLyY>=jFWgy^xJCgl{FfMz6UMxj{4M|o- z4G1@WzMQVDfzAarFjZ?{${WBlr~p*dJpwrCj}>mOZyL#D^cwPNyGAsV+BU)#7ZI3h z=rp0>pXQn9wH*^;~CVeMJ9D@1*(H&10MW@($1xJl!er1Y_VT!Q3$OaCYqV=+96NZdAcDWeT%in3o>$I^!bHvN1D*|en&O=*_)1*G|p8HNOqZ^~*Q$6I!Q zg8)H}Fl~1Hx%b7q8927D0B|4{fx{UR2Q&i$! ziFT(5wbD1>)u!qbA2^zn8>k`dT@sQ}Y3N>IgaLCju6|wD+Ln)QP`f8Byl^1rZ1|Dp zsb3X3oOHS~IhkgYe5JG1oYzz^6}y5T_ouihArvpH`CEy)8TSfCZ00AnU8Bv|6T`~CRm3Z#^eeefvE#^e5v z$ptgN@TpGPf?y3tN*n-998C+1o~@|dJs|K5#1`?H1_~K596y<3F7b4ha(Lc|)(s?Z zZYFI5D%Va7Q4U@Xhq6T~$DWbiGRmvHp-BjQ0K;ht0WSsG(1M;@6v7zNxQ_$!_0*)s zRsJ4u=Tfk6H=WOuI-FiOk~;pa2%$s9sHBdW;dowbY8LDpt;KX3M{exm)^sko7wks* zU;D7<4!aQIr~mq=-BLWSfK=tDnm24aT{Sdg&9e@TD%GS&UWZ8miK?IZv{e(oa9Zp2 z(@}jSvg(^jZA1uJiUPFL!QA8kRDJr_R@3kCsr=QL{6ivbJTu-gWD9a^9ZxG?fnB91!ivH+%zsfSDZ@V1u2h5U2GXEphT?3^nqskOE(|NC z5&{vfbt(+&VGsx&sBleCJ?H5fqDloZ7>CJ5Fw$*-bJhfqd+w zX-d}6G(S-fE;=qE$q@}}mCTz2E@2`$kJyGcb_6$JVvP|CAmv>XWV)2{^0SlUV-$qX zvcNRm*2xo{O(KiK1h^j<5!B-7tv^WlG;kEp_M%Jd*dEombY9zKB;uGBLZuU;`gc47 zXhlW(mJdT*{4EV92=bt=D;m9^-sZQH#oDd(tJb z___2g8j?b^Iv#zl&yhv?ool>>A&D8j8_H_Ev8dtgAGO}>IEFEBNZI9uW%rk- z7X_z+HiF+PwK+Kg#;=m#MP&KTBGtEx0R?Q0@@gV<;&LA7^TlX=;Kj<zO;S~0peQ)=z#p6HWwTJ`>n?$=lMGOe_iN_=HuS`VYrw>%?=kzovd*+u3Q zA!X$Os5L#NVeX63J*%V=FV%A*hS9LI_cbpd#Ggw!dNPpKPAdpm(2}uJ-4j>UgvNWV zyaMsYBGXyTH}mX;{YN$PI+eyY-0>HOIUd-|xNHp|>@38^^0BeGk$Ri5$H2Q{rjPPl z9$^(=6W`&e8p31mf0jeaLWY!To1-|Ya&%OMhyamg8Kt;q-ZIyC!J7zlS@}jTADQ2} z(gT@t&dr{GAdYQ0w4w1_3mM((Wb!Fq{`JBgPGbE~XxoG{?^Njj*(fp);}{DWF^YvM zVw9K{F^a(}V#E*%#Q3v8080=BL9CMkOU3jEecaHq7@B#*RKfzs1Woz6f#p_0N{W~8 zu2vQCa3u`-CrzYE7NeKw@;f`yOhy<3Vv=?gi8Hz?bIOz+c~eE^YjftpYhdONcm61i zpCfQ5gXt%xh&7DJ0C$zM<)4s8%N04FkcV60)W)}7_Qcjx$%DhDP7K>t<}$pSpOlwS zn4tk_mlhn5Aj3A%r{&QiHbeGl`AoE>U8z1oxRX!I%OWAH$v85=}SvW?EENF~tzPdwPbCwbMw#$o}M5gmA zU-`um zWCAKXSMV6wsMF?@D`<-~y}S%(R;uWdVZ%BI@OevmzVeWJ<517MIfE=(I`%a{QPHeuvjipV&I};IJ)eh-umWq-AA#6)gp~ z-YkPtqStz${^VGbFi&-)p{zxd(w;aaNepD8#bgA#Myqul7G6MT#W!L>+lu|;nUmAl zv3SxXrjcc6nGX3k8C<|()Woe!`--W1oLh#9#o?t?z!%`3$1!Y;@>w1yJKl(NCfBvj5RbC7xJXUXcsd1XJ) zlGjHwYC%*@g;#V&AFqV2W<*>p9%jf0cnx7LYS0zZM8Pc{u>$LJ-Pp#;pMO0SrKb1` zRA&olqEibK@fjqzWjTEqK_=gnhJy&KBU`akdvU=olZhMpHZ?5sQ>jEUUp8fHG+>Kg z<}BAyag9C*AOf4qLdy(L`(I^v$i`dahBM+Lli_SDc|@7~6wm5iF>NJhOpqJz1Y3ue zMDpqx(nIQSNWsDbBNuYU`=A9GW|1?r)YEmT21yG>z|u#_T&NjaD2bxBi1Q|%zhttR zmQ=12o@}|w2wqU%!u>|I!v|jNY)DJwvcl?YNRcFfY;;$jtE(zMzktdrVXI+Au*lbl z3!hTS7{IwUb};;3b-V!;YVW8a4vC14ok&LK%e`!P8qcU#62p zi%Ds80#Q40+iIS%!WbP(nnT90fh_u3JDS1yWg40=-0&}$j=itr$eglJ9)Yqdg%N2h zQeKduzHtOPCoy%{@^d#vWCT81PI-ZNLVuzm6RxLImmyVXUI*-t1O%fAxD%IJV8^tJ z@a*hqF%n}>qaUnF=^invaj1@jg+G`Br7|`xNM9&O`X>01IY&YDAufpm1!|l-M>DY) z26d2|uvB51;Raq29rKh&0?@A*xcEmSwl#zOS>odx|I1^(w6dbnZYJ$^mbSxxdAr>r z2_#*oFRGmU_kaCwzWDpUbeh8{wP*#HwvwKf5B2a7Obf*!o>T7msqT}`C$hio`IiVNJ93NC^7oZ}C;Z?TIW=%xgv!$X zH#-B`XVJ7!LAA!2t2IW|j51UWK`~BNBVwvZNJPTa1hYeOFi;ZoBTA~M<}ZV;U5rmg zX=x@1fd19y87Ecn_O97!h;xen5>ju{@?$y&wI?!|WNKackX~WrIyy`B+sP7P%{47Q ztk*?H`0Tvikgl3Egv zSlhGtfHSJH^I~al*(knI9@fzE{x_EvMldo*Xm_N8Ap->+Y+1+pgGE?r4;4bEE>R@! zt2uuS;t4^9%%UtQkC_E1YLR5=e5WETdTvpCDN;yOUr?Z|F~BV4@P+U6z&PEB%wSC3 zTF}yx4x51Vwn73=_p-@74SmE*DUkA>Xl`OSQJ$dpatU*2k#6k-npuiTYn@Fw94R_Y z*$op)`b~!D7^>@dP^j71j1p&?%HOLR8`{@6o62PL4|C$St)so+^yYk@US=tliLls+5YyB-n>X=; zPk19g#MN%#XIkMtTtJHiZl@Z`(R{G}*QxI!s1{#|06~8uOtI^M8#vO#!w!$OQyyg z(kBH0#PO_t6?xRmKtIR07afrb(=4C&a%E_iY|MAEK_QlG1U}7ZW)j1?8dX=Uf4g48O>%woK_ z&$WW}szUNlr~*O+{7m+AI-JtF)sSuXTAOHZec#;N+-cC!V9&mIg>13@?A8xa>M5m7 zlD`xkeL4jaV#S8E3KFwP!!AIk%Rkqo)OJwEeK>Pn%V%O^U)IqB6z1*$96?c7fNO+2 z9a|+6PiR7Ix}jiJ%!LS6%oEGg$-M`Hbk>s7hS7@nx_U?p3R8#1Je4M+G0iLOD_OzT z11%*+G6%tH!3F+0dPV*s6e0)wbqo)eSQ+<_511I@uincYtjHbTK~6;VOWc$rZ~#w8 zkRT@eeuchb50=Ud;S15{Vgm@Z8N_g@OG~T8^k|kJuR~+aH?_l&Cjn~fys5Bu9ZHdW zp#ziH0;VXq!5N?f&H(W|I29LV@&c^RiC99G2#9+YLNr$!A_B5#OJN*!RH15P#1wm% zv^sGyh&qE9FiNS50h{PjMy&|~o@331tZiKzBJtRGqqb^fgK9VuV2I5!5DHOP<-!Pi1Y_Vh7M-+AM>ChOn2qWVct4(9&H)qB@KuVps7FDRsg!f_wZ_uf@;_`>M34&3Ku=TwXFP2_u(#_aFen5#(0zTsl zS<^IsH<_yrP@CV=30r&ttiM(u==q%?tRO#=7xtTK9GVwyTWlKoTJ6yGo5FGp0!sX0 zi(*)-l5C-1FTBfwnY}Rs`3el%EpxZ_990PM)6?v*2j91$ z4}qeHo!PZF;O-&ck^uUGpN&2YcDIR&7?2%j>3Yuwpu>?OIQhmAINGIyR&^BEQD4Fi zFQZe!qzQc%4+I5z!2AWh>Vh>1ONcOJyeej0H%iIWb)aTtMfD6BQO#L=zfz2iI3i=r zI3nW@f3iZt*XIJLD(3NrMSM7qTqn^Qo}nC=j(ba}qS|>&e4QW^+HJcSz_@Lg(bLd^ zphQ+jLb_pxGc+XkRYn9xW$eG>FTrP(^{h;KIzdYi%{FmrwUv!fSRE7l_NKYHLD&j+ zM&7TeXXAzo?OmQ{!|1aboPF1%VbS*r30-4_`d~$`A}~7SoPQf@7$IW~qlPT%W3`W) zm|!sB>TG?H#34FABWZ|)j5cWe%)msyLwvfobwv_|;l=-g zSkOf{)7+!5O%_1aHHd4hW)c9tW-<&ku_bWHMJ z0*tSQ?%Z#)mz2^E?sUYZyAJNjsF4>gUB1?#vrHG{eFt=OL>T?*wr}T(I{?ZqR z#_;?Kr@y+@6P~-LdZrSN(h$)+vLe_qzGsCuT&S!W9+`9%c zgmWo=QHcPRR(nprHE)h>5AcsUG_8?0$CtIW+uke~93j#12QXT~K`m+daAm;+ua7{5 zwgcex{ZRFYdqw|(rDLNrZ?0vow$0jbI?PC`JY*R1IWwqjV?%w`S{5Q`$xw^6U`JCsZ6~laEKyAf+#$HfvP!K>(F& zdxy`1=G)JkfFck)c4$h=e3ukYn6W;ZY8yTmkEDPg?-l=J9R$E2ZAsD2CDJ&oz-Z1j zl?n{){5>#2q8Nn|CLj)8+)T-1wGxm{$>C86eajJkR6~Nd`3n|f0|ICt*n^IUpMx;A zY)lo?TTlJ!hkpOZ_Wy@p`l7sj_$3CKI)U6EBkjH%C%1edxpnjzm$aJBev#^1a3mMj z=G{V9n)h*{?2Hp7BONXQ%|c?3Tng}-^dQ!680X`B_;&i-yGAS=f<1y%PQq*AppA_9 z;*`)aysRn(uS0}~uspn^Dg~3n*HAhl=1YKrE_^~ESrD;xAH=~K8-ycr{|byvO0gs~ zlZ&Q5z$@lTOJ+oxMNGM8Uy&bQS2OZM{P65Z5K{WM-cYo9+C;98Zp+T$5{foT2v_w_ z>8KA5NKhv;I;mc#7Yl3JjOZxaN7H%#jVfZ>Bq-wo{_%5^hp9^=DeibB+O$t7GIC|% z*@=$oF~#22BR;sMn=5d~11w7Bi{sQIgkYQirPUV^@2R9^M0aW?UR{=GDb6R8P}Mcb zb|?o~c@uQhnn~WDZAxyVZGvT>VLzV>^e7fsqU6$Q4l#X;wbk96A@;Ev9_2T7;&TBl zme^jrhM^1$Igf*-5vf^=`vtw$}UO)AOyalsY09C?Zbi5i3QQLjDYfFDqgF3uz=U)enk+ju&ZL=QMvWA zTi*jAZuG~@kqO;1J=3Mv3^L{KR}fUX|gI4rM98ow1C&qu~xw zXiS;5`jn zL&=Z{ES9@F#?{)&Q7cv>FP0H6)5c`BH*YIeVn?mDPfzi!(f*BQ!ZKo}x7sn}6R^OD z4LmCD{I;ai|EE-KZXxPg?jh7&Vi!XxY~7PB^n8rGDimmJnh-DEx|c~fYM4#LDPc`$ zQ9m}U&5!x9q0Cs6u@m_(Cw7ym{c`(0F4yc<9{t4q<=o$p$i@BryLNG279W8tmqjYB z>@vYqk;!VA^ibV!QZ#0z2e?xWW^34urQAb# zcDA~l3?v#pKvs!7cB8s|*C-$T@X-X%u^0!T%X5LC<5mMfS0D&1fiMv}Gu0x~Ss+Zs zQtkzUK&pXoJ)fa($x#;wm62B^kxAV1T*M@M)ND{f?!q0Xo@faMIz~f-r5=w3qF#Ho zK!juF;b|o5mNI3}u&}0#%}@XLOozU=qWmzEnz>(0TWRVUg18?f*GC{H;?*93!_VRn z(W)>LQ$;&mb&HB@qG&gW5oaFAZYf7wqUsT-VpF!AD>88(F%_zB&~D1^jq|gKk5Kd2 z%uE7zi)$L`-vK4EPUQK60Kc>r>AjMQLxykxS z-LO~)YarfoX%rsN#nw;!#!vj>e|h#(zx|0l*oe>vQsfhRJaCFw8h_f_`r)~`IljT{ zj##7`L*#tA7kbZ|W&m7l*@z4%wxkTEj3wN`lHAo8vMv)OexqDoRQv|6ktc4J z7+fIbT@PJd>7i>YJ>*YLrPZSsEQaclcsM=L1M|7jAgevzx0>)*MK94%I5--lhR8q} z{Ak$GvZwqUw7%ZxM|rO``jMBaZ#SQXel(xK+(1y<*P7iDG4uplm+&$)5TW3}nr*!m zJ|qsf<82NSI(|0-S1I6aJ2j)57SEIIoXBz zNp>ZteEe-$k5(e%z%HbTbpeDjKo^fHlt({^s``gM3*~9u97h}XfBGUSzJPqY(28?d zFXhWsMV7(BJiTH8`_-MXHtytwG(6c;#ju99ys-Bx2-P z#K`B*|ZQOkH7)zFm%Tea{+nkveZRY7ek z1p2t#!*yKl;rCcR%wgZMIhcrx{XMdoqFm;UXL63q_GWT^kMk*~F3t7VYVqzEh*S0& zYw5Y@_D~hn#*&3sm1;ie#v^jwTUR^qY(<8JVUc`l8>qR6PQ%inS4FoJdq9T z_qmLfEACHbgq+%Z4B4enINi#=mMkgc;=9F_o%}(=#8Y2VU-&F9>X(jA^D7fr$5;Bm z{Py$Q`jBkl-2t_O{74$mz&9xK;p3x9IBN0uN>)*6a5^@?$3>~~ybb1A8@Mb#%RP7| z-<&;{>GY~b`N9Z23-PBHPWlTqRI1$(Dobx19BEEiE+o;4)gEO%k<1w~`&br4S85@! zQ9cGpwfId#@`!?J5mIJ!hDG zsZ6volO46$D)(ixmgh0YuL$F%bXK$H2lWzTvgz)#bmQ}$l3Df}X)!68Mp}dabo{5G zAD=kr+1@9L>D#uA#C-yO6DbGn+Ja9LcEs^Hox1n?8m1?5T>;2!D@OroJXTKSC&I z5!zOio|jLKUY4764475v1ik}nI;4$UR!nO;`ASQp;H%xo#Vsrw8rP7uYb_sRdPZDR zp5%COqiscY>7v1BQa$hZD9z7g4|u{R9nEC#-jto-g4gEkJB-&P&*{c%o}lJI)g;3V z4D^>)wKZp>cYaFmkZU-4!O-z6nZcHY1HDxA|854>=w2%7KBnjJI2~@FTfSAM+he!@ z*Yz$@2Zo_j4Wl=6nwWSEX8IZ zbfd4TBa=0%C@CfV)B(6G85)0`odbd-XUvBAlwWE@@y{}(s8FKkOXKr z-PBkSmHrG+Qpikl2%0uu8*4(Ax^e=MV0>7O9YyvY}kDxlVce%ClqYk0IFc_W{^SLAz|(=CZ@8NRfOsiAcrzx%Y! z-&Ncx+-*Cw!ko@9r&7^uyyIw(W!B(2)OC8F30Kgovr8pSC0|9iC{Y!$Q0^x~Mnu+s z$+^%j!71N+IK^f`DZSC5rY$87*ezZ6ft%aZVJ^@Z0XBqfINQ`-V5oxu>9*eXWZZe! z;xN-m>)|z*vXlUX2;0Pcwlcqg&+{dRYc%Ljp{$dM=EkLqhQZUQVT`5d4c^-duOGqGTEu^Xz8PNhlA&Qhn2 zF81WHdr~BXVvG}`Q)VT`{d8Gb^gjJ(msGibKN%c(4o8LT+$7=B+&IgG**{8$uv(Y9^*aGZ~RAr7hK zSTxK_aLaIVWh=G`Akyn=e7`E>U2o=zS~EKB_nghF^=6E^QOf{^Yj5VKiA6S4yiAkI zK{a!9%3i^8VCf^w^0b^WC51&PsF!KS5G8@BWFY`SjB0;|=9CwnN!j2d0c2AyN~y@q z_G>WVCUNBG!L*13Mz1Zy;G^0j&er6XK2H@*Rx~0cK2&QJFy0!LD~2Tk{LHG|6wg_n zuj-hMW^tdhrIwYgK^MQoH!5ko2?nWeV^MrY=}IbNS=T=KZt0m}-H(X9ofcw=nue?K zl{iDC6OpJHYBA&oAlX<+DI&QKVXIZ~$oH8#W~L>mkO6~LanUMpZ)*|aNz z*|%MprNTQ92{Y$gQ;qil5_<@%(J-7=0m#~O)+F=C^r zC@&Z!W^$;?>(xF?AO#ICPWYv6(x*)-05 zp4IG5bdX2^AZIA^ROL&%gmf$3>3%f-<8*K3iP62+!ss-5qZg1C8Fe0aV{0ZSh2-WVPct8>rGA)fj&Sw&Vi~%mv&aEmQ@F7j@``E`3cD; znFOZB;DQMs**_>o9&N6Wn~jZz5CIn3=FJ#n&)|M4dz}4j+paic&f^8!dP}T!mo3k1 z(*Q|PrbUPB<$&`b$Bck*G)&3{VP|DzEJ5?`#nDJ`j8KW(L^;5@U>326Z9m1mzG$P( zP$EpS6q(;}gKH=ziV9MB`g9sQSVzkyBWYiS3iRmrW<;jbjRdq4T@cRx?VKQ(W4pE| z0GV|&5Xh@IZxnKlUqoTgQAmbN^x;lbLf!*Dib392bR^H@$i46{w4QHL z6-(;f4AyMhaX(Iy{fOy$EH`)Kq^-VQ?T_5K6JVVYKcxfhcw*iiQ6bCP!JC&e=K(Lo zJI@z)cnuOftD3|4oM{V#(?%hC2QX>E9L`fb<{HSx98LjvQ4Xj0;B+bvF<6?qFnx#- z(&`LEcqm1;H{9SdGsE?w*&`NUe7A)tn^LE^1;PEKB8+5aD8{)i6%}=-cQB={-z}Bl z0y8u#5o23;8?ttU4Q=o=R0#Y3uMCLSQbi;7)5aA)B1$S|cA53O$LbA;B`WI$cogqI zlPY+pm#yAYnJz{az)_t+Nc&iG02~D!b3lSuLz>aLisI3`isF%xjf=-4)Dk(#_({v( zc^|N^<`#Df
c_ku)%8BKIN{c;bXUT;?2&RG`e+VYuAOKn9FSJ#@SXQ1obH|7v=%5wkJ?Kab9VQ|jQT9ZL3QwX_tqRAKg=AXqG5Rt_ zknl9=fy|=JFD=F*VUx@51e*MS&JYivW9GA6^Jw=XypOG>~nuMbBxuaFmg9ctUqhJIdv z>YOr7A3bSh5M_%wUNcBLhQZ+aQrq9e9u-8rF7%K!#RZ}?) zluFnv%^DcI?_1O^%&J0ckLcJV38pD?z^O7E1z+QQtt!N96dNy^sET6a99Gqs$h&x- zX%VZ+x&J`OJAytQF}OVMsD@D15hFsGjUY@#v;@r&D!n1#ys#%ahewHAYflq%8gusO`7Rl1QW zcEmeiIP^S|9ZVH2&J<6!XNm;Kg5=bsEehcgYT>dR<{qfTvbXOLO_A_SI4QG8w^!Vz z=582rcn)7zS1iDb31-&b8g@w(u=fZoT?aGyv#tV8u~>4_KBy{?wP_!Pq)T!n2%U2> zKr?nujJvCNBM>USEv3w*#Z-a2YsWz;klNK(p{Tr(KoQGVd|#Tkhn(TVW+9fUP@McK zyxI<}#mH(FdfJez6HesHDt_AMQfts$a@wfiV_#U)4+qaQTYK#9f_a0I5(}<2Jh^v^sh<^scpxwjC%nlii~E;4BWGi<_7Wn-WlC zpL^3s!z~*mFTa0wy3y$MvR)@5gJ7!)(~MkmvtEDrXu`MZIq(K4=^kD6NvU39L5q?X zb@06<5=@ihz-PiIwGpeOnGRE6t}I@zW&&qF5)FCrfoLNARKWJYg=ep?90!DRduUz@ zoSNO!4&X{|Lt~2(qekxdUFw0d(I8-uR%}hcp>S4Jn1bSj$SM8YG=N(~+bw4*$PARn zlkW~?##G>8rDgg{*sqkA-S?OP)|Z5OnU8W0R^i6DL>!IH-E_z93s*@0r%;nQ7Sk}>r$JV!_xXIj!pV`TZp82#a zWo^n{V5B;h?*;ZN9pYNyQwS63ev&v?|3fM|EO!D!OMXFSVau4psj5_?sze2`gRQoF zlWEPFBQ)aXQ*&~SkA@SxVa?zw-A&g#y1B?y?MAh*AG=px)D7H7@+9mr%OtjdAA2Jq zUgvwc_=27wGMvZ-B5OX}$@$5Y4_lRB7Ep3}R06lb2b_@&&Kw>)_ij5$W$^0n8In5lE zi3mg?PAJgt@@OP&D~Z%ER)lzv@|Sd<@B9y-6nii@dW9U)8`XVE+|gUrmrA>hq@tRqHhJ!T~^N>y^y zN?@s2qUmATFDD(u2oYbRc5c5hg@%aDLp&iQ26AWSqwFBQCZ(A)2>A>11qzAWVWf>$ zE25?rks)UEKswO*i>~I*JT}H|RwxJqsb?4ZQ+1*5YqE<7eMx)-AyZKM(p%5c#Srh( z6*8u#2c{GO3`t_47GpyXt{U6IuSMY0(;(*0-gh)9QR-sb{w4e_J{PMZ)@{E*ruFz( zGJhUqlE(bZV3_(moH*k=U}MMz#CNPu!3oxMC0)j*U~v{iTN($V{miv7)~n(enm6%Y z5|fc_dyEgc(8E(9xZzULq&0vHK@)^6VevvbWOuGfOOPh~=>bIu1!wn<>OwgDhy0SX zqjUASI${)9r))`O^JpUeOft{IsNyB|{1D`ea4o-qI$*JUMmNXagNWBYfS6E9&pbPz zXQv(x&;Djjc8O=y9?s+Uj*+GAvE_=+xyNRo#pM_ZoVVOm1_^cd4wq?l?}5c!w+yF1 z3v-7vci;FZFiqu34dbI8&c7Vr>&anoA>U`@2}n*@?BZHm4b?L=MDLUP9W6 zrSq-S?~@tlp4o?6b%!r`iGJOe%;jalK`QfAgL+pXp2 z*sUdKu=QR<>wsBu4Q3$_T{6JU@UGnG(u@Lr_tUDooE^? z9|uJ2Q`QH+d!^L)os$;im(&eAgXSe9hcfCs$Gm(1|1g`HYD|rs#-357gNBGWkZt_T+Qgsl=T8*Jc3TR46{r zri!Uvhc9|lmjFpfAOh)E55p&f$zKYVjlMvPUmlY=&#Q^+T>Z3^Kd zo5Hs2C%=@VUc=$|jB9AGHY}v}87zD#+hA!KdpTvzhb2) zeWr9KnV+PF&B64D3~Xql263TYjRub*tt~sn#4nM$%S=|eE+{Vb8$|VxEHuA4g7d=? zljaoz9?{8tS~)-L+GoEpgeiyWN&T`W`6P)dCOC0^P(x%CMCT{B^iY(Lt(qWbQIAjJ z7X8*|%^%T8M0)3xcb2oP$E|dN+_1wM&{FcJ^oy5wT)*T*9kqdKWSg>+T$hLF zxKgs^LGGf17u7(1fUBTMPFiQCILnvp`anM0e>2ZvD|-nqh1oVQ;wf&oR@J~f@GK{cNPenNR31b@D=PJ=g6J$JLV(OohViXrWQXJtL8DaNdnX1 zCI-w|F>M&7o}K06QuhlenVyPY6AsqUq z!fCFi6-!HrBofKWWOHB$czTG%&}0_M@Q-U9#Ibau0kO2yVrjS&OFWiF>WtBRxAO7* z`_;HuD-6%Jx-8q*>_uzUc&BRKpJAZJXYO-&*Su=q$MzkE!JLH;`-K{m6>Dlr+7+C* z$?6V>I2%znM39hQX)_onmm-M{*~Wbw5b-ts2lu)AAK3QRT-{W~PT&n}@`}j4%cG+b zoH z9L1coW%xarpUDF;+tMw}GyD~|?qk>9cNohZAkiZ)4>sN7Fjm(K2b!D~f(26^;)yv7 zQ`~&KX-1PAgvThCI2d3$l!v`sa_~vN#7!!XG=-`G`n(L_pUT}wIi0(YvX4z?@=>e< zIYEzl?Vj(wlh^WymzaDz&}7kz(eH1v-i0O;=;-*|eU!O|*1H%BShI&N;wajX9K-{_ zhV~Vh!!~3FP)+n>R>DxLl0y+Ku_PkpAV`sy@}iJac`2uLr<@tr4J}#EWO*y1rs^O=Q;tT8_$yp?@y#!e9)e;>Ux3wPo|3q&dv0XHo zVjVtGFr;;++Kaya42gyYZjBAkwmCep}fLM!c1~+9(@Sg}{YxN3<%E}?LlBR=> zdTVNtj~CEhv?w3cOy1CtoX~A-t>J~&qtJltK6?+7KzRFurI)>lQ)=lSr3ad?56QqXV_LM@p$886$b69XfX^7V^dn}5T?B0Yys)CD{rJd z&l_2)O0wB9b}=xLL!xn3mlc)3#1WF{i`iDzI%BP}*1J|y96Yi`#J!a*Qi^jctL0VT zTDMFtgl$)MjB~F{{qzu3WkyGamM;-FI3v%ndx#+`tYVHqtbfYuBOx~=f0|Y6+7>Gx3A$I4ZSd7EfNc!m z(+oKB&1naCHTxP2<$saEIoJ1a;bXhv8cj`I7u*4yXbBYXbgkqWo2%O-#FrHjjGmMw`EKp0s(mR$rDX z65VL?GheH;iS=61<`D;Y75i-r<)3rf>~zVM7)kV3hc+Jzh>Ak}Q-L-g3rKqfwCSoO zjLT{BkhMA{H$S#GZ636GvMz{mXR;N>5krkiXHqF2%E;FKqQ)i}!1k%b=2kO?@>B;sQ$iOxh6;GsK5~>T=3!f=wsVvU zLvSF4>X2tW_Lz~#ne?0svWiHO!Ea!$g3UeGobCVPs#Aq&%}82Bn=AFbs`~3pPHbIK z8dvOYuxj<4MlGowd)(FutcS3MY@>>H@np4#JSmf9w1`X-gwqaMTBJJwZ8vfbHnde! z;g`@Wri$E)&})9sya0>5o)s+9GH%_*k=Q658_f{=2#mn|3Rv%~xE~0q+^c12`n?SGL zq|CenE}4knGtBVNZ3DRz3ddWh#9(y>*Rte1<@2ZMqRK}xtY{cLZ!vjalEQ^1G;G?; zn>^vfZ=C$Q8roM~`6z@I4V&ZMyD6XFr1!|Wlk=U4nqfp7xT=5D>znlYm5OyeiQsF- zFd{5pDIaCcBWqTavO%G>U$alw`WN$@j$b{)hyePSVe~moFMS>fNP7j!$5zk|hjBR} z9ky1-l+R}tr_IN#o|Mmqt57=C|T0P(ZFPA+mpg-)iX*or&Hf_!YL`B2sp+K8+0co#*Hc5U& zzq2SFoskD>LQ~6o8BL+&S!3KFzby z3glDVjaDEJ=*{wgn@RTe3zYCh6IFbkOFJF`*OyCH2UYqUmtl$W1eakk@>wp!LL;&2 z;xh00aW0p6HDbTTrCv%5T1$><>?oH8z1<4veQapkC$9jb=9GSQJd=LORDDdpEZQE_ zZ>V;J>tLi34(Hk;;pK6zlVVl>TPe|;*gL-F__EUCt2M_LbXTo8K1V)r-5E)lW9_ULSJym4c4`}|cyOP0bREQB5pTe40px+QDmug||y z4EjhGH*2wGjDI~^KP2^TU4E2IjMMVFiGs<~(LOD5Aato+T_?(zlHXcn(5oS%(~S>1qDbp4p!|_U4Je`FDzI(Vzni+Xoj`fzfNx| zkiklvg_Vg!`xBOqYA>>MbRD!7UKY`CNzj8ObZgC)jsWaHwW%f3mVE^q86U|Myz0vk zI;ql@jjR+9@$(wA@+faJZefFpLP4&uc&06EX2j6p7E_0yF{~GnVrIH2Q|g9UEj+o_ zfMTJD4z3W^{I=#W!&&BQNm*5wHnyZIjde7|@#o|@p?s$lRMD~#-J*ScE02~(CJ3gePFOM0 z0Sde+Y^ibeuN5PHCW7^1`q9fYMu1tQE zw>Km|p4lqW8Q4T`Fc*n}C0SW>NGYH1kW#d$Lu#4+%oGkO_=skCjg)7~PVksz+hd~b5EGrMVxoyJMkqw8 zfS|FOyj8&>NP@RY;wdZVDHy?C(Gj(oVxmtGbn^CBi~=hwj7Iy$e1<+bud%t{ymr-G z-Fa1xsCO=oX#_TekBlu~$F`8T7&~64vr@FE*d`rk`v2qZec-G8G$Lqb%&r?r)KGWtE5FR~1s6m4k2^h2w z14J6Mg(4M#6g|ZX0qZ4V#Rx?r7A#sJK#>B)zVC00IoDo$pM8>(La%&Y181+b=D#t= z9CM5@#~gFatdX_*F0o_wDb*=T#9}moMqk)`dyl7tx zrWs~DHe7BhS1`4R{L;g9+EL0Q&RdlT$JMk3*f^~jV`m?ladjYA%22g=l-uMrs>kZ; z*(dbtLL@KK?u^+^Yw(V>5gou}Vq-*k4%Ni+kXv_JZvavgYD)olk>7-KxMz!)8q#K&|I`+7^C|+fP;90Qs6vG zy9eP_QY6V}MODmSG-BYp{lxxMSj1Nja{q zo4kDEOO|*JTQ_53uqhLAyd2lo&2TadSIZ9%^)SZPO*n=PO=%}4)U^RGPTv)uVE4ud zwU(;+0Ilh-X^3`8673q5^2+Q`F7&QU+fxL3cG?zMb67U26bLgki{lp7%?3Bp`0+gK z)5KO0+)@(IN`MWOAHhwlHtCW46pJ(JxGN=~VY-@8(`vOpqrBBa7Qie5ZO6DxRnx5u z-m2gXaA%B{lkg^C)Mkb)^V*Gb4W?C>)m{e(7xTHZR)6Lf|=HabHPn|QH~$n0cu zF|dbS&K;uJ$#5a@>Z=hfPDY!Yk1>mrP0WGSMX~V~^MoQ${Iy6~gUk+_9Wa0Tji&g? zUw(;k)XBd)^$Q){$trD;Cmo|<%>`*je|e6d34ma&;s6|MAzG`@1$m3sDu6UlSq4@b zC2P83ldGHe@n{w(TM8B%{40mP+yccRPbew+Ey2C4E+CQRNiedCWEn1aakVEJR3^*Q z3H_3`DEOtF8Sq%9^yHXh0m<`m`@4vOc@1x_=!UseQ-+WF?6NPeFyC7Ha=XpI{()e% ztQm-7y_1nM4wvw*@d5(VSPQ(M#?v@+PTH;?U_b$efAICBRqlI$j+ztp<*4ln`WL1l zIbj5v7Xs1%AZ)c1Qt9XS@!QwWPwCA&eriBJ*POK!`D6l$u6pM0=|T1U)UbL^vCb2X zp6^eYD~gz9Z})P5a*ZEeUL%TUY8Y!cLNj*K!zZ*>F|;DwTR=ZHySY*g)db5A1S|h_ zk85B{lepLlB9@7)lKM)om_fNq2wONKE}KzYa>%&g(YQNhb2JN9r+1h~1;A|qqSYJklc6`QrsLB?Q@Q zsOF21Gtz|eO{~C7o}AAD4A1v)cHPgi6V^ue%LEe|{4yS-z26=N=%9a)R@9;c*s{!M z@snnzHE8gb(0*)|@QA?Br#meos7oQ(EMYj6&jy(X=$p_1UuOX$q9+}$u+*n+nkrxN za%6I*;8x0?Nl~}Q^J(Cz%j%cnmnxK2oJcgK2DJFr@8LYOct~dIaFoE??|0DPsCSU= zR~_^zLShGRD4YEyh^8 zzi6>C#!8(J##pVjgE5vBk6L_wkHt0z0GHchIWem)9m%4_RW^uBXFPgqA`4N5V+`J5 zp^@(O){19N@^Ysyb*0FIiQc-PISALvB4R)q>k(Z==2~UY`G1B^03ApfY<_PFc2~@e zKCEtcxJuf4*!7q5YyAR%#G_GAk(&%;m^6y;)yd_&ZMQZq>m{}{QE@jKW?S@pF}hV) zmz;8Tf}*d})-mpvILt(D944#&`fe(5-Y?N)Y%;&Jdhf4GY^iLo!FY*km^g%m2FN>B z)H){JQRkcy0Jc-x%j4=KA>6-3q?(@G;#w*u%vgn)FavI+_zk$c^C2`!*LcL`9V|bP zazdTo`^^j`tG8^AY-T8sAHSzy5?4=8DBORp#R-B*i<9Qixm_fkEl-H}TDG)2S)PHe zNMrSoojHVV=X^74&RT&~Cw++;Z(h4&CQp16Vyf0By1W_7J<6XiHZ=Qy_R8$(zC7{H z#f8GDG-|OEm5;o+k@ZjPx;#A|^rPd38?$^Kw}}5HgS}BCjL1KO&)Af=MtyZ+rDCJU zt47g{1DLZ~ov399-??Bw6Ss$fqNnog z2la*>%`e$7pXd4$2Qz*fw>h*b6nqpDmo4;(tszOSn5xkg%LU!ga_S`kLg;C|fdA*F9{x7m1jK&a=s zoAv2bh`n9ZNGUhBA4oB`d*qq~<(VWIR_sKx&ugZHzG}H@mkpqUU6DQA0{-fxDgE`M zrdBXgICC>lxC-jg7}(RLXWLY8XGoh0aYaDw7PpY7g%5i5<1p>d7uSk%b+DiQN?NF|y;fkNr|XxhFcO~Xxw={7!z7uVLx=v-l?n|A(l zGMqUiaseU5%A>D^N~o7h2s;0eChaFzHRsd}o7Hs$=8z%33}f|q=f{%v)2n>iC$}39 zA$98f?Axettn*GW7qX+1fxW4P@(kZQZ{npR9!hjIVxYFYBz^i{+iySY4ZQ6N<1u028cX+T8`tiODyO9RzL-FB*S^Mlo4#k`& z;=`X}-mWn7U)nbhVy05lGM2=^Bpb0*=3|1nku!i^bys$AMVNoA^*l zOC|BX->wpQ^#M9ODxCpZPE-G_{e=P8`ZOiX33o6AJC16&8w<$$`X32^ieMzWz|SY& z$=Av1t9C{BIz)&8xkH2)F#Le(U02oc??Rq`5=ra>@!_tl{nK1yiq8wzqQQC#=yKJVgTF-aT^ZLZz|2hWg&6-0jD_|MA{V=ys09ogjYFIWpL91qag8g)kXYI`c zpZ#(aPx;|GJE%cYJ|qHI(!9~!Te#F9(=B>hA>4a(34F`HXWJFo zC178xzAG}MoK=5Cw!M(d@8HOzFPDk4jzaf)vi5I>39*AS_%*hTGg|4k#qyGc@`J0D~+PCF(WUXcz6OmH(Vpw~5^0x#e3m~BrX;hwO9{T;e8KX)2 zZuC4$iF=lnuuajklsJgw7;HnV;cQTyxqY~V*v8pP+_4NQ6H;e^>g2LE#M;#cnk~4B z7`iFs%gQHTk!`bam3Va0D{SO6u9w(oGKP*uRb{l-AIJCA$8m4_*Rs*$XvAL^@n`Gy za@3v+QOi;LZGx!(R!4^+!4?ty@nGE{ioG9RB5KMsA#FU)IT&#){jy`)|H)C8j%Z)4YE?B;EXD=Qfq2_K9#(#a4OGQLQv$n@)C zNeUM4P#;^{5+}0YVuDs#8d+>uqqSCW`r~cw^{DP@CAJxXz-&kI)b)L+N;`vB2eis_ zdSn&TW!~Vc(ZI+iWl(tpa^igV-cZPm7eUzFq7CeoTi1(}b;j?jVJxLm0X5W1Dn%W9|ItkV2 z$@nXiMw7v+hOepNv+o1r*R;D%myI6*vUd!RUo#jsG@wlwfd=qEo;JlnBBz3)3Ptzn z<>n*-O9}t9wr}b1h!_LJB)fOY+{bSrr4Kdvv#XAb>(IsMv%h$K7^lEw@#s9WMAI75NhfR~p7T zWusK(8lwJushXjLu}ML%J2izl%`%t&&e|W%(}qUkB#c2yq7W2^BE$m$*U>ajr?HgB z!2wsKt?4xeHxFPcmnIF|5hutkgz1gRTN@qUGXU|7AVVQ%Tw}ti+%M^^ZyVTwIz~dn zYkLoNrK?jxp8^5crq{9__8UlVU2mkZYyFC z36KQM1p=Wa4ZoxgbDgQUecS;O1+_VV&~Z&;Xl zLL(hZ&-Pz4)$%(pe{x}_oh9)2*yk+u_|InKj&olp@_JiZ-B%7^+! zS_F^?h_BnTpLaI$v*I6P><ir&xayP2o?EZ@XQcW=`fszwyFmz?dNJmLJEX zD)vV^4QcSPo>P~UWh=R#n*6l*;1$_V0hd5zi9^)v7yDcU6lMyjBKObvMJBa8`l=kh zT-RMG+9eYwr%NIfQ92zo!{u|WhqnJTZEjeOkGERSe>Sq@&|mA9yu~7}{PIwv_@D0) zB<{K3qvDlC(`1AZqQcZ_R?=H%3YQs5P)0-OWn3M@fH2D6hib#_tP#fH`T5LWV~Fg}lTunh$9 z;ZPp_7|Po!^#r5F@vp?MqSJ`w&((;DmZhzVE)d*4Vg>+wF;pe>-9fRX<#|`7p?8Jg zA{yE5f)aC}v`Hq_yy%iK$CU9tyw;sdMH`AS3c)R%Alu=C-GUqf$Ec(dDNT5Wb_ZN8 z0dvJxO`np;NSvL65|=@euP#RTamu7vsGQwqlfSikqO7ggE!>I8H^j1xIrQ6=lb;I! z*g+5gMSoVg2r#U|3AFmQu4*uBQf=#vU72@)y3g(5@nbF^0*?><^!Wv+e{&G^QR%WN zC(MDNq;F@@l&E!8s#O}NAZ-Me=&F?@>ac2+ig8T&HWuR{XM$#5wR$lTzLSZG6naj- zi*`Q$QEkx6OExX{W8<)3FR;NV1t(0~0EJet*-RO$enGncHp5RYrHM7jTeyQ5}Jg~ z6Dz=3$WXumH5zc*(>U2``_rkbWTVFE@fn+fSq2fl#BKo8bAxBWk17{5p=9Sv78i;6 z>?%j$uctAxc@KmbX`;?9M3pPyvFheG&=90~o<{SmmZaKtvN}BCJQl-WW^#)`K}wp! zpw)C`HD)r)hpJMUHK%f2n&P13vT{A0FApBo3Q#%(>)HR!*0V6@E3)V6@rvxnNk9nM zI+Y7z^^0GJee4|2JL}OM4#;Kh=LJZYYd_N6yaZNU`UD(^g0%E;J&k8fwoepr$ZKZf z7yrFR`DL|He%bISpM#^>gaN}9mpjWqlPOG?YREs7CcA0+>Rg_-HJ;s0exqmdg6 z{%slfI~*Pm*DilQzM-cv+n8c5&ot9D8`JVVwjrSK|FTQx`fl|c)c0AwGZ#e~Y56{V zS*M(u<_+cSPfxbbmE7#SfHd(0(;GFXd6(Z|d{5dJF!bo(=q0&XiHyR|M8@Z!e&0SYzw z$tP!PZh!G!iQ;BU_xFhmoYE@EbUF*wsY*oy$w5y1GgX|Hr&!{Fj|DnzNT?QnKbbi!VHA^ zfgx-{S1-=!=c+b3=ZtP-Ym^xokffOm)OOKU{P?jaK3=eqHQQ=#<10dhB+Zu zn5#;b@#P)&nZ>C)Uhf0MG`_djni)&9!-t?KTbxX3w0EX*(8DoHI95y90ul~c`~6qj zw{g9442OV=ifP!ovB<({29(osk~;8zZu5hW*c49N0E}1mo*q|o71{3jUQ6MyXN%Tu zdOw9`&}ySRO~T9R>Etd*7A1Q(th8NjQHcKbE-e;{>D|*!!#gT}F-d}8YA*aw{N1qg z(ey_kPp+D#>;3N=^_@m0g^)>&lX7@(yyT`T2ZxcW9C@vdxhh9q%h9Oi*j(jk)N(Xy zIkr?enzbBbwH)(RjxcW&o){%+pcSKn@11B{`Wulg5MjkO_dZ7nU1#=4NUu9g-@V|_?lUrURlu_2^wsHMfx*cj3_*3#l=Yzk?cYH8;h z4fKm|v(cFAjs=d^z<$x^TX8ft>--;dyt$SZM`KG!+fqx5qcI=S=4)wjG`5Dct+li` z8W)7L3u05aqof0n(&p`pO3AXWW)l&Yp? z*fCG#aH;A!qEyZKYOdl|hf7t@5v6KgB2}w8T&jAGC{=Tm;(iX7s-7cC)x1QiR&}^k z^&C;E=3t?p!=Zc(fuB(MBc%bCI)6 z!V-+Dx=B`hW%5JwR;xDb2Ws8k=O=M|BZJxhhA`mq!=d=0SW`}34XkM~-dDh=xmC;p zLeUDX)V291RqfnS)iPP$a2-*3rBHLb_8P&zru?O!FMnX~Z8sL1_A}1fQ9!LPI#48B zp5DPZH7KAt&oI2#{}pRyCRz#WkEGGm9>+xA6fxnZh>7xqZLM>mwQt%^l!xK9+EAa+ zC$mXR$o_DI&z;vmt~*;Sa(8yLl$m40X=lNLWaoAm_|D7PfB}H*VpB19<8$f0PS_Dh zNB@UnIiT%tJZHd+BHP^vLGb-*jBHIYgH6T815Zm5n8Nd4#6pQkUs|1^6u+pqp_uzo zZ5F6xnS%#v-8KCL0L9#M)zlL-ylV{GV#v0(;z!e%@qILXnbuOqg7)vsL_WPr;@qyj znZ(gVzF))s8#TFd67gcmQ9>P!0~YC^Ujg?zmrJVdm73WbicLR8@Vll21zcno2fP7$ zH%D)wiL1HlUdt`0yDh5EjdENCk`Djos%$(5X{BVB4W8_Jhb}a4K8L&QmF$ASlf~43gh@MAjy;Fd zFG_Z);K>(QviQ{ab6CMD*+qgUUuenGEVQ0)G|spZI!hzplPqF6#rkTat*Vu|Sta-oSt$#Q={Ne855BCp$*dG2O zC@pNa0sW3xCuJ_VgK_DpNx{#CA4t0T*?Ac}>B;sas(PaKQ8Pa?;s#f0DqwHQI(Og) zvP*cv@CFZ+TMK5YzFW&>yzJP+pPEyW_^f^I+|3b_GaYSG~NW-HCA37FiC)8f@>3dcC5>~%hih))A>!*z*f%&-=bktXQMx1LABTqs^9ji z%hay3?{7g&1h1!04O)!tHY_Yq1rIHv?)_=%f=Jsh2{`3PVONu9(Lc$sly7P0?>QNX zU7xi8Jb;g#_oa{(mP9@OF?&m9X_r4tqHeMmXT9YI^It+%ZBfj&%l$`D=r1kr;HUHB zNpO>)AzM8FlzX(`(5&L}4CY4)2eq`yPqV5hyT|H=*euG zcQ$;lz&)7<1g`HD?wM)G=!XE1{a600+L{8(+99J7er?C9^UHw7WJoC?^kx^y%H8*ER=vn8zR8E`DkMn;A>mZq1v5Bsm@~`vY^!z%)PA9+^=P{& zXhYu`;2!wh#|9j-IRGbN9e~rgyR%CKP7)csFktjbN{bM3cWhILlJ~dc1^;lKgbnlW zj@Xb%-73-O@#JpVawZSe9ShafFsSKtRuB%J7YG7Cj^;(ues7+(Zpe1@|B;mM>y4v; ztI)MjW`LoG5C`5u%P zD~w(c3sVYA2qxRlgDVIG3nI|khxhFx;|9jQYm13%uSjIF){aDvJ>90&O2EiOI~YL* z9YpnYkrNC8cfUD&0A<1Q5VGDIQ|zRG?|N_|tOJU)Q$nxAQW87Q5=R#78Qv4ayWEQ% z?}_0ZbjpHX+j$YnIhs=NQ*FScw#5@*QD$wtJd^F547>_GLV$#Zo`8bMV~mwBFR;Z$ z&b^fz%ftMLEtbdhenEL6yyr>UesP+zXozsAtT9FZiD1xJ+F`6AQFV%r+Vn8wn_thx zY$Iuq?*op48$pB*acIbyZ$J`39|qyYiBV{SMW&+y2BkW{Y0G~iY9olYjjjD$p^6{D zXu^OI=%m)3p@By4e>2@Z&?s;E{m}mkiuiCjjNe8;J7*P;BipA^_yN6Xe>u-G_x?Zt zq;Y2}j(WzdEkBk(yP;}M>N6J{tM+3%H6rvzCua(?<7))clwMXu+Gv7k=Xr4a@;E)X zI7u-1GtD{+O+qHY13GMnzj*;?9}e;!LIFtXEj9$#vhuZ1k7Nf1lA{_gw$J1 z!+l~g$~sejhejT#zn|{E7-b!Wu$ES&EC|C~x#%5S+d)@IJqFqwxK<{NBLMkrLl`z( zMi7x}7;Z7ff|~^!{c)d$3Dj>Qd2y`r|WRMx%tsVl@=1xna#{Y#ZJ?ab$%F1Im9zP`_60`jp!c@iOY`l8Z&Jz6q;iR z|Bb_ZjMJKOBh{-^1^9ABM={nu6~APa_f$B7%}(PkF1Gt}`yH9-2?D;4F}gw3lEcP;=#;9eNK~C%j;~@F zJ}8gbR?F|scyC<(8@+sHJWaHMk{7l)O^d&2T}TV^u^A`NGp0eccq81MCA;W$+`C{| z$DKDyMF4GmRNd4^l{76!3rN7b!Jj4Ju(#Q|w}uSs*dTeGL%;gH3LF0}oM&3#RcLoF(mkwo74Rb&Mg063;CDq4}Y!rp`t zpNUINMj{hZPAUV&giv%2t(2l{%!i_3nnDzsrlJjgYobO~uIGyflyag+YvN1G@}!unWN7I#g!9v!Ctdk^=YP!Bdt9}X#8qo-OR^mU|9tym zXcJ=~hw=|Bp0mi0)&MN`X=`}wr@@b@i)%XVo-K;RD%45(+Q1aZPm7S&QmDl3*akaE ze53VTaP#|mQ8Xm`gugZGVuth5CCbTJLzV4j9 z-ounFYo&J)DvUZ=}YVhkkak(scmhVtGYbR?G_`uI~lrbcPw~!$5-sG+OzI* z;llNRI=Z{tEKt3i)C{XOHm%O05D0dJl9?KI0xoe25w2qyqU+dQ4L(A41+9j(2=#qOr9b zG@Kml291Vdd&drhz683kksi?(Iv_KXMiNeG#tEV%me^yFd~TfJ&5c6%yrIA_HFQ2W zIAUUWvO%u!;TSn4umjCHMlw9eFus75Ctw2bLq|_AP9tKXKM(}0xNDzyC6{$iF}ZVC zu1R8cBIXJU#(zyF=H)rLvw7h^U_q@GS0<5SHZc#=E39u zSMm8V%vHcvW?l!_w5QsW6TFO^Xkjjj^|a~7oYXjW(B^IdcR8`E^4Hb)k@IrO_V9&%MDOtThc$3)pV+0Oq;C&(>v9;c`(n_} z$%xz{+RpL_dsgVlwLH>WZY+Z8a+?&xqQzMrMBbEk+8YR#k4~bGOdp&qMIL?yGK&NU z9&IARR0yVNlNw#}V)jdnjM3sB0iRy^m3sA^MbRT&8b4TL-CDuvF%7*7YY>< zUP5ApT%lRX9=l5(q#e&00e$ajO`8p0Ku+VbhZV%@9crhU_9wZ=Je8qXdb8dOLVaGY3pmYf`N%W);!` z?R1?+Qqe16&|1i#eL3WrNu-+0F|a!U?5O~@9Zd2bumq|jZ*YvKwuX8mqE^`z=P&&s zsn@FUc33BMS2Iw!F5+Axh@X*oYJ&p5Nnz?4)AJtSeqNQaA103AG6ctwAVM}9^}}V2 z;dfKTkB!M&J-Nb#uF!V6ITzuz`_qKV?EbGfOmTGkou4I= zp^vVGC0#o-x=s`?62hD!P>Iy}LoU08v77wSDC?jUId0Q}x4GU4opGLA^Yzjs0Y~yh z5N}(nouaTWFl^-*UY16?)iR;Cf{v)RAn~Tr(TZ}i7kPX&Hw;!4bhgj9H56~UHp+)h zSer^IKB$IX*T3Z6J_X)?la+Jke-j;c?te(-d#$G?4~hM=Zabs7e}KGpiA~m(#B=?I zst>qokf@ng=$4~O3^1d_DOG6pKKQgMDc^oaA1+o^txJ`D@_Xt&5w#Tf=1-cR{UlP`od zhe8aXsfETxY)u^!huRJYrhh2#s+)3&(Crx%HsRFBs)VUIVKp!bClJX1&`?O?3=?tr z&mVdBo5r5mm2WO8;sg?+VP|&gX{O>z=4mB4!MY@;w6j8hkKFh`?k6v49&n5s0}lN& zaB>-Rs&Wco{F-;d-y0pxQ#cEMnJrvTC>qf|^&@3Tvb(>@gvfBSn|h%*NR?;x@% zkK!GdCW-(|1&Tilc@U9Vm+pD7lc5r2%c0C^*u%<=F!en8qWgrmZRq_VZAUF|rmqFgRJ@=m128DBl_#FIc!7z9cZ(OW z2wk>7tjllp%XFVg^ONLeNz=4d&9x{|QraZuqlLj0NEw_Tli>G)OEwn4(%?X^7sBrf z;Z#J6Qq)b_=g_Q8FHI8}0en*Tg>7Eli)1Hqb>C23l@kAJ`DAuss|Y4gTtFPc+z|fu zAWv_1cyts~eLR~;&Ry!VuO@Zdra_-XwVW)Eg^oIH9kZ$j1l?PLxhT{SiS>w;b3u2+ z026wSs{ArRcbL4R1l?ip2z|Bt18XGw_zAk30xW9tCU4&a-K&^zLQtZ$$La+gffuZ6 zs&3J%GeP%~{{e#T?@zqy)#ED&x|sI(2)acnr2jt{1Jy!QVp{rd4Xk#OVg zkcq_N(FB3`;{po5c>4OkIEPKT2yiiwv)D-1n2p318VdIkd-yD?3|r5o$*#VUMEAP6 zk}mObent{}_@y43kwmwjF0+y}l59mY37$JUzxbiQc-dF};^XiBbn-uQ-c`G=tFx87 zLL8!Hs&HRLsw+;TY$a=*-dQ7lt8691T^KN!1Q=IoWx!xEt&mi%x_^5ZOgPW)s$Q@V ztg_F-qTc&hEhd%D*dN}$68AV*Owh#|a;vW!O-eDfOOqX-DH=^!k2JJFtgWwT zC~#zUDrBw!nfQykb$+IS6T&)I_hNw}HSg|?cqW9!%?6)t9GmbD;uO*1W!L1bcf?}X zSs_DhV0^vQpTVIG_B5rQ%NAximbKCGHdrpLkfDFKWT=wh7OIk|7`98;JUuPDO1r*o zf+K_^%fT^-&U{4D&=bpa+r&?_c$D9#?cZ*YP+u=dZ65)HfVQ_JumbBdvj%I%v9NJjwCqL? zxgrZo6BO4jwu(AIzM&(I^vFTovhjr?rQ`k`JapxXg{9~0D>C{1a$uu;0W-FlMynBw(kObR0;yTdZm)uj5WvKP^BOt!_9dSHX-*=>Z zy`})&&5xlb7?t&%wxN-MzKbe2u~qebdF|)XcO7~Xj?dlBsXthTkMn2;MWc?HK=XH0 zbv`AI+c{|-&N-r{BUMe`wd$HM!CFn)dF06tK{3(dj64wPtmd2Y+ocNMukc|^?G{{E zGrS89%@29_)C5z!h1jl3@1(s8-XSrI6vgF=a{|~&&#_}g9Y*_9g;%E?B7kePzu&n~ zxGVxV$6;*pVd}K=Nx4oA(P68tx+c2 z7qt9>sjsLVowlQ$aKDjVfJm8-sGa(SNuo@_HmZzR6=ja9Ouaukd8ab(Py*aX?cC|G zX@C%3o_>$gLw`fMED@^nbxLZF=#z+NwNvzMVn?RKL}tBGNbyVByN$_E7nj-fp=l%lkAG(E?KaEBF*6a@xW zV;90brK&p7(aG}mKNVAk#grF_?Iq=_>;p-iH&J)E&`C^2Y|84PSpxPBg-5)VcB}%i zs&6Vh;$Tg)_3()QlsohuB6ua&qU9U}UMc9sL)QD@08^u;re|h5Yu2t?Z~D~l-K8FE zFMDzp$jVoR*UeL`?X&XBOP;z_ZUR~PvG6*toTjGZitFnzu89OP(18TtHV_&g+VE(D8olQo-MZPoA_c9Qs+Pwp;L=i zBdJaL;It}HR(*d;6s363DmYDHx73)pYjGNF>3vHIWOd|j=CfiU{1>jaDNwl0XIZ(K z8NFn85Ty!3U#_J|i|$cAk7Kdrrrjm#{l4-#M3VP2<%LWX1bO%MwrXeng!ua!qI??Bgu8J zaN00TjQ24?PL`&sMa|>&ufRZ@ky(cHWgh~78d3$y1{#)lLf`vRE)Iz^*b!*w4O+dd z8Y7NzgSH$5)8hfOjg2K^%l@l>Y9Ip!QHFB{0dPvzusYo1-XbE)Ww@#E7C~O#Dab~B zcvnh%XZ7JM@Hgx5Yta8glH@u68~$&^r;z1reGxtdOMRHx{TQAMgEY~8_1d(ph|Ph& z(u3FsP9$lbG^;TnLQrt=yaAVH4~98e-lr(+h?_}mpQoB9H~z%~NX?3lfz?72l->vcK5CuL&sOi0RXa&5 z>VZZ4A}Vh;<^L`IugG6xmnxo7S#bQHFN%xaFIj&=@o@A^@C#mY4a&5zVKpLE7}LCb z?t<)1CE;u7HKxD3{1Yzrcv52j&93-gNN0q~Tp@3D-CTisLUfmeCQ`mL-h?xLCV`B= z`c_U(JeMQgu`z=Fsv&!2*l;*2eLoTwEe-bnf!I(#&QKwU;6O5)|UMCnPlo5Y0dy2RrN&-ir0eG0*G42-PI|hLf)cGGeYEZ~C=}>kN=D9*YKz9sT%Sv}fJ{ ziJ>6~);=cYl)`8jM2&sd_B1z{gV=R#_H)Zq6-yB~go|5r&VCzKh8@ZpsTD^Yk9L~L>K?&NAdKKken?pDbB#WRoUvc21LyPrp65bxfb7mKT|=7YuY#&v)( zd5e9hUCqZm=0->%GD+rhPQgj|J~Zd}GG}M(p(PJj(h+N9#C#!OVA7sCR;2R+-!wsf zJEs1qJJ&FTTAS4&0=L)W4#!=B0@&^^jLDlz(+c=XB3sO1HCQFb{C3~r9QPeUKK1H_ z537Dr)ze$v;>Cr_8rxDfBnSgWid=zS93$*1jl_tyffQN7@Ty=hs8AjA6SDIVpa+_e z1V+XY2N6N6Z9B1h6Aqb$PZm81D=;_2v04|!W)i3Hx)3s|;NTYATEPeHh@(hG5`2u^ z6lhX~{niAP@0p=rCjceEwLuYNt28{MtmFkxaP~14D&-kz=-u)@F$8Jop9!o0i~zOmh%B7T1YzzA z{(qv+(?!$eqbgeI@`@-_S3;#EKc@u5BC5&r>~+yo@q{7;t*}8;)-f^%6{i@p>j#`w zezz@8yfstAP4V@s1`3Nv$Tl4(%TwTmR(8Xk+y609elkK`)g_zO7G$H8E^V8RLq-EZ z$_NPwHL_6n=Ii)|)$z+|xD+9R((|+A+PsY5=u6kpD5wHPAO~qj0*T=LY!?HPj{AB^ zm%`Q&LkZT>T7Pm-8kDP0vi+uX&`w~hf9*NeZ{T%11G6wLPftTCh8VK>O~N*t`Nml3 z4qGil``N42Z23X5pktD0_%>aAlhyAM>!?+#sbve?i-ECRL|?MaIf%rbwQp1;I~Q9X z@yAxaUrHfC)N-t}4U9HAyyO=rG}r{owKtZPlfPJA28)>}xk-)1Eg!@_6s8_+Qob?S zj(i7XOu{di)(tm+=|h4PC)^>&v|}CgvAjRog@Vr}XE#ImK)cm6J@IE@nwFDj!P>|U zM8~h0sCxMx)|)ou5U427zl*CF&1vJ01hK71l;i+^c3mnkckJ4_ENgmf7_P}_((Pus ziEc{*=*mj(x$d~k38uxUOuqCM!@xZLONN1+lRpX&&2oMi13M=d*;>!-N(#pSdItA4&>b`BL>T%OI8Y@$f(~+#L~PKfh=Oa`EgUQj*psKYt6RnysBNL_X-ct} zU;zRd7>5?dwWSZ_kc8^il8(_wVA$&V5|$jz@`fKWJff;dO~8L#5|`OIp{5}>POfR9 zSnTW~<7f@iRdmrTFWTFMNTlTSrpiyI3O+^*)^d!!?5ZYUv6^7$0FG3luAH?FmGD86 zy9Xhnf6{^qN{=~Xm+<1VCylCK6?cs|Pyp#b2@Qh8>r;WX3Tk#H*^3%QZ4^d?EH@+q z^z#>H=J8Y+Z;lO{Vf60Goh^6CD+P%&CfY0*XK)7jmd9wTMxEuDMnVq7afnu1MkQp~ zTW$XHYr_b{nm|K;e46-_b=}$k?~hL#5B1w%sy#k!e6HUHl==9y@tJ-bNV~_UjW71w zh*~tf0oJ1hlCJXgC64rGO=r`e;f6d$4S2@hqW(N(Z#9LVi?p?neSDz*vO#}-M1I-% z&%I?un&s@?UXFl;xt+6T;OY!^md5oaoX&IJ!~QPQg6m3rlII1vO`X*sv}jh@q0st> zO~)~^HH+?OhvC*UaM2M!$5qO*A+1I{lEAc;^!cU< zJ!u_n4?0QMU^Bu-kv7ObYl5?`E(jG8ltGwA`DVJqb4?Ge31nA9v#`ue5hYq{BwCV+(s@tX{!wc+D!KH#uHaJE_3f}{FNteq4PKew z(cV~22FPjUKmm8`EK{(ho*0=`O9VpUSXB@O z%d&_B@d=jb9?zpzXO9J7zy~8F?N9hntwtXUvfx^mX460Y4J=%Q?N~^S25GJ9-PfuH{=7sazNBP6iwYF z;FSNz0tP^ICBp4bqAIm?TIhG}i&49#x#p@jv-7D3ZdpKi5zeH`kY%Qr9=iOBY?mLn1(w{; z$q7u)S-%x)x*p4Ye{Xi@Q-(^Rm^X@9Vz>`hhNh~|y`j%s7R8+~wMg*OwMg*57_Qc$ zBV4W3o4JKUxf^8)>O+Znkg!i>XYgxNUuTNh{X4e~wJ0TBdfUQE2*UWkN(4>Doacq0 zwn{BW5JWW!LDTm6JW#Z}$K2jPhen`oRtd{cC$k9%npzP-YplN2P!JbkJO&C{r&7xi zg!AMm1Z~vkZ;FC8sfJ}}*r2Z?DF}O+5VUqh1a0=BtC(V2V$SoTpm~*AjvzKsMj_|| z`+OcKT24V18ki#}=prQyp>7;IVGE;TkBfOQaoJW;3fIejvDfCt$--7}tztrIA$c+7 zmuFZAm)-J6;2EmbxTuE8LSIJRtbwY;oitz2TlQl6D9+rL&VBdz?{Nd~K}BNUUc zh7BONZcESB1fBLK44dri8n!urFpN#L=|!-GM5wZT<V8ozI z5od(3SIP(`@>o=wy=k-Lrh&K9)tky4soqrX_Ug?>rFv5>C*#{OnJYCaP#6%Cbn|^n z@)PRZmC80IbA@QX%&*f7NO+a0x0@CiAhBAo2aItDg2$L5`_K1FO3SQd)*uWIR4OA= z2K`V33X;xio7RjA4U~sIK=*Vl4k?ZD^oK%c%cFcRzoR^^Q-IwB|7h?Zr#5j-B^G01PdAA&3Bqcth8y%-^^vlgEh_8z4>m<+3Q$FaoG+{ zNI6b5X7VJ5Gj>kM+GdpHgjIT_+lwqZT0d;?vO@>9!qJB5d<&GH@57MC2*A(Sbx^0f z2{RT#k#oPcvobBvF5zccrTaf2B>1%#c3NVZDV%A=K=$Z7e=uaq%D*HtmiQIVTEHW; z_Up>vZf4C~i(c%MOiFX>{RkB>tNO0`nm{_7aI|VeS=5F)BJVSsgjDMLAI!k*eFXRv zVmjJ_X9U3Y%Dk$f3glu|QTnH|EGN*Yh9~}mFu4>5TmEf3^BZ5JCC^WQ(4-h=tyL}= zd9`|qN?P8Put`n7?dq_kyodWY;D2P!Es5n3xS3+Fc>(wveWN&*2;r*p-%~o>*rUw` z?Bh5K@QXS4dL{Uxj@KP~*+f9T_iS&$y`PadU|WtR4g|Fnf~de}k2W!Y+mbMDM`-y? z&G2lKgXQha9ad`lPcxe(q--F0YL7e0?a>nPeRCn>tno7Sgk`!uajc1_(y z*Kx#+isAHo%&Y_e9pQ#}M%owPvXg7|9B@O@_19k8WBof@baewbAOOGx z05B^6W(|N@2jIhBdD&ZE$mWcES7@zet+lM@+S;6^;5Y>@pkZ8QSJg19n~CBg*%I<% zmhw5}$JH3Gkjsc>Tw0C20- zJ{$r1J?A;}oFw&}RWiZ&g!*vxen33mFrk>m7f&ul*$NcEa|Ls*TFaXBY z8bQWvSVZk2z=^8o*rRCp+|v-<6?ZyE`Lv;YdL+vK`n_K`^-EBi7}YqNYcw`~7HZcX zEVn@c!nFE6UF$o~q3Sg`)PAQU0f2fBP}09VTbgP85T)QahI$qN1*j z-Z8}3YWwV{f9Q|C`WjjX&=slOdw#h!dv0oT^-MwmBl|rv$*10WjqN-15pZf5$urfOVSZ>ujE{GY%(q zD{9|t)c!PU_T1FYExl?OViSj)qI`?;6KZ(E8lLcmANthi58|!2Swy*RZx3aVAMy5_ zzqw$^4VK(_`&>Emykf504C>}kdb#&@K{wh?m$TxW(|kr0Uw@tE7`D`ALA}ILu=X`_ z>(%~xYk$4Bf7f6A%TZ(td}gy6+iZ<(wvH3!4z|9x*h)bHu`95k+C}B2U1T=1siSr~ z)-J+F?Mj+J>(nRmT~F}|iZ4g_jlcfYZ_ut;qBg7Fd9hhNwz)nmU%6jV?QgR7H(C3L zY>a@jYJb++pY`^Mnk!PL-Z=z}+FwumbL#h;^?T0y{r>md_;2W_j88-TZdkt?)^CEs zG1%VkNwqs^?M_;|NNna38-x-)!Z+HG`kiScjJvI;-8qVn#`isc`Ugh>b153?H?7fc zj8Oa?<~Nd&TLi%tgJ6q6fXK$iI4%gr4FcSH1Oa$wycT+!2*EpN6-RZ$|x|v3}23zh{ccip~jD_dHB? zYPD^xVx!YUR;#(S%0yJZTZLJssgG8REi2;tW3T$myI`s6dNHGZ&v=iG+J~ncgj%c> z1Zxd~wFUv=8k^F3L9pH+Snm*+r5pMsf`_%gg?^8z-(%Kq?h+Pf{m2`?de;lA{kHnu zwtly*-`pc#(fJy+y2e^vW39qe(2!bcwPmfM=&Iing_*^UZ0E-0;6cQ%*NnZx93<3<55yX1rl9SU%?j!JI)b=MaE*#%rOsmiC4BG5Wn$ z{a$PRUhDln@!^AuDC@MpMvW2kiXr8`as7qP+Y}U?Z&a%rt<{azDollmgu}G>wB|Qz zuKK-BX4Oeuxje=d?P_;4zCZBjr@uzKBbTFeWAd4piyAb`D~ zB5o1{n+$?Y4gq*)ycW388whBBE#PlZzc*OFH+a9l^qY(CLY~n6M)iB6^?RfBdn53# z3H_c{tJBsh9vomBmcm3@r&iZls|Y{!d$Ys~l)|PZ?QWpB@ZDCsoQJb%Vs!R_H@^Nh z)Wx+lU2NRjo2RXf^c#%vcX-N4aL|6o+V5EVFc$>Y7PY^{+TY^s<6$84H}#GIhT7ji z`^)M4FW>)`D~!z7s@rR=+iR`cYeCya%FR=5R?W^@v$NJL9EEwbSs3_lufb$eK{NN&)6)7o!Z`%;NV zi*Kg=BtRJ2HEN^L{_@w{_g>gJWWGWD-eCRSVEx`8w1s|;tKD&Hcih^AqcD#~iEktG zjgD@$yJjT1kH7Ch0u}ej2axJ_gP)bjJX8CbwU6~0a)Y<58!f(>_KerL@czih-~L&6 z>PloTI?;Gfsog1Sm)#`Vg`+T!Mu~6m&Dfm_->?3y)2~B}td`7kwVzx2xwQ{(VFPl6 z@E#!ZmGOS>XWnuQPXfArRytp=cGp|G>#f~4tyk)fTE>=h9Z~cv5{WTT{=c4mv>M=ZJ1@XN)I)C}!o_IClbG39np?*(TzbCBU zFqhH7TjFgMbpD3FeDpPl(R0!HGW8gyvV!{4YUzBl`n}ou%|RmQ9OlAQ8zH<` zN$0OS`R4}_qvxXYW#SvAvV!f)=yIMLw5AnS^I)C{;A3wrI>bdCrJmmN4 z=={vm@4XE9y;?dy5BVL{7IaP1x+F&%(jOY8KM>_i>iKJ5`s%;%_Qxc@$4q{Ynfx9T ze+Y7H4I%?dTa5$<-)qIsxv8hpTb8TG2TpzB3$C|tpi1(a){x&#|0_@i46E8BqW#rK z@W{_OS!U`-gMKeJY2Wj?H~bO$!&XRLjSVhC0qN}WdyVw9HKwnj(o0`M*+H2vs1L7@ zNhyc1O#~uJs^7~ccv}#(4FVQZf&ewy___R9qCtDP z+2b9rJ9C2efpb_VrZgaheylMO)+#!lTHPo%Kc;>Q-!e0e#`lNr{nWq0Oy{*= zw`FK%BfXNDX$AScR_(8~_R+1?KEByVI93msna0mzX8Q1S}=U)EDN70)g^(i$rW%C=u1vQCKn)G`T zz(>h%Cepmxows)9z1>N%dB#o)aayMMXtUzy-~XCFquuqQ^Qpb8$*{|vh0aIGZx%o! z7T;Q>MG$nkm z6TTTc$G6&*S#deO5A47BGp;8Br236r&iXytoH|N=v;JN#zp;!3dSf4^!h2KvoSPr$ zRnz(T*B<@)%h4A%F+S?|;7%DJg?^8c-w2H5%kOo<_Y`Y2@J-7r;`^Wf_O3UguVEg* z?7A156sBjRbB+2i>9H1Awg5MyVncXu7~V03f_JBKYK1{subX_!)N8JNq1T!B`YRv! z%vUgaKyaK;v%!^7Xn22^CBU);xGlezbz3?!vs%k=Hh<`}h`gg_JJxK+oBiS!{_Gtu z!qmOMzW6lTsO*wYv5m`~`2^d^UG7dS@UJBK0$RRsfem&XkQUf(Zxy|TZjbGg9XQ|= z+x%!kQuGMcfyY20myo2mQ2rxHLC~xYKTl9tkEH0z49si8h0p%Ia^ryd-W=>jAzq*@NrKmTmr!#(v6cgL4!w_l!{4_N2JX~A%9&z^nmeO?`6)zEU; zfE;oS%1g!bKAfw^G{iR(74L{kT38Pon86m zZOU7J>z3!RbxRUkw^t;M_EfU-^B?_(_x{GaPaXV)c9$W^c4#yj9+p6!S5&1)#2%O6 z6PY`o;bcerUFA%=3DZ%7>){ob3 zOWOP8HfW0!ZYq+Wzu;#MVV!fpTs@o`ta+S_mmGm`oe|sd3#G1 zwJ^6(4j)>;1%!O}JdCnPRkj|t=_74JJXpr%;5Eh(g`&WRaTpsF^cU*YR zJE!Dm2PUnKEwJH)UYa9w`@wG3@#Fc-pf(Y#chFQ)epw+`9Q(rEIkBG&VxKZa2KGU{ z1R=Om4c$h0Xfq`QMi9EuawA<|ZpT{!2>11FDaSrvRO z?OD4-6QZ?Sf7KA$1A*6oMKVzGnt4&YzKJZrU*~VrYzMQ*$M>v>HnT>g-y1pf<&eSl>&H zq75-$LW21ZUaY1D3D(9!=Zn&WY?6CqhLxwO{Nn8&Oe5P-0RyH4Y68A{nc_U6{!s)YcCt%jAq>+`4N5f@%&v&+CSU(n z2z6BNLhaHpfNF*iR7bER&S1DhSROC$@bM(r#{jlPO(2{h*8$xY)XI1g(&0Lr5#oON zK5%fW#!4it^OH`>s9XBjQ$#;;B-e1|quL*~^2J5|yuIQxf|9Bj7LNBmtZ+Buw8VI4 zB4$#veS3vFXkf5GIJ7kgR_YD%>J5frw_e4r(QFo)g%*S({rsyAZK!&is&$kxDAaC) zUD0I?V>JpTb{;u}vqTrc7|J4%GJHm);|g|)ud|4h(=1M%L?#lg0(7fwV8;1@!`A<^k-_oKj>flC)2|cyCQ{|oNBF_zMb$TY9m54gO z#GCz55o1$G>3O9b_k7~!ck|dyat5gLjkIW8EnY{(#;Ty!imt_1VQq+GgHqiQ$xB0X zG}B1epX{4RR@9g|-gT#d(MZT+=Nf#VR0EZ#;%CYOIfX)C|CB@8qaoIX$u$Q}NWqrv0-zwYDdWy?>R|lJc zMRl{l4Z3g+t^-2lcOE9SIWZN+cpl4VDnQMcGLZQJMMI+?Y;Mveo%&An*)DJGy;!}q_Yoi8i5E7lqT6l)RHkOD(k zkEjnJ6)6#P7KLK0G&Jbc)Qn6z3t?7VXW>Wgx9D>EVH&p-Nl^r0T57m3jQ0kp7tl7f z;;cX&Wup05QL7HOFcGxZqmH7>xC}LYm+#CO7PG8jBN-Ol1(!v+t`~B4KCjhn2D-G8 zA<~eoDx?vcuA>t(%pXL0)D}hcjH7yh$v`~_YFfkzI--22f|{s~sr0a+& zI&5mK7%f>CW$`FFTvt*!lSpDUR#C}=Swv<-^1zH8V2!C}*W=3(VQd1$?lw2@B8=Lw zvA%(n(6@jWib%WjB2uEGDqAlig)QV~@S)vUFErP{ykW231ZoxYSmvxEZ-1=832Y64 z$R`v3&31s*&l#Jyd1LRu8Pq)znsd@ zjcJBf-7XN9*TWM5+6@z-sfj@37?Bo4K6)asGK&)->-q4Dus6jZ2-x;Jv$Sa^KIhz0!FQ(fl$no_l`=oF*JTPs zKJR=`Rxs>|QD9T8qV8IyK;uNf2qTn{oR}VR@Tk+FaBZrxpsbmUk}|}?@~OL{kgA!P zrAmzmWKlFQs_|psY^`ih7T`&QLY&T$;FpwziQ^z_6p>o6Q0K`Ynn@`8Ni?Fsl!0`s zF=eB5=ypz@I=xKb2zG7iQ582qMzflXdw|N;wjcu@OK!i-@kRttLBNnG6ShE%ux1NX zyy{>J#N=IMKZ7NerM=k#v&t4oi#lSR1%sdjU}Z4c5#dH60h`$c#x&3tI1JMcHbX^% zkhO>K$V^>=W5T-BWhUjAjXxCvwakQ}imqY?<6_V^6801(O>iSgWgyf@#Y%Mvf<$@` zQRUK(A1(%UX@Vt4Z;8fi4vd-w0`Zn8!15fqLS_|h-;$-%H<&V`=5h$2zI;_g4pR>^ zf!AYD*s;*qG$c61yvwm_MT#D&w{onJsnV-I{}#K0?r;ru@tLIvRx&? zjbfW%+r)nB%XdCJdXfDJs&@O02TQ&{acamLkS8t3htNjeJT2b zd>^`_Zqd5)eHDKE_`c8;Ilngvj6!YiOV z6X}{4){b)=TShUQ76vC6rJOdH`~DEEqunf$O{G<8@=%nZyISVeH+T{lLxTy9f(2Ev zo+9h$>T9(oASas3M1>#?EolK)2Pqaov#Kq~m@}Fq9wEsVR0;-XO10avVAz_MVPzO* z5#$IYA5Zs49SF@uG_V8W3(FfolbEH8MFRU|jAj&zX%LHcsNBRNJkSlQHl$H3icLh( zw31lNhQy*PU1BteW@J__+BHHDEwjm4hsxhrq5O)*3!E4{X;&q9xFfNDOc<^BJ##Iz<4>{GuUqlE;zplmkn)AHoV zYwFX*B&iRR7FedxL(VoW&bqxxnJ`yu3c#HUjIf0QaG_e{ z+G2AKT(Yyt#-~p-?MA@;XhBq`RdZh`2H>==t#RocY|T$c90hsTYqkW`{%mZ2ssP-X2iYe}9O3)g54lfQh)Vr$ntOJ-AtdflLty2;1-)u`%zPbf*c2Pr>Qy}I zlolZR!=T$H9|GD9*#jnSF(CeLDY}dU2o(Dy7_2Q=mn}cXpo6BiTeVUSKkVW*d@U$0 z0^AgSPQQpq$BHPB7qy}$XesC`9NTFy4ID8qO{3D&y&immG8?BFGz^>;PhX(tLYQ5z zWNomEBCu>FUjq|`nYfpdVlQUD2T*N!W|kQ7aQKknO8>Ekn z;6plg6qf3Qq%#^6cxWb#m){ z>&m=Cg4QN1TlgF+XId#9p85-c!=Z>4MSQ5>qJsz)4KZfWP||)&W{!2FU*=9G7RJ6o zFQjaN^Mha%q1O|n5i;@Snamwayw7~n#_HzdkVp!UMoKs^6}j^{nZCBr_O?AtA{mhm=j8rz&5=Hi~t%ufzti~`qju2s_)8t zE?f&NR%?%TKLjLlaXu$|q)M4EQk_ZpFnv~867(S>0t6m2Z%rm^#Qt=mF$sSOjMvMArJ)m0TJXZ_3bPL_}?p zaIyXU_5Qcl2`59}bg!g5BDr;p-#vTVv&w{9Lc)8p=i2t9KNQK{_F5jx%}Tz04}UMZ zdY)7h@8$FNwwWWzr3tF#Uec?C)Dy%iG4!O*Y_~%;{0rJo=Gn{Rkdj_oY7^K-OLkJI z6*o?OXBKf7BEVRE@rJ3leA&r~lj&B~3olVjkD zH%pz{@lG}YAV3ZPX?1Up;9Z5wAZ0 zSKwMR+2FARPuDhroMdFAA+(?c_hcm<|ABE^Rfw^|yHvrLtv3_?%6$_kpsyb$mo$C~VN&v|B{OSO_XSa>h$l=b-^4UIuH!N$0f=cN$I6Of zOQ`W)F>Lt1v2I<2gBEQV6`w|up+M!xy=}JGfB_!-G)Q};w1r!FD!-dlMAglDeppGr z;}Xtq%X+ARH50_{V9LpKPSzr2-o27aC8%f*p&wrHg_kanBc}M%S?DZf6(Y%YS#Jz1 z@Njt#amX6EKsAP42&?QF(>5=lOzUhHoidBZ1*>X`n9NHe^B`u~gfX15;mY7tcxA%< zCuxqTA4yler{V&5k;8NRpa3cIj(liHo0H%O*9XioBEVO8L_*FbNOzV`th7oEtLho| zPEf_3(gGmb*swhID+mg~PbG*>bky?1XO@!hN|NtOpvscl0Y1e0r5*tuNJ@@}sZvUy zisYRu^X(CR+l4+=bXl)yOp(W@>0J%$7c9mes5e8c_ZTI!xCQvh;Z2ERcq%b5KL;NPg!2K-T3%&n+Na*ubZgAqEpqB z@WaYSlM`qR!QN1<>YqVcGH?3IZu#e*SxU<3{{8VL;mT9`D&~X!c$#M}sb@5WB2Pb4 zOMf_~*Y1`Nl5R`B1M5@LewH^I_+T!rRyYR52mVp>i`l6ls|LEJfw31&3K6koq(iTv z=l_>igfedPUP?${Myf2v2hPh&Vtn9SAylVGTl%aT5+hRJ;B8j7U!+DW3TdjwbTLQ4 zujcnR+1}~Touxf%$eJ8#@5|%djVyWH3C_nmAOaKL(|!p?u6q77epcKI~ zAzZb^4P0aZgsK&`8y$jhw^o-Jgjx<#IercOYqso)uEH+cDyFVQ@#88{$u0uT?~%P+ z1|Zb4ahv(7-S(WC>S>Ff@@8G5YCu(+rP<>Y_MI-#xamMs`vk3D8cQdwl=qGzY&|%t zKqH|vy_1AU6;8Ye_lcp*+cP)AVfne5C2WGbw&#_1Ypd!K7xG*iJ0hHbl`#en%-e{t z(}d}QH<@bK$AKoaCuHxotx4C)9nTUOinPhX(#CZ8R)=ysl#*OSrM%-=hFiQ`ei(c=@BrhVroS8W(=TdZmZN>orOdQhBnj0bg_B!DoUZJa@RF|1eWt+-gaAd{=OJ|ChO zFhb%!MqH01GPsS=2AyoWRM7|xdQ%c2SY(&hkLt zC8%^A~wxZb-m)Ss^>Ie5yyY9iR?q9Sju4S#|)0h^?LEGvo^)8Afmzh7a%EtYz zgrkzXv1?vT#0CPY6a6tbmp~VyKN-V$e6U6qI^G#cMC9^djV}MipLaH$Mjk#ljr=T4 z>L#o!GN%^NrBll`o}5~wy*x`?|HK1JN%@_OtsO!IA@Izx^2ira+ibL(Qh^)aq&{=# z^N&TJ`6l$W$D}{~6#8L#7<_2|GX9eQfw=d~G>{rOvmq_Nj@nsX(D`+E8K~fFBGUdXOUVk0wyUFQYte#v3@$?N)h+jF#f8AC#}k| zpqb-m#ZmyD;E12?SCEDSPSNb9`3_BC_`MqldKj`L*$TT!51GdEwjk&NZ#L%<+D0)B zh5oY()Wv-2sCZeWb#g?r7-E6mbUakd74g=n`Dy7OqfU0umz?M z6&0i?yRwQfQfR2%irEx+Lht=_4R@IDC9V`aAIWZkagHIPwBvlOn!m}eRQcd`Fs7C=NgrBoz6c8W4d(ifK77&At6;NEJobM_v78Z}l zq3jiy5ye?-pexcMk*IM!=!6&1EMs_60A2}uMU}y?SQ>E1@f}COP2x+Ij2QstG<+G; z{y+{`J{%6QgZKcE3XC58<#F(T*%ESMK-*yWE)AW5)Ly@{*0-lGFc=Mh#R`B%ey3qV zQYYAF060E?{-Lite8a21`u?+eXiUTIlyU{vMn_ST0i%*kM5vjE@%!ZFV5<#-4;R4YZYH=ukyLvt^*! zN*`5nKlzgA?KpcwerX3_7W_oz9Gsd4VnyZK+He)5YYI%IRX2HGI2-5Uiq2E1hS{FMV;V5RyEg1$aRas;J(xDwECI(>>~9G! z7$uxpa@dj;09I(lrZ1|{E}(BHbopd=1bhur0O+wZ?60B--v-!6?BB&wp(~P_LJdml z*a{Sy99_c7!$7HpM^q_}i3J~(`e zTWD;aT)ViX=6v_3xPC#4Vwo0HIXXC5L0dqo*claufgdSos5BE`p@e}BI9zZ=6t5bH zy(DK+e!T{&xp2K;TEwuSnd2%V2J0v}oXYVjJcC^pE)&2tWu(#Npe; zy6hl7)i(hz6i$4RB!v>5>tSMDX4X!ieGm0J{gbC9@Jcae`AP(lEjtCKreVBp9AW7K2EfKsVZilVrC zpL6Fv4F;^^wFHdVRmAHGu=@xO&-p;h_=k8Fkm?SAI7#fKSJ`a`-4Rh9h&}RXKR* z$bP{Kx#-|7@iGcP^vw4a5P;wR%I3rp-?UJOoJyFr0#$%Vf?-b{J!o*Oz;uzL00L>= zaK?qq7rR{2JBumDLJ1wf;u4%1cn8Dwpa;Yf!_9^y!i-fD>J%mkqo@+Ljbz>w$FXmb zw7Ko(;@3o#$oxBIqP9CTR0ZB8^j;ce%7)OR@-s{0J1BI30SZ5$5NivZSx_+78CE=@ zFi52W3N#PiV+)b*qCe9^A%chkyo1->Z#iRINa#{5phck50~Cwu-;u*8slj!M-6`3- zF2#fH77xIvEgr}`rFg&{KeR}k!e9z0u|kRmEDN!7!4L?u| zC=g(bPb|sV4Tgw4Dw#~vL#}Ao`JRNUv<^Z4Up0#yH>nCIe!RRmks-_oXh92qN((h$ zWyaJ>Oehd$MD^V^lD&#cwqp`;h{k6t76KrAO>Pr50FAS#>Ni6 z`strOS8<`>BpwC|3da%4ROzr>(7yu1?}#W>s2ab%`l>2_#|uiKDuBO-?m!Sp?1R5N zt_;}QcY5qfymYYR=;KP^6#4s^fBeYVr^?^Q{KDTnRadwJPOss~9pprTZ{BIiYQn3|A+7Y>1-ARH=3eHe24-=x%#R*1Pc07@bpqs z#v+7#7{{Ksh&_&hn8O*hfz}t46vV<5U3iH#eCzXZCH30i>M>vrWu}G{90si?2Vqr} z%nJFOLIBVKcSFHM1%t+t!pq`3=-TdF7D*1m6t}TPfJ++#9bxbMYN{r(H(9i_5PQTn z4KNQ4;|0;FE-g4BnIY19;Y9o7bI9g$huGZX|Cgag1` zFfssT1y1xI{|m&?!r03=3HQ`NLqnJ&O_rn5`UBKUTD0rPhr#bk;_MczVp@jb)Vi@Wv){4^cz31-w@vrW9>^;9lLT2DqUT9#dD(4Q0 zjLB8t5JrFi8m+d^Z9G?jGc483169ENu6qt(_W{Xs58$>3NpL|uhS!p@A^=~iZ%6ni z?vEGmSbZ(E#}4h?=yvtBN5t%RtavxzKJD5g9bftQp-+6^ZleIfY#JEwiTfV7?SWf< zqjX#&#(^z&Q#pV>eunYrvFp@<@SU1qD8`ZP5FUE$KjC4FP*h!~#*zaJ48_fv5|3yR z9jWXHi^1s%pcA!|dcp`M_5>j9TDwGNKX-L@joq1P+yQ$#s#xe3+WvJyQ{#3(4B!zg z1e*x>2VzSQ833Ca$)hx4L$7!c6%$(?qf1uGL3op|sPf=r_dqNjp`{Ir;5%w)PzHn| zLb1wS5A0n+`wMVO&b2XxG@ZsU03F{5pS=yBCAwR%smbMt9ecTjinnH9*0k{b*i{EZ zVXiEJ-EH!3EHipk{4xI(;{7FP7E#(&-b&P`Ofahur0m{{f>RL^dc0Kw5#|6KPH?&G z5iq+?04MjRAgFC{oxLex$ru?&&3$UiV}W17{1i+C+tmeu+pgwpvL<~0&P&) z;l;Sw&P1imggL?hAZ#BoI-YMsftuz(gub9=IDH8yV99Ti13@DO?X6gZIuKC-t6ZTx zHQg|X_9fC(#}DhEj$eJAyp0EC*5;5BRj^{jHXhi$1DMoBB#sPcB%qWMRPj5~@HjZ& z+uL}sTy0b-Q({NlT?oUFsFQ)}qFp#RXxK5{8U14Ykg}b&1+AHUR)upPkSM@I?S|M4 z^f-HcVj|pnROkg&n$?cin9HXOO)%ENcIyIM5dnzvTMhjKX7NHk=+i=S{*goZ;8ejd zMBL*ZIY`?n0S}w>ghSPKg^RH)(k^F&6D|gi-9YTxUmYh}gi{e`;gqlgOE4E2dJFwi zDKasEtRXP^e+!>))2j}rLTMA|pF0mG_EqGTcm`;J|X2qFj!c%|Dc8Xt$Tp z3WOJU6r5jI!2fFpQY&yP$2|K&XCdz%G2CzmE(sV&suZvVM?%Dn?E?qcB}TP02x-fs zh`uhWkQI{5LrW*M9sBz!%my@nk6$at`wbza%7h4_5m*(9RbeE;^r|Wc!>O7^L;~L? z|)Z-fYZr9EP;p^GQwXHJ0M2*L9HB~F}QRxeKBoc z%$Jqq@`Q4v5}%8LCkP%$dKCYS?r!YDzG%C>aT^j7@8c_1F=fL01Z(U!Kk}a$?l7;F#uxHDULCul7-<+b>e$!~dk>3MVcMgN{SK`%Afhxo z;$;7Z*_iLr?BfoSs0l?FB<(Z9cT@%NbYN^D9*)O$jmAA1MyMfVjPITdcU*HoKrsC< zuE~am58Ivap*8IKfMysDB77N`eQw>)hZ_u++_}ex31bLy2326|9ut6u=?E>tB_}QR z3gHFq7w=0RVE05M<4XWoZ0=V+oIap;G*`?@0jeXnc;veZ{1(ylsprxE%iPg#|L0!x% z)|t8wd;y3BlD~gYzG@LgVY?WlE39(irIh1GX%S@sK~c!Y}H#GlQKSkuKm9{SKh>#C_qr!k&zJ%nL``_PGNFw_JnBk!QA4fqq`!murX zOT2b9_H^NE_M5!{TV5)Y}lqU(4mQ?@5O@x%$%|`T&B>Mu(6MQ$xj&Ye+oSY{7C3akk3mnnYIHtT;&lu z3}rMp0_je>dVF>9iaMBr8HcDo-LI=ti)xiW%4-mul-CO6HRDhquJOuR&>u(#4_)95 zsF2GV#Si4NM&jj(qIU{`E`;qA_d`%9blD<>tSa`QR8y-|#$l(<0|{$riVV}0Ii{~f z#wrGU1dt{^N5-OINFu1+aBo1k7VkT<*GIW4vl+?fR1?{dy}lUauFQ6~DzYhieN+Zy zK4hm5z!0BzfG3O#U~F4L0E5OA=#^MyK9>OYiIymU1p^@C^*k3&dqUGZPw|O9K`^?zO)n$z;C?a$u(OaN6yN!aw z^0oJf1(pkx+rOG!rA7g88$ri{*`bu+a{iE*h621S;sU`B5-|5)Fo)Ytf>i-dIBTcr ziprQatOUwLFnw=_QW+>K5AjsIy{)_qgVR|FBE%CrMh7va0KO*;B?0q2p*RGnQ{3qs zWsjmmkE$q&WG)Y@o3R?EBPIvlay;H`Vrz|jA6UzjmqWS0jg#;tGCKkgNIXuFYtF;v z4G0!47tBi&&~Ga*_8YUK(98XR41PlFFLQjZf!HMw94oPQ0t0r?R>qJkJeY7r>=;yo zfCNRtCOST*Zp)POl>vYs?|2}9Wfb<_*sHjFQQd&r7+vXzMEMfE|T`4_2P(L8yUO1gn|e1tfEP>sydHA8N$Bg3N_a?6s;0bDF@Tsvva@ zq^?5xcu5S<)?K9Tb&>iU(wB1s@z=AFI0|z`Et}2zt|c&wnlQBu& zHh|}e=r#np`2?7VzGnjgd(2ou0W2&mp&1-`sALI+ic2UUmylD7OhJ@)ZU9piXy~}W zR0W%N7Hk+o25|m?NFs_b@)`CB>CV8&gK~r+&cSO;x`XWUa)}?&$ob$^r%7e%2}V^@ zA3`H~Y&=EP=|nM)Y+R&-+C{zFod+&hQc|RfCEa=0GQl$pvOl&dQpJ+)JiL~&Sdx&9 zr-(P8gZ4j%M7Ac@lz2vfU>_@~SWHbS4o!o_3nj(JQ^=!agG{9p3@7<;2x$qSV#TE^ zC`ibBG9#xDS(M;NxPa81ngqp)XF<>){chyfe+az_hb5|k_wlW>q3cx{_*$@cAn7Em z)FA&AFgZZ`7J^EFTrF0BSM-;dHhwhTEg zTCrV=?FvS#E3oQ>gACIZRbc43_`NXpV!NS)fPsS%XyQRcvIKY|;TWKTAxuMx2%uWt z0PEg+-b5i5yS*3ME(YQ73H~Ei_ICaN9(V*V@Cpa%ScE(j?I4;5^DK8NM68U#9cgSWm z(<6t+Q68wmhT^V_3?(d%aVms_@dN-7;xz-is_7uN;QS-9=4(&YU1<6$6`@wc$kAi}s7T*8 zgBJu87#!}S)nbo~4Vk)S!6#!u@oEG>QEUOqSxJlsxsRl4y9)*^fUdaY?Tv670kE9p z4md*8xdDFN8|FWMXq@?*VLy|gd0me4$Aso)G8~nwk=&VvqWG2}{k@fn;2Mf_vx@ji zs40BM4ucWkQpN;OL+29!`h+I{j1J@4Dg!G@GKhn89)s2kr{L6RwV=vJ0WimsO@H{U zLk7hC5dd2VeHi;jv14$^#^^M4MeT*Ys7;V{oLwLi|Dfs%-M$LjuqBUNI0gYZ_uD8N z!QD?O47r$IzpFo#@LsDYD0Ff{p=nGI)uqXgXzqP_h&}0`qPUXIR^t2?;@l|3xnK-( zN^YJaoBM{s`2pgk45fZ5G$t@J7+CTVGHzbSzK>1A@F%byOazMZ-MrWyH28@q1aaCi zrZLr2k;F_AD$q1aiuh6yiAanhjz+|na*NZ6FD==Am0PqRiz-pXjxQ}K5)u|M;z|Lk z*xet0tI^F`=vS&6Q5@Sn((dlC3G-9LLZB2$3yx6QV8~*;vCpvxo5!%P#kKRk2|9J? z0s4|`Lgas4=1a8T%ZnT{oEJr;023yJ!F(BwY2!d>5k!F1Xx6`lzq&k=0s}Z~eH#fYKRk&vSkIL)7 z)rfKHFyDQk3QyE1s2ntXyY4ZeiX*7i)UQ53)d7DIF0|_&l!KOLUVG%g0X(M@3VrcC zst>%ha9jy}ZE-x8vxbIqW-e{UdwR@~M6TaV@3S(!$@EA-kv|ouAdV1@G92#v>H7n2Ez(b{5iW(uq`$l}ZoAhtl~}ZX})^>dt3#>7lN8YOn*x1$iqo z8c!xWyW+`ss@uu}tc;b-+R0cl*&#D_SlQupDr@aQ6QWWkKGK~|FED&Q_nM^tp zH8D0dtjq@dPQKHaQzC-=xyav%>hWaa%0#Nq6j1H3uE<;29NXBAGV@WUt~=dh)eXnH z2jhKKwl16Nsmo@%>#Y65=}azLo5`X~4rMEG9>u{rPWt)@>COr1+b5(SvC~BD`9MTI z1C*tDa%q7g;Fah@Mt9PRXK-&Qk;)JE#B-Ls7B_|xeHq+IStFf<90*IKvblIFm%v^7 zPBPwQC9VBdcRpwB%y*&1zIe7XnHWmsc38v7(QT=e1+vQKyD_C%f!26(BtDu=53U3K zjjr2grE><;U0z9GsUqIEa7JC-2R}LA))% z5jWQ+vct*vsF@fVPFh1~Af8L4Q)b4>0UuV68BfW1H1jFUg4La~dXl4c84zZ7UA(@v zttZmh(9mr)M6AX}E8bn-(A3)8X08eJzb$B9U1hqx*_K^D;{XeToojk+mmRcQ&V zjeIhfjYheQQB+`a^@Qd{eKbDd_Rf4ydh*>1LBhRQ0}jT=D`C=eRy4Ykr}4XD0Gq}s zVseW+Ko*&7aSA6?JztU+s+Eq6)PQlF4|>5m*_7%{m*y8o?ySX5c_$iOW3vH_0Ju37 z!cbZ;kZ2U;#MSE34r~C{rS_HHwBl_1{@UN^*~%;)_Lb-=q^eI zhjhS6Zb!eAwSzd=C-`Kp7Lv}nKVsh>0`D?Y=^Q#S1!us0r_43D=G?l|l-EPnP&zYO z+m}g?n7#1?=xSGgB5Mv~^_f5q*d{;%y^SIl>&ohJwQ)19J+Aa^xUR;ryU0*&4x31s zJ?YLoL;#62oym4W1jmOHousrZ#iX*=A68)0C|#-c{{Cz>J!BPGoaeq(@Ujech>nhWhrn zGv3dlZMN^EAH?;UuJoh0Ug}DJ57#v~cBkU`Tz@)~xYFvW2}ruS40OaFWSd}`T@aJK ziS7gzFBFJ)vQuakigGE+Q-8`>-HG7@P}x14?@XrC!_a*)K(M%$6Cf^uj5L=(XEL5a zuFM&ZrxMVXrbeBjTnF0lp^s7YMOr*)!+5>j_suv{2fGJn&ei8}=KALZ3&m#?JQx6y zSNB-Mx&D!KW-twc%{a=KqHIJRwp|$vLurS;hco+}C^ROq{A|C~LtI#yH!D}W(-}*M z)kF@B#CzhyIA`muRDQ^!ej?;-7VumOcxrKQeY}=_i)?rP5NJ99Ri#u3Mwti>XKj;i z8gMk?AYUPWXu{EqqXozR23_Mlp;BGr6aq=AxJ9A4Q)s+Wj+{zlI*h1TY0Ya%+6gjj zHStJ%@o2@-hNB&a`+n3;<0NDO`4n+YTY~jg;&^)q2!=u;m#vF;cjt$s&iz+qVP!Yk zzX1p35P4n(4A0T=v1-B9d!Qs{pak~EyONek^_NU*VR=|tX4k`Ml8n0u`Q+PuIG;+! z?MEJEic{wGWZW%w`Fn6CExPfzYC`&Kr0eq8OdZ)uvaTCkC0&<+0D_J>Dppk=Ouu|r zZFhQTMZMMC-O|wB-qY1?b+VnTk3 zIK_7#Z-piO=Sy6iCY$dPX6PhN;*4AeBwPXR^ck+Sf&A4I(v(O}`AX!IQk?WMq}};U z(<*ZEYbWG0P3i39uRxmCl9O&k+TDH(X<98#{#vA|1-a9-`knL!5Gu2hT)`p zk#@toA89w{4ltn6y%Tx&G|e!(nBYtFMotFZbB*MA{AO{YZ1H z+n@r_YhsS{TPYKZtUI5CA_6@xozDp%^1Z$AEXZ!g$MP4bOYh3txjL;B`4U#=CVOnV zcdaM4Jz61GDkT=J2y(bSz~p#*Cd1w(fzCqban-NGHRs1I8A-3(!3p?tQ0i#gm(7qG z_3l(QKTIzNxTvtAOxjpcGlzU?BD-y^-tB$433=rHThk`I2mRo<(#J!tdmr*hcWdG) z>bk>mXfCkoZM)9I)JDy3qYS+R|A;fSo(W|EhV;(7jC`&cr`##LG+B5Dpax4fjd@xa zeptD7IC6KIeeK$^a_x?&c_AGbl0e-mIlwb_O7$-q&B8W-+k^Lp(j-z?0$Fo3oyS$m zgwi)&Gy^>y6iz3M74NAvx1>R2)FVfu<^~I%EhL4`FO9ye*_%lZi2_2C&kDO>#7ZWC zP-iyc!ZJbE^p4b;J8?GCy&&BT`mx2Jxaf_;fkT)$lAZ)fnuY#u+A?gb_4KyA^6D8pKjg5C(wa9#O5iD{T&E z(r`cJL}f9;Tqd2TOvbV!O{cKLEe?Cwq&3DtWiqf`(izcs0&64%XA+e0ZmZJVW10N` zi0Yq}gb=huyWk;$-h@Yr9AypMGjy5Nm_zYFB05JC33d~DO4Gnhr(pNN)nxY~)aTk$ z&=TBH;~u}{Ea~yv1G*u9k(?`+PMb;2FTti)vr{lDjIbmjRTQfSi{d!iA-$ifKBg`W zGlEV^*@pXus~ux@SbERcX@7nQw#SvQC26yXeyWkrer*5Du5?<^VbSpHj}H%9Da;fR zg#U4ncOQsJApgSiYn}1_JKEqHcG7%1Khrkr+8EFFuTN)&K%jqc)5W%y+ik%~0rZh4 znhj9ju$p>IxFEW%;(VIWZJJLFtP4KMRyVwxC#27_)2Eno+sMvjcR=|9oe#qyPI3i? zQu$;O*6$pCjYMk3p!ES}pZBm#Q zRT?xW-OTL#vnYQS+H`OXM}8cHekDY#;~YENgtI9hPoDh@%2Ee-8E0CzPMr?nAscTr zJYSAy13VjMR_=GrE&Vt)_ zTkbiJp`4tXj?qgnGw!?&cP@`Y((tN^|slUYk|g{z@mf0lC`uJeMywsr6mGwbfFs?LE8m>kVbhotm}|=kqiuV<}M10ou!hsfcvX(pEA26o`Z%eT2*%89zA|`dvf|E zV-m$UetK~aqa68!fivgpJRFXQdliE81$ebq!F9Bk!OL zL@BT=xpC%9MIQPJWw-bv1ZJ(1#U<@r!x7j8Ddi-sYXz*=&7Y3tN-OPX(!&3C+h^K323 z*0!zZY(v#{#9ArprpUHubc&iOGc71!%2tygq*`zysP@TmnuOW_UQGhCn|<@PGh}#= zwPGO4WdOAvF0RJfdfUTQhuvU7L&DAVZ8NNNVa=V1gT4rtzXz{DBfWaZE5pj==!dd_{tYL66|SpX z>4Uhg!O%vJA@ZkZ3_nr^i`Rkqi1%3!C`aU(f(NfuO1o%CPh zn&jtBo38W&xTdq+$!D6R?WF$$*HllP^zU&^w~sqb_0dVcf@`Y(?sTOqeVQsaWt@Db zIbBYA=7e-;LV2d$<;#(#n0M-zO~{`GvT`)XH-?zIdan4 zUlgChu^Bg8R&*ukD6t`_RqjNc<*4KIMR%u(^fS0mwPa%3j!HP$-6usT-7UgNDtxBG zk??ksesS-h^(;yE4*^EfZe`Uw&N%a|CDlupEw5P-sc&d(YHn$5Yd<&Ev1aYM^&2*B zI&brq^S5rlV8_l~yDz-x;!7^w8}I7wvHBAOgUO-cD>9|!w%G;uprk0*+b2t=(kPqF z<@b&3AH8zCo8>jNb#JYO+Pd-9-b_nxrp|beD>~m={pEFhqsVLi6n>DwL--2V|3LG^!mg884V=0d6u(A^}+i_Lw!Zm{c-1ja-dM~{M&?l~_ zmF|}sQ&9@Irpsd(XX-l6Ss287$J4hUpROz?|II5Q(#)%`g_pmf#WC-s1p%iX{5(*o zM0Az%5c=dezK?;?E&NBa2M~raxI%8O!scwZqbd+WOyg@yU0B(JzK`IbPUxiHH6i^T zr02Nu-;e7Bt~B-gcT7lAA9UJViEDQ{CepF{PQVg+DeM~g)CQ}or61y&kiO;6oGj+T zD%y5RPb93Ik9PkpBq8nld0^mOpX>W_=GUoJ(cf(Q)HOS%U2t8$=c9N3=hj!SW1OHG90ZX2e9)d|IQ zLS@apusTR3`g^x<&d???JA&u#Be&Y9VB8)S%D28cM# z?h7Zu4JvVt+dD&IFIz-vy>9HjgGv!ODdrIUaRQ%3U$kU50B^+S+cztnoHUOa5h6C!<(9kcW2;@=B)Rq*q4R5jJN|~nUpc>5;F>1%eg?)+G<4CM zhrLAMwnqE_Tu34mf@xV0ci`AZ|2Qe1#hILWFLu0~_Mfz2bLO@fD@vN{$|sVr*cq}x zIGnYR!F3i#4u^@~3wHYrNRtMgbR(|WpZRCOnqZA-{+W4|c~y0=x@KwcQntr+!y}L5 z@+kqpB%yDsS#GFvjnQ)u*&m5S>LU%2#z<47InokojkHDD>m&8`^$qon^-cB7^)2uV@qReV_Rc;Q>3ZBsiCQ{ zsi~>Csimp4sjaEKInrF;+|bbkq5o@TsKLgx9gZd`QkyjIjOgx34cIoz)B<2vK%;9PjO^`mNtIaHHm2|fl z=c-~Gc$ms2((Sk(#(gJW)|ai1@7@c_MkTS8uMDFO;eR*Il*DqQ((c;sw|Xfe<`Hwl ztr6^_clVpFCj=%G{Uq9*g|^?MAP3J;xqj8B_HQXF;?A%mkBF!CeqVeur*AzaUMrAKkS z$d#tg+npxMsC4C%t-JHN#NGKMJLX?nTU&d%@Xpyp2gX*y1W9gt73C4Y1&v2}0%wxP z6JSl8M)Aamx$10qEqlyrUM!V9JklDs?NC>VO27LwoXM7E;7qb~+8Ezu;})1?zIa+; zrAgUBhhLUq5N5TEnOrI$a^P8uw$4IZ12|L7$ly!`-D!IgzU`g6x?wyBmt(-R#QQPS zI}`Qj^rJ|2((`fMfNBYM5opx&Ww&y9p5^bgafZ{G5|-`CcibJ^vcUwHn=^&hzLgP*zo!7o4Z=wpBP(-(d=rWh47mex15 zMpvG_>AcI2d;pn$_28Eu{kzA%`@+u@qkNjkjjmj`e$#pH?6HpA_|cC&_V{IOs@FR~s`@+vomRGFX)MFKneEy-YKKz5HPX6oRcfJ3UpZ@B@k9_0t@Ba8F z8*l!~cOHHGyPLLd+jH?dJKy_(8}9$>2Oj>~qu+R{V)mR%FZ=C(ygF7WAG+eF&rX|u zdMdqeQRh`xf9~EdKlER-=PW*b{f4dEF1qBhcV2zX7asZk51u*sufNG;Z^-5UqOS9- z+PXXLec<75eD|qmKXUGeZ;sq>`th$lKDKq+C71gA)5A;ZUVJH)Zaw>)j&(d>>sp|$=6hPUG2XQvhJZmtd$PU!Res!?Y&89sd8&FiZO zZl6BGx7(*13xfgOulsZjOR~)H=pnB4Lni>%6Xwiqk)oPU)*U0>yE^Dp-t8mpM=ud7&rml0P^FI;CF`tZEatZQ%b)Ol9= zv}tn#h5xrAS62Ap{4!5r%u{%_?8S2Z$n|<_;NWF53t#jXzO}4P4|?1D>-}Z;?E7N< z664}P;qcsr!P$W=M&W(lyFXbr$Ed&EIQZkUd}SU_;Zqd{hr;`-mwAzUy;1n8zCfQ| zu6Xfs5Y^B?rdkj$%AIC})e3Ef=d_BM>MU)JHm`i4XOaI5bwD4~9@3uFzF+o(zz?;j zv>&S{JkM#r&|Wl88ZT@Asew?{vL!25Z{2pot+(Fh^#xkaUVY)OpLo)kIk%f5@l$GYsVA6T%^=MRQv&S`0n-uaoQe-vmvdgGnG;L6p# zi5otc?tJm3OS(St(IwTpKX&Z)Pki!@JMVe$p|5*GWwRDV&slfDr|10*9sPDH{h@bO z{h3F{l=SLqU2WmeBE5e4LgS3UV$X8VT4UO>!d>1oj5CaCe^W>;96i_?m>u*NZf@7R z{ej4AyqS1`M?JUA*zBn@g1&(7Tyu$07HH9;Rea*CazMyxbe@P%8Iw!WwyV4W%Uf@+dVck=Bf7jxT{$SzL@2pxE3VO>= zYxf0PYK(B<_^O_rWg7#*_3IXF^zU5Me$cl*xJciysa2om4|-ARV9UJ11M2jK^1~nP z&4&tKf8Rq#>TY=Q(1zQ;bg138%+U6p6@K^h*wjSJ7HcQt%zQ8=6FQAwEmKMHsX7Gsjl-tH+ve9XrwdiW+ZGgSWSwQ66u-d)jktb#p7*BMal}f4%tj^G*)Lw{A<{zV%}d zRc^DMd~Tcaxo}Hx64#&cb`-r-i?9yloe2WH2hOHh9a}V zs^!zXnx-1>P!}(_G!zX4)VYQlz$*7F*GHzSW-E#tey}HB5V9xA%7z~Wg4%q%a;6>3 zz`*C+bak<&dr&}~sm%tfKxwq>SABX=Tdb}`-7?gyM&s=|UU+Z#@Y*-FNpR4i z#`Hq19k4llEK)bBd^@eG`qc|m%~$5{Qnf(Hd!Duct*L73G!^}MLh2a-wbxL+07;vt z8G6{jn@=^bifvI{(HH59w8eO*jOz2NS}35d&_}c?bst`f8&JLaPcVEy>SKGF-y77_ zNX0ou1Zj_2jkj@{7@(@RAroNeQNO0$tgGd!kKO6oqfynPsDE3j=+~=zO~sqg6hp;( z3%BEyyBMN6PxGiB*5=PBSI_d#3)Sioj7`&)sB3_A4ez7$t92?~+M(mMRT%d&&9A;l zq^VGV!gw?Ttvs*(xktfE%REN4Zm6F^`-=9Lq5IU9>1}#F+FGZd;Zgmo@t%#Q09KaT zsS|--^_Z&rX9;Yo>TGqIPxt(-pF@~KOk#FeO4WV|c)U0-(02QIXMk8huBBrdJxV~; zeuKFN4X8)am!X=$YOk0bucp@m$%+qXP Date: Mon, 24 Oct 2022 16:46:21 +0200 Subject: [PATCH 308/344] Link to cosmwasm-storage deprecation issue --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 071f804cd..b71dab0b6 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,8 @@ This code is compiled into Wasm bytecode as part of the smart contract. A crate in this workspace. This optional addition to `cosmwasm-std` includes convenience helpers for interacting with storage. **This is being deprecated in favor of - [`cw-storage-plus`](https://github.com/CosmWasm/cw-storage-plus).** + [`cw-storage-plus`](https://github.com/CosmWasm/cw-storage-plus).** See + [issue #1457](https://github.com/CosmWasm/cosmwasm/issues/1457). - [cw-storage-plus](https://github.com/CosmWasm/cw-storage-plus) - A crate which fills the same role as `cosmwasm-storage`, but with much more powerful types supporting composite primary keys, secondary indexes, automatic snapshotting, From 6f2efee61fcfdf848f0b3f9bbc58bb8c0b99d226 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 2 Nov 2022 19:36:40 +0100 Subject: [PATCH 309/344] Lock JSON schema version --- packages/schema/src/lib.rs | 2 +- packages/schema/src/schema_for.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 packages/schema/src/schema_for.rs diff --git a/packages/schema/src/lib.rs b/packages/schema/src/lib.rs index 991473a90..2abc7fe8f 100644 --- a/packages/schema/src/lib.rs +++ b/packages/schema/src/lib.rs @@ -3,6 +3,7 @@ mod export; mod idl; mod query_response; mod remove; +mod schema_for; pub use export::{export_schema, export_schema_with_title}; pub use idl::{Api, IDL_VERSION}; @@ -91,7 +92,6 @@ pub use cosmwasm_schema_derive::generate_api; /// }; /// ``` pub use cosmwasm_schema_derive::write_api; -pub use schemars::schema_for; // For use in macro expansions pub use schemars; diff --git a/packages/schema/src/schema_for.rs b/packages/schema/src/schema_for.rs new file mode 100644 index 000000000..4146726d0 --- /dev/null +++ b/packages/schema/src/schema_for.rs @@ -0,0 +1,9 @@ +#[macro_export] +macro_rules! schema_for { + ($type:ty) => { + $crate::schemars::gen::SchemaGenerator::new($crate::schemars::gen::SchemaSettings::draft07()).into_root_schema_for::<$type>() + }; + ($_:expr) => { + compile_error!("This argument to `schema_for!` is not a type - did you mean to use `schema_for_value!` instead?") + }; +} From 05ab1e87a8b8b1da74c48f1845099dd43419c975 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 8 Nov 2022 12:23:05 +0100 Subject: [PATCH 310/344] Add a README to `cosmwasm-schema-derive` --- packages/schema-derive/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/schema-derive/README.md diff --git a/packages/schema-derive/README.md b/packages/schema-derive/README.md new file mode 100644 index 000000000..ba2cb5613 --- /dev/null +++ b/packages/schema-derive/README.md @@ -0,0 +1,14 @@ +# CosmWasm Schema Derive Macros + +[![cosmwasm-schema-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-schema-derive.svg)](https://crates.io/crates/cosmwasm-schema-derive) + +This is where all macros related to the +[`cosmwasm-schema`](https://crates.io/crates/cosmwasm-schema) crate live. You +almost certainly don't want to add this crate as an explicit dependency in your +project, but rather import the macros through `cosmwasm-schema`. + +## License + +This package is part of the cosmwasm repository, licensed under the Apache +License 2.0 (see [NOTICE](https://github.com/CosmWasm/cosmwasm/blob/main/NOTICE) +and [LICENSE](https://github.com/CosmWasm/cosmwasm/blob/main/LICENSE)). From c3e7d982bdff14a5be2c076b1293524f61f68df1 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 8 Nov 2022 12:28:26 +0100 Subject: [PATCH 311/344] Revert "Add a README to `cosmwasm-schema-derive`" This reverts commit 05ab1e87a8b8b1da74c48f1845099dd43419c975. --- packages/schema-derive/README.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 packages/schema-derive/README.md diff --git a/packages/schema-derive/README.md b/packages/schema-derive/README.md deleted file mode 100644 index ba2cb5613..000000000 --- a/packages/schema-derive/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# CosmWasm Schema Derive Macros - -[![cosmwasm-schema-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-schema-derive.svg)](https://crates.io/crates/cosmwasm-schema-derive) - -This is where all macros related to the -[`cosmwasm-schema`](https://crates.io/crates/cosmwasm-schema) crate live. You -almost certainly don't want to add this crate as an explicit dependency in your -project, but rather import the macros through `cosmwasm-schema`. - -## License - -This package is part of the cosmwasm repository, licensed under the Apache -License 2.0 (see [NOTICE](https://github.com/CosmWasm/cosmwasm/blob/main/NOTICE) -and [LICENSE](https://github.com/CosmWasm/cosmwasm/blob/main/LICENSE)). From 0f89b654762cb12c31ccab0168b25f0d6f1911c6 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 8 Nov 2022 12:29:53 +0100 Subject: [PATCH 312/344] Add a README to `cosmwasm-schema-derive` --- packages/schema-derive/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/schema-derive/README.md diff --git a/packages/schema-derive/README.md b/packages/schema-derive/README.md new file mode 100644 index 000000000..ba2cb5613 --- /dev/null +++ b/packages/schema-derive/README.md @@ -0,0 +1,14 @@ +# CosmWasm Schema Derive Macros + +[![cosmwasm-schema-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-schema-derive.svg)](https://crates.io/crates/cosmwasm-schema-derive) + +This is where all macros related to the +[`cosmwasm-schema`](https://crates.io/crates/cosmwasm-schema) crate live. You +almost certainly don't want to add this crate as an explicit dependency in your +project, but rather import the macros through `cosmwasm-schema`. + +## License + +This package is part of the cosmwasm repository, licensed under the Apache +License 2.0 (see [NOTICE](https://github.com/CosmWasm/cosmwasm/blob/main/NOTICE) +and [LICENSE](https://github.com/CosmWasm/cosmwasm/blob/main/LICENSE)). From 63ccbed919463a021d8d1fedf3ddb070f9a281cd Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 8 Nov 2022 15:20:48 +0100 Subject: [PATCH 313/344] Remove `cranelift` default feature from all contracts --- contracts/burner/Cargo.toml | 6 +++--- contracts/crypto-verify/Cargo.toml | 5 ++--- contracts/floaty/Cargo.toml | 6 +++--- contracts/ibc-reflect-send/Cargo.toml | 6 +++--- contracts/ibc-reflect/Cargo.toml | 6 +++--- contracts/queue/Cargo.toml | 5 ++--- contracts/reflect/Cargo.toml | 6 +++--- contracts/staking/Cargo.toml | 6 +++--- 8 files changed, 22 insertions(+), 24 deletions(-) diff --git a/contracts/burner/Cargo.toml b/contracts/burner/Cargo.toml index c225cf0f5..93a74b7ef 100644 --- a/contracts/burner/Cargo.toml +++ b/contracts/burner/Cargo.toml @@ -23,9 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces diff --git a/contracts/crypto-verify/Cargo.toml b/contracts/crypto-verify/Cargo.toml index 445c6b2db..0661d6c48 100644 --- a/contracts/crypto-verify/Cargo.toml +++ b/contracts/crypto-verify/Cargo.toml @@ -23,10 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -#default = ["cranelift"] +# Add feature "cranelift" to default if you need 32 bit or ARM support default = [] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces diff --git a/contracts/floaty/Cargo.toml b/contracts/floaty/Cargo.toml index dfef47a17..e16a12643 100644 --- a/contracts/floaty/Cargo.toml +++ b/contracts/floaty/Cargo.toml @@ -23,9 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # For quicker tests, cargo test --lib. for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] diff --git a/contracts/ibc-reflect-send/Cargo.toml b/contracts/ibc-reflect-send/Cargo.toml index ad4d2a17d..396f36b01 100644 --- a/contracts/ibc-reflect-send/Cargo.toml +++ b/contracts/ibc-reflect-send/Cargo.toml @@ -23,9 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces diff --git a/contracts/ibc-reflect/Cargo.toml b/contracts/ibc-reflect/Cargo.toml index cb71659a8..ca0b44bd3 100644 --- a/contracts/ibc-reflect/Cargo.toml +++ b/contracts/ibc-reflect/Cargo.toml @@ -23,9 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces diff --git a/contracts/queue/Cargo.toml b/contracts/queue/Cargo.toml index 9482d51f7..5743c2dac 100644 --- a/contracts/queue/Cargo.toml +++ b/contracts/queue/Cargo.toml @@ -23,10 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to ["cranelift"] if you don't need Windows support and want faster integration tests. -#default = ["cranelift"] +# Add feature "cranelift" to default if you need 32 bit or ARM support default = [] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # For quicker tests, cargo test --lib. for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"] diff --git a/contracts/reflect/Cargo.toml b/contracts/reflect/Cargo.toml index 56b5466b1..eab872fe3 100644 --- a/contracts/reflect/Cargo.toml +++ b/contracts/reflect/Cargo.toml @@ -24,9 +24,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces diff --git a/contracts/staking/Cargo.toml b/contracts/staking/Cargo.toml index 839f8919a..2cb5e43fa 100644 --- a/contracts/staking/Cargo.toml +++ b/contracts/staking/Cargo.toml @@ -23,9 +23,9 @@ incremental = false overflow-checks = true [features] -# Change this to [] if you don't need Windows support and want faster integration tests. -default = ["cranelift"] -# Use cranelift backend instead of singlepass. This is required for development on Windows. +# Add feature "cranelift" to default if you need 32 bit or ARM support +default = [] +# Use cranelift backend instead of singlepass. This is required for development on 32 bit or ARM machines. cranelift = ["cosmwasm-vm/cranelift"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces From fc5cd5b2b84f3b7c3f59526fd568e1ebcf49fae7 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Mon, 14 Nov 2022 13:35:43 +0000 Subject: [PATCH 314/344] rename `coins.rs` to `coin.rs` --- packages/std/src/{coins.rs => coin.rs} | 0 packages/std/src/lib.rs | 4 ++-- packages/std/src/results/cosmos_msg.rs | 2 +- packages/std/src/testing/mock.rs | 2 +- packages/std/src/traits.rs | 2 +- packages/std/src/types.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename packages/std/src/{coins.rs => coin.rs} (100%) diff --git a/packages/std/src/coins.rs b/packages/std/src/coin.rs similarity index 100% rename from packages/std/src/coins.rs rename to packages/std/src/coin.rs diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index 1776f0aec..1f37bed1d 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -5,7 +5,7 @@ mod addresses; mod assertions; mod binary; -mod coins; +mod coin; mod conversion; mod deps; mod errors; @@ -27,7 +27,7 @@ mod types; pub use crate::addresses::{Addr, CanonicalAddr}; pub use crate::binary::Binary; -pub use crate::coins::{coin, coins, has_coins, Coin}; +pub use crate::coin::{coin, coins, has_coins, Coin}; pub use crate::deps::{Deps, DepsMut, OwnedDeps}; pub use crate::errors::{ CheckedFromRatioError, CheckedMultiplyRatioError, ConversionOverflowError, DivideByZeroError, diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index a7aed1657..d72f98ddd 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use std::fmt; use crate::binary::Binary; -use crate::coins::Coin; +use crate::coin::Coin; use crate::errors::StdResult; #[cfg(feature = "stargate")] use crate::ibc::IbcMsg; diff --git a/packages/std/src/testing/mock.rs b/packages/std/src/testing/mock.rs index f9681d1cc..8639d8c7b 100644 --- a/packages/std/src/testing/mock.rs +++ b/packages/std/src/testing/mock.rs @@ -6,7 +6,7 @@ use std::marker::PhantomData; use crate::addresses::{Addr, CanonicalAddr}; use crate::binary::Binary; -use crate::coins::Coin; +use crate::coin::Coin; use crate::deps::OwnedDeps; use crate::errors::{RecoverPubkeyError, StdError, StdResult, SystemError, VerificationError}; #[cfg(feature = "stargate")] diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 7004f568b..57bd5d81b 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -4,7 +4,7 @@ use std::ops::Deref; use crate::addresses::{Addr, CanonicalAddr}; use crate::binary::Binary; -use crate::coins::Coin; +use crate::coin::Coin; use crate::errors::{RecoverPubkeyError, StdError, StdResult, VerificationError}; #[cfg(feature = "iterator")] use crate::iterator::{Order, Record}; diff --git a/packages/std/src/types.rs b/packages/std/src/types.rs index 17f11f00c..782ad1e72 100644 --- a/packages/std/src/types.rs +++ b/packages/std/src/types.rs @@ -2,7 +2,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::addresses::Addr; -use crate::coins::Coin; +use crate::coin::Coin; use crate::timestamp::Timestamp; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] From cbf86c8ae0ae7bbf704332b4c6d7becd85d70761 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 14 Nov 2022 15:51:43 +0100 Subject: [PATCH 315/344] Fix Coin import in ibc.rs --- packages/std/src/ibc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index ed3eb5d86..1ce06432a 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -9,7 +9,7 @@ use std::cmp::{Ord, Ordering, PartialOrd}; #[cfg(feature = "ibc3")] use crate::addresses::Addr; use crate::binary::Binary; -use crate::coins::Coin; +use crate::coin::Coin; use crate::errors::StdResult; use crate::results::{Attribute, CosmosMsg, Empty, Event, SubMsg}; use crate::serde::to_binary; From 814428f1c5dc85aeebb7ac4f6e1f66984875ba52 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Mon, 14 Nov 2022 21:47:27 +0100 Subject: [PATCH 316/344] document schema_for --- CHANGELOG.md | 2 ++ packages/schema/src/schema_for.rs | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 475dc4eaa..9901a0b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ and this project adheres to `-Zminimal-versions` ([#1465]). - cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we cannot properly measure different runtimes for differet Wasm opcodes. +- cosmwasm-schema: schema generation is now locked to produce strictly + `draft-07` schemas [#1465]: https://github.com/CosmWasm/cosmwasm/pull/1465 diff --git a/packages/schema/src/schema_for.rs b/packages/schema/src/schema_for.rs index 4146726d0..3fd771f3b 100644 --- a/packages/schema/src/schema_for.rs +++ b/packages/schema/src/schema_for.rs @@ -1,9 +1,26 @@ +/// Generates a [`RootSchema`](crate::schemars::schema::RootSchema) for the given type using default settings. +/// +/// The type must implement [`JsonSchema`](crate::schemars::JsonSchema). +/// +/// The schema version is strictly `draft-07`. +/// +/// # Example +/// ``` +/// use schemars::{schema_for, JsonSchema}; +/// +/// #[derive(JsonSchema)] +/// struct MyStruct { +/// foo: i32, +/// } +/// +/// let my_schema = schema_for!(MyStruct); +/// ``` #[macro_export] macro_rules! schema_for { ($type:ty) => { $crate::schemars::gen::SchemaGenerator::new($crate::schemars::gen::SchemaSettings::draft07()).into_root_schema_for::<$type>() }; ($_:expr) => { - compile_error!("This argument to `schema_for!` is not a type - did you mean to use `schema_for_value!` instead?") + compile_error!("The argument to `schema_for!` is not a type.") }; } From 76ed13bbcc8c47c5c5d410625ee99eae66ad0bd7 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 15 Nov 2022 10:43:42 +0100 Subject: [PATCH 317/344] Update packages/schema/src/schema_for.rs Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- packages/schema/src/schema_for.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schema/src/schema_for.rs b/packages/schema/src/schema_for.rs index 3fd771f3b..5a42fd834 100644 --- a/packages/schema/src/schema_for.rs +++ b/packages/schema/src/schema_for.rs @@ -6,7 +6,8 @@ /// /// # Example /// ``` -/// use schemars::{schema_for, JsonSchema}; +/// use cosmwasm_schema::schema_for; +/// use schemars::JsonSchema; /// /// #[derive(JsonSchema)] /// struct MyStruct { From c4545c12ee8ed05f385c2c62dbb9c35b517cd424 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 26 Oct 2022 16:32:10 +0200 Subject: [PATCH 318/344] QueryResponses: Add `JsonSchema` bound to type params --- packages/schema-derive/src/query_responses.rs | 27 ++++++++++++++----- packages/schema/tests/idl.rs | 5 +--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 28764b13a..d803cf4e0 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -1,4 +1,4 @@ -use syn::{parse_quote, Expr, ExprTuple, Ident, ItemEnum, ItemImpl, Type, Variant}; +use syn::{parse_quote, Expr, ExprTuple, Generics, Ident, ItemEnum, ItemImpl, Type, Variant}; pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let is_nested = has_attr(&input, "query_responses", "nested"); @@ -8,7 +8,8 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let subquery_calls = input.variants.into_iter().map(parse_subquery); // Handle generics if the type has any - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let (_, type_generics, where_clause) = input.generics.split_for_impl(); + let impl_generics = impl_generics(&input.generics); let subquery_len = subquery_calls.len(); parse_quote! { @@ -31,7 +32,8 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { let mappings = mappings.map(parse_tuple); // Handle generics if the type has any - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let (_, type_generics, where_clause) = input.generics.split_for_impl(); + let impl_generics = impl_generics(&input.generics); parse_quote! { #[automatically_derived] @@ -47,6 +49,17 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { } } +fn impl_generics(impl_generics: &Generics) -> Generics { + let mut impl_generics = impl_generics.to_owned(); + for param in impl_generics.type_params_mut() { + param + .bounds + .push(parse_quote! {::cosmwasm_schema::schemars::JsonSchema}) + } + + impl_generics +} + /// Extract the query -> response mapping out of an enum variant. fn parse_query(v: Variant) -> (String, Expr) { let query = to_snake_case(&v.ident.to_string()); @@ -202,13 +215,13 @@ mod tests { }; let result = query_responses_derive_impl(input); - dbg!(&result); + assert_eq!( result, parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl ::cosmwasm_schema::QueryResponses for QueryMsg { + impl ::cosmwasm_schema::QueryResponses for QueryMsg { fn response_schemas_impl() -> ::std::collections::BTreeMap { ::std::collections::BTreeMap::from([ ("foo".to_string(), ::cosmwasm_schema::schema_for!(bool)), @@ -223,7 +236,7 @@ mod tests { parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl ::cosmwasm_schema::QueryResponses for QueryMsg { + impl ::cosmwasm_schema::QueryResponses for QueryMsg { fn response_schemas_impl() -> ::std::collections::BTreeMap { ::std::collections::BTreeMap::from([ ("foo".to_string(), ::cosmwasm_schema::schema_for!(bool)), @@ -239,7 +252,7 @@ mod tests { parse_quote! { #[automatically_derived] #[cfg(not(target_arch = "wasm32"))] - impl ::cosmwasm_schema::QueryResponses for QueryMsg + impl ::cosmwasm_schema::QueryResponses for QueryMsg where T: std::fmt::Debug + SomeTrait, { fn response_schemas_impl() -> ::std::collections::BTreeMap { diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 6da66487f..82fa913ba 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -109,10 +109,7 @@ fn test_query_responses() { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] -pub enum QueryMsgWithGenerics -where - T: JsonSchema, -{ +pub enum QueryMsgWithGenerics { #[returns(u128)] QueryData { data: T }, } From f409196d41f0c1b75efa46daedf8dce77c2c0a80 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 26 Oct 2022 17:56:04 +0200 Subject: [PATCH 319/344] QueryResponses: Add an option to not infer trait bounds --- packages/schema-derive/src/query_responses.rs | 90 +++++++++++++++---- 1 file changed, 73 insertions(+), 17 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index d803cf4e0..73108c575 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -1,15 +1,22 @@ -use syn::{parse_quote, Expr, ExprTuple, Generics, Ident, ItemEnum, ItemImpl, Type, Variant}; +use std::collections::HashSet; + +use syn::{ + parse_quote, Expr, ExprTuple, Generics, Ident, ItemEnum, ItemImpl, Meta, NestedMeta, Type, + Variant, +}; + +const ATTR_PATH: &str = "query_responses"; pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { - let is_nested = has_attr(&input, "query_responses", "nested"); + let ctx = get_context(&input); - if is_nested { + if ctx.is_nested { let ident = input.ident; let subquery_calls = input.variants.into_iter().map(parse_subquery); // Handle generics if the type has any let (_, type_generics, where_clause) = input.generics.split_for_impl(); - let impl_generics = impl_generics(&input.generics); + let impl_generics = impl_generics(&ctx, &input.generics); let subquery_len = subquery_calls.len(); parse_quote! { @@ -33,7 +40,7 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { // Handle generics if the type has any let (_, type_generics, where_clause) = input.generics.split_for_impl(); - let impl_generics = impl_generics(&input.generics); + let impl_generics = impl_generics(&ctx, &input.generics); parse_quote! { #[automatically_derived] @@ -49,12 +56,69 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { } } -fn impl_generics(impl_generics: &Generics) -> Generics { +struct Context { + is_nested: bool, + no_bounds_for: HashSet, +} + +fn get_context(input: &ItemEnum) -> Context { + let params = input + .attrs + .iter() + .filter(|attr| matches!(attr.path.get_ident(), Some(id) if id.to_string() == ATTR_PATH)) + .map(|attr| { + if let Meta::List(l) = attr.parse_meta().unwrap() { + l.nested + } else { + panic!("{} attribute must contain a meta list", ATTR_PATH); + } + }) + .flatten() + .map(|nested_meta| { + if let NestedMeta::Meta(m) = nested_meta { + m + } else { + panic!("no literals allowed in QueryResponses params") + } + }); + + let mut ctx = Context { + is_nested: false, + no_bounds_for: HashSet::new(), + }; + + for param in params { + match param.path().get_ident().unwrap().to_string().as_str() { + "no_bounds_for" => { + if let Meta::List(l) = param { + for item in l.nested { + match item { + NestedMeta::Meta(Meta::Path(p)) => { + ctx.no_bounds_for.insert(p.get_ident().unwrap().clone()); + } + _ => panic!("`no_bounds_for` only accepts a list of type params"), + } + } + } else { + panic!("expected a list for `no_bounds_for`") + } + } + "nested" => ctx.is_nested = true, + path => panic!("unrecognized QueryResponses param: {}", path), + } + } + + ctx +} + +fn impl_generics(ctx: &Context, impl_generics: &Generics) -> Generics { let mut impl_generics = impl_generics.to_owned(); for param in impl_generics.type_params_mut() { - param - .bounds - .push(parse_quote! {::cosmwasm_schema::schemars::JsonSchema}) + if !ctx.no_bounds_for.contains(¶m.ident) { + param + .bounds + .push(parse_quote! {::cosmwasm_schema::schemars::JsonSchema}) + } } impl_generics @@ -93,14 +157,6 @@ fn parse_subquery(v: Variant) -> Expr { parse_quote!(<#submsg as ::cosmwasm_schema::QueryResponses>::response_schemas_impl()) } -/// Checks whether the input has the given `#[$path($attr))]` attribute -fn has_attr(input: &ItemEnum, path: &str, attr: &str) -> bool { - input.attrs.iter().any(|a| { - a.path.get_ident().unwrap() == path - && a.parse_args::().ok().map_or(false, |i| i == attr) - }) -} - fn parse_tuple((q, r): (String, Expr)) -> ExprTuple { parse_quote! { (#q.to_string(), #r) From 9e51b78314047fbe9af3a44f22a2ee5bc4ea4190 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Wed, 26 Oct 2022 23:43:12 +0200 Subject: [PATCH 320/344] lints --- packages/schema-derive/src/query_responses.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 73108c575..64bdb85b7 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -65,15 +65,14 @@ fn get_context(input: &ItemEnum) -> Context { let params = input .attrs .iter() - .filter(|attr| matches!(attr.path.get_ident(), Some(id) if id.to_string() == ATTR_PATH)) - .map(|attr| { + .filter(|attr| matches!(attr.path.get_ident(), Some(id) if *id == ATTR_PATH)) + .flat_map(|attr| { if let Meta::List(l) = attr.parse_meta().unwrap() { l.nested } else { panic!("{} attribute must contain a meta list", ATTR_PATH); } }) - .flatten() .map(|nested_meta| { if let NestedMeta::Meta(m) = nested_meta { m From 5cc72c6a5c283cad4af3f882d9a22980c6142710 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Thu, 27 Oct 2022 00:18:15 +0200 Subject: [PATCH 321/344] schema: refactor and docs --- packages/schema-derive/src/query_responses.rs | 71 +++---------------- .../src/query_responses/context.rs | 63 ++++++++++++++++ packages/schema/src/query_response.rs | 28 ++++++-- 3 files changed, 95 insertions(+), 67 deletions(-) create mode 100644 packages/schema-derive/src/query_responses/context.rs diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 64bdb85b7..7c8d32a64 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -1,14 +1,11 @@ -use std::collections::HashSet; +mod context; -use syn::{ - parse_quote, Expr, ExprTuple, Generics, Ident, ItemEnum, ItemImpl, Meta, NestedMeta, Type, - Variant, -}; +use syn::{parse_quote, Expr, ExprTuple, Generics, ItemEnum, ItemImpl, Type, Variant}; -const ATTR_PATH: &str = "query_responses"; +use self::context::Context; pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { - let ctx = get_context(&input); + let ctx = context::get_context(&input); if ctx.is_nested { let ident = input.ident; @@ -56,62 +53,10 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { } } -struct Context { - is_nested: bool, - no_bounds_for: HashSet, -} - -fn get_context(input: &ItemEnum) -> Context { - let params = input - .attrs - .iter() - .filter(|attr| matches!(attr.path.get_ident(), Some(id) if *id == ATTR_PATH)) - .flat_map(|attr| { - if let Meta::List(l) = attr.parse_meta().unwrap() { - l.nested - } else { - panic!("{} attribute must contain a meta list", ATTR_PATH); - } - }) - .map(|nested_meta| { - if let NestedMeta::Meta(m) = nested_meta { - m - } else { - panic!("no literals allowed in QueryResponses params") - } - }); - - let mut ctx = Context { - is_nested: false, - no_bounds_for: HashSet::new(), - }; - - for param in params { - match param.path().get_ident().unwrap().to_string().as_str() { - "no_bounds_for" => { - if let Meta::List(l) = param { - for item in l.nested { - match item { - NestedMeta::Meta(Meta::Path(p)) => { - ctx.no_bounds_for.insert(p.get_ident().unwrap().clone()); - } - _ => panic!("`no_bounds_for` only accepts a list of type params"), - } - } - } else { - panic!("expected a list for `no_bounds_for`") - } - } - "nested" => ctx.is_nested = true, - path => panic!("unrecognized QueryResponses param: {}", path), - } - } - - ctx -} - -fn impl_generics(ctx: &Context, impl_generics: &Generics) -> Generics { - let mut impl_generics = impl_generics.to_owned(); +/// Takes a list of generics from the type definition and produces a list of generics +/// for the expanded `impl` block, adding trait bounds like `JsonSchema` as appropriate. +fn impl_generics(ctx: &Context, generics: &Generics) -> Generics { + let mut impl_generics = generics.to_owned(); for param in impl_generics.type_params_mut() { if !ctx.no_bounds_for.contains(¶m.ident) { param diff --git a/packages/schema-derive/src/query_responses/context.rs b/packages/schema-derive/src/query_responses/context.rs new file mode 100644 index 000000000..ed7f425f1 --- /dev/null +++ b/packages/schema-derive/src/query_responses/context.rs @@ -0,0 +1,63 @@ +use std::collections::HashSet; + +use syn::{Ident, ItemEnum, Meta, NestedMeta}; + +const ATTR_PATH: &str = "query_responses"; + +pub struct Context { + /// If the enum we're trying to derive QueryResponses for collects other QueryMsgs, + /// setting this flag will derive the implementation appropriately, collecting all + /// KV pairs from the nested enums rather than expecting `#[return]` annotations. + pub is_nested: bool, + /// Disable infering the `JsonSchema` trait bound for chosen type parameters. + pub no_bounds_for: HashSet, +} + +pub fn get_context(input: &ItemEnum) -> Context { + let params = input + .attrs + .iter() + .filter(|attr| matches!(attr.path.get_ident(), Some(id) if *id == ATTR_PATH)) + .flat_map(|attr| { + if let Meta::List(l) = attr.parse_meta().unwrap() { + l.nested + } else { + panic!("{} attribute must contain a meta list", ATTR_PATH); + } + }) + .map(|nested_meta| { + if let NestedMeta::Meta(m) = nested_meta { + m + } else { + panic!("no literals allowed in QueryResponses params") + } + }); + + let mut ctx = Context { + is_nested: false, + no_bounds_for: HashSet::new(), + }; + + for param in params { + match param.path().get_ident().unwrap().to_string().as_str() { + "no_bounds_for" => { + if let Meta::List(l) = param { + for item in l.nested { + match item { + NestedMeta::Meta(Meta::Path(p)) => { + ctx.no_bounds_for.insert(p.get_ident().unwrap().clone()); + } + _ => panic!("`no_bounds_for` only accepts a list of type params"), + } + } + } else { + panic!("expected a list for `no_bounds_for`") + } + } + "nested" => ctx.is_nested = true, + path => panic!("unrecognized QueryResponses param: {}", path), + } + } + + ctx +} diff --git a/packages/schema/src/query_response.rs b/packages/schema/src/query_response.rs index 03e9d90da..20cf84e26 100644 --- a/packages/schema/src/query_response.rs +++ b/packages/schema/src/query_response.rs @@ -13,7 +13,7 @@ pub use cosmwasm_schema_derive::QueryResponses; /// /// Using the derive macro is the preferred way of implementing this trait. /// -/// # Example +/// # Examples /// ``` /// use cosmwasm_schema::QueryResponses; /// use schemars::JsonSchema; @@ -30,20 +30,40 @@ pub use cosmwasm_schema_derive::QueryResponses; /// #[returns(AccountInfo)] /// AccountInfo { account: String }, /// } +/// ``` +/// +/// You can compose multiple queries using `#[query_responses(nested)]`. This might be useful +/// together with `#[serde(untagged)]`. If the `nested` flag is set, no `returns` attributes +/// are necessary on the enum variants. Instead, the response types are collected from the +/// nested enums. /// -/// // You can also compose multiple queries using #[query_responses(nested)]: +/// ``` +/// # use cosmwasm_schema::QueryResponses; +/// # use schemars::JsonSchema; /// #[derive(JsonSchema, QueryResponses)] /// #[query_responses(nested)] /// #[serde(untagged)] -/// enum QueryMsg2 { -/// MsgA(QueryMsg), +/// enum QueryMsg { +/// MsgA(QueryA), /// MsgB(QueryB), /// } +/// +/// #[derive(JsonSchema, QueryResponses)] +/// enum QueryA { +/// #[returns(Vec)] +/// Denoms {}, +/// } +/// /// #[derive(JsonSchema, QueryResponses)] /// enum QueryB { /// #[returns(AccountInfo)] /// AccountInfo { account: String }, /// } +/// +/// # #[derive(JsonSchema)] +/// # struct AccountInfo { +/// # IcqHandle: String, +/// # } /// ``` pub trait QueryResponses: JsonSchema { fn response_schemas() -> Result, IntegrityError> { From ab80fae28a54bb87170acee28a02f4c4f4453867 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 15 Nov 2022 13:12:45 +0100 Subject: [PATCH 322/344] Make QueryResponses tests clearer --- packages/schema/tests/idl.rs | 42 +++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 82fa913ba..e09bc571f 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -109,7 +109,17 @@ fn test_query_responses() { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(rename_all = "snake_case")] -pub enum QueryMsgWithGenerics { +pub enum QueryMsgWithGenerics { + #[returns(u128)] + QueryData { data: T }, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsgWithGenericsAndTraitBounds +where + T: PartialEq, +{ #[returns(u128)] QueryData { data: T }, } @@ -144,6 +154,36 @@ fn test_query_responses_generics() { api.get("responses").unwrap().get("query_data").unwrap(); } +#[test] +fn test_query_responses_generics_and_trait_bounds() { + let api_str = generate_api! { + instantiate: InstantiateMsg, + query: QueryMsgWithGenericsAndTraitBounds, + } + .render() + .to_string() + .unwrap(); + + let api: Value = serde_json::from_str(&api_str).unwrap(); + let queries = api + .get("query") + .unwrap() + .get("oneOf") + .unwrap() + .as_array() + .unwrap(); + + // Find the "query_data" query in the queries schema + assert_eq!(queries.len(), 1); + assert_eq!( + queries[0].get("required").unwrap().get(0).unwrap(), + "query_data" + ); + + // Find the "query_data" query in responses + api.get("responses").unwrap().get("query_data").unwrap(); +} + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] #[serde(untagged)] #[query_responses(nested)] From 58dbba499743f79d8c385ac7d32eb4e0762ea1c9 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 15 Nov 2022 13:19:18 +0100 Subject: [PATCH 323/344] CHANGELOG entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9901a0b99..a0b734add 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to `CanonicalAddr` ([#1463]). - cosmwasm-std: Implement `PartialEq` between `CanonicalAddr` and `HexBinary`/`Binary` ([#1463]). +- cosmwasm-schema: `QueryResponses` [#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 @@ -25,6 +26,9 @@ and this project adheres to cannot properly measure different runtimes for differet Wasm opcodes. - cosmwasm-schema: schema generation is now locked to produce strictly `draft-07` schemas +- cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound + on the generated `impl` block. This allows the contract dev to not add a + `JsonSchema` trait bound on the type itself. [#1465]: https://github.com/CosmWasm/cosmwasm/pull/1465 From 76136233a057022c8fe0d680e260c76edd19e6ea Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 15 Nov 2022 13:24:32 +0100 Subject: [PATCH 324/344] Update CHANGELOG.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b734add..b25e01a5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ and this project adheres to `CanonicalAddr` ([#1463]). - cosmwasm-std: Implement `PartialEq` between `CanonicalAddr` and `HexBinary`/`Binary` ([#1463]). -- cosmwasm-schema: `QueryResponses` [#1463]: https://github.com/CosmWasm/cosmwasm/pull/1463 From 89e6a04a7fb3ba06b68db9cb6efeef4a7e79d8cb Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 15 Nov 2022 22:34:25 +0100 Subject: [PATCH 325/344] Document type of gas that is used for gas limits SubMsg uses Cosmos SDK gas and instances use CosmWasm gas --- packages/std/src/results/submessages.rs | 2 ++ packages/vm/src/environment.rs | 2 ++ packages/vm/src/instance.rs | 1 + packages/vm/src/testing/instance.rs | 3 +++ 4 files changed, 8 insertions(+) diff --git a/packages/std/src/results/submessages.rs b/packages/std/src/results/submessages.rs index bab8fa3dd..138680c1e 100644 --- a/packages/std/src/results/submessages.rs +++ b/packages/std/src/results/submessages.rs @@ -33,6 +33,7 @@ pub struct SubMsg { /// This is typically used to match `Reply`s in the `reply` entry point to the submessage. pub id: u64, pub msg: CosmosMsg, + /// Gas limit measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). pub gas_limit: Option, pub reply_on: ReplyOn, } @@ -67,6 +68,7 @@ impl SubMsg { } /// Add a gas limit to the message. + /// This gas limit measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). /// /// ## Examples /// diff --git a/packages/vm/src/environment.rs b/packages/vm/src/environment.rs index e915c151f..d66aa88c8 100644 --- a/packages/vm/src/environment.rs +++ b/packages/vm/src/environment.rs @@ -56,6 +56,8 @@ impl Default for GasConfig { pub struct GasState { /// Gas limit for the computation, including internally and externally used gas. /// This is set when the Environment is created and never mutated. + /// + /// Measured in [CosmWasm gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). pub gas_limit: u64, /// Tracking the gas used in the Cosmos SDK, in CosmWasm gas units. pub externally_used_gas: u64, diff --git a/packages/vm/src/instance.rs b/packages/vm/src/instance.rs index 20b9bf953..66801435c 100644 --- a/packages/vm/src/instance.rs +++ b/packages/vm/src/instance.rs @@ -35,6 +35,7 @@ pub struct GasReport { #[derive(Copy, Clone, Debug)] pub struct InstanceOptions { + /// Gas limit measured in [CosmWasm gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). pub gas_limit: u64, pub print_debug: bool, } diff --git a/packages/vm/src/testing/instance.rs b/packages/vm/src/testing/instance.rs index a5aeeb6ac..6311c10a6 100644 --- a/packages/vm/src/testing/instance.rs +++ b/packages/vm/src/testing/instance.rs @@ -62,6 +62,8 @@ pub fn mock_instance_with_balances( ) } +/// Creates an instance from the given Wasm bytecode. +/// The gas limit is measured in [CosmWasm gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). pub fn mock_instance_with_gas_limit( wasm: &[u8], gas_limit: u64, @@ -86,6 +88,7 @@ pub struct MockInstanceOptions<'a> { // instance pub available_capabilities: HashSet, + /// Gas limit measured in [CosmWasm gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md). pub gas_limit: u64, pub print_debug: bool, /// Memory limit in bytes. Use a value that is divisible by the Wasm page size 65536, e.g. full MiBs. From 5c6591b446a3125d6aa7e802bc347093a864fe49 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 15 Nov 2022 23:02:24 +0100 Subject: [PATCH 326/344] Update schemas --- contracts/reflect/schema/reflect.json | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index c6785c78c..515e97eac 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -638,6 +638,7 @@ ], "properties": { "gas_limit": { + "description": "Gas limit measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md).", "type": [ "integer", "null" From 535de3bc0b8600387c31796a864f97f0d699fd7c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 16 Nov 2022 01:57:25 +0100 Subject: [PATCH 327/344] Add comment regarding rounding behaviour to multiply_ratio/checked_multiply_ratio --- packages/std/src/math/uint128.rs | 10 ++++++++-- packages/std/src/math/uint256.rs | 10 ++++++++-- packages/std/src/math/uint64.rs | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/std/src/math/uint128.rs b/packages/std/src/math/uint128.rs index 741aca481..f6d804118 100644 --- a/packages/std/src/math/uint128.rs +++ b/packages/std/src/math/uint128.rs @@ -80,7 +80,10 @@ impl Uint128 { self.0.pow(exp).into() } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn multiply_ratio, B: Into>( &self, numerator: A, @@ -95,7 +98,10 @@ impl Uint128 { } } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn checked_multiply_ratio, B: Into>( &self, numerator: A, diff --git a/packages/std/src/math/uint256.rs b/packages/std/src/math/uint256.rs index bae551dbe..3469b1d80 100644 --- a/packages/std/src/math/uint256.rs +++ b/packages/std/src/math/uint256.rs @@ -163,7 +163,10 @@ impl Uint256 { Self(res) } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn multiply_ratio, B: Into>( &self, numerator: A, @@ -178,7 +181,10 @@ impl Uint256 { } } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn checked_multiply_ratio, B: Into>( &self, numerator: A, diff --git a/packages/std/src/math/uint64.rs b/packages/std/src/math/uint64.rs index 1eb8678cb..57cf1154f 100644 --- a/packages/std/src/math/uint64.rs +++ b/packages/std/src/math/uint64.rs @@ -76,7 +76,10 @@ impl Uint64 { self.0.pow(exp).into() } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn multiply_ratio, B: Into>( &self, numerator: A, @@ -91,7 +94,10 @@ impl Uint64 { } } - /// Returns `self * numerator / denominator` + /// Returns `self * numerator / denominator`. + /// + /// Due to the nature of the integer division involved, the result is always floored. + /// E.g. 5 * 99/100 = 4. pub fn checked_multiply_ratio, B: Into>( &self, numerator: A, From ee49c149d7075cc06b9c57994ae8d6c23c2c1db1 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 16 Nov 2022 14:13:19 +0100 Subject: [PATCH 328/344] Use resolver version 2 in workspace --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 50b55c542..311069d0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,7 @@ [workspace] members = ["packages/*"] exclude = ["contracts"] + +# Resolver has to be set explicitely in workspaces +# due to https://github.com/rust-lang/cargo/issues/9956 +resolver = "2" From 0fe51c648435bc284a925aaa32d5e0e1113e1668 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 16 Nov 2022 14:40:22 +0100 Subject: [PATCH 329/344] Adapt codebase to clippy 1.65.0 --- contracts/floaty/src/contract.rs | 2 +- contracts/hackatom/src/contract.rs | 4 ++-- packages/crypto/src/ed25519.rs | 8 ++++---- packages/std/src/binary.rs | 2 +- packages/storage/src/bucket.rs | 2 +- packages/storage/src/singleton.rs | 2 +- packages/vm/src/cache.rs | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contracts/floaty/src/contract.rs b/contracts/floaty/src/contract.rs index 5dde0a21e..bff239789 100644 --- a/contracts/floaty/src/contract.rs +++ b/contracts/floaty/src/contract.rs @@ -58,7 +58,7 @@ pub fn execute( to_address: to_addr.into(), amount: balance, }) - .set_data(&[0xF0, 0x0B, 0xAA]); + .set_data([0xF0, 0x0B, 0xAA]); Ok(resp) } else { Err(HackError::Unauthorized {}) diff --git a/contracts/hackatom/src/contract.rs b/contracts/hackatom/src/contract.rs index a5780142c..8365b78b5 100644 --- a/contracts/hackatom/src/contract.rs +++ b/contracts/hackatom/src/contract.rs @@ -99,7 +99,7 @@ fn do_release(deps: DepsMut, env: Env, info: MessageInfo) -> Result Ok(true), Err(_) => Ok(false), } @@ -182,7 +182,7 @@ mod tests { fn test_ed25519_verify() { let message = MSG.as_bytes(); // Signing - let secret_key = SigningKey::new(&mut OsRng); + let secret_key = SigningKey::new(OsRng); let signature = secret_key.sign(message); let public_key = VerificationKey::from(&secret_key); @@ -199,7 +199,7 @@ mod tests { assert!(!ed25519_verify(&bad_message, &signature_bytes, &public_key_bytes).unwrap()); // Other pubkey fails - let other_secret_key = SigningKey::new(&mut OsRng); + let other_secret_key = SigningKey::new(OsRng); let other_public_key = VerificationKey::from(&other_secret_key); let other_public_key_bytes: [u8; 32] = other_public_key.into(); assert!(!ed25519_verify(message, &signature_bytes, &other_public_key_bytes).unwrap()); @@ -226,7 +226,7 @@ mod tests { assert_eq!( signature_bytes, - hex::decode(&COSMOS_ED25519_SIGNATURE_HEX) + hex::decode(COSMOS_ED25519_SIGNATURE_HEX) .unwrap() .as_slice() ); diff --git a/packages/std/src/binary.rs b/packages/std/src/binary.rs index fc66df941..4ee4b253f 100644 --- a/packages/std/src/binary.rs +++ b/packages/std/src/binary.rs @@ -18,7 +18,7 @@ impl Binary { /// take an (untrusted) string and decode it into bytes. /// fails if it is not valid base64 pub fn from_base64(encoded: &str) -> StdResult { - let binary = base64::decode(&encoded).map_err(StdError::invalid_base64)?; + let binary = base64::decode(encoded).map_err(StdError::invalid_base64)?; Ok(Binary(binary)) } diff --git a/packages/storage/src/bucket.rs b/packages/storage/src/bucket.rs index 47e2fb36c..dd9e482f3 100644 --- a/packages/storage/src/bucket.rs +++ b/packages/storage/src/bucket.rs @@ -295,7 +295,7 @@ mod tests { d.age += 1; Ok(d) }; - let output = bucket.update(b"maria", &birthday).unwrap(); + let output = bucket.update(b"maria", birthday).unwrap(); let expected = Data { name: "Maria".to_string(), age: 43, diff --git a/packages/storage/src/singleton.rs b/packages/storage/src/singleton.rs index 6d3fce6ca..782002b97 100644 --- a/packages/storage/src/singleton.rs +++ b/packages/storage/src/singleton.rs @@ -251,7 +251,7 @@ mod tests { }; writer.save(&cfg).unwrap(); - let output = writer.update(&|_c| { + let output = writer.update(|_c| { Err(StdError::from(OverflowError::new( OverflowOperation::Sub, 4, diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index af59bbe97..6310f3ca4 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -172,7 +172,7 @@ where } fn load_wasm_with_path(&self, wasm_path: &Path, checksum: &Checksum) -> VmResult> { - let code = load_wasm_from_disk(&wasm_path, checksum)?; + let code = load_wasm_from_disk(wasm_path, checksum)?; // verify hash matches (integrity check) if Checksum::generate(&code) != *checksum { Err(VmError::integrity_err()) From 996f32d4a4f66b9e1724c792e1fc00eecd6c6093 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 16 Nov 2022 14:42:10 +0100 Subject: [PATCH 330/344] Upgrade clippy CI job to 1.65.0 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86559e71b..01ce7296d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.59.0", "1.64.0"] + rust-version: ["1.59.0", "1.65.0"] - benchmarking: requires: - package_vm From a08af6cfd7de8588fabccc19e92db0b52b0f2b52 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 16 Nov 2022 18:07:31 +0100 Subject: [PATCH 331/344] Set version: 1.1.6 --- CHANGELOG.md | 5 ++++- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 20 files changed, 96 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b25e01a5f..8847ec6ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.6] - 2022-11-16 + ### Added - cosmwasm-std: Add `From` implementations to convert between @@ -1521,7 +1523,8 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.5...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.6...HEAD +[1.1.6]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.5...v1.1.6 [1.1.5]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.4...v1.1.5 [1.1.4]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.3...v1.1.4 [1.1.3]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.2...v1.1.3 diff --git a/Cargo.lock b/Cargo.lock index 08d78e81a..a0c1c8f27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.5" +version = "1.1.6" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "syn", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -307,7 +307,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "chrono", @@ -327,7 +327,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -335,7 +335,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index affe23f6a..aab6e4eb2 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index a045b082b..70e33e062 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index e8a751704..0b83be8a3 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index e13bdb284..500aa21fd 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 68437cf41..8390c799d 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index bdcb966e9..5049396e6 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index ed9512973..98831f427 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index cf7fa0c42..cd65a4253 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 37ba82fbb..881705e2a 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index d8ec30573..4e52d9f26 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" dependencies = [ "bitflags", "bytecheck", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 692a7881a..16298994c 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.5" +version = "1.1.6" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1.0.57" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.5" } -cosmwasm-std = { path = "../std", version = "1.1.5" } +cosmwasm-vm = { path = "../vm", version = "1.1.6" } +cosmwasm-std = { path = "../std", version = "1.1.6" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 106e9fc2d..e8177964f 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.5" +version = "1.1.6" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 96dd06795..36bbf3838 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.5" +version = "1.1.6" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 60ae818d7..5476c1fe6 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.5" +version = "1.1.6" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index cc859addf..efde157f5 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.5" +version = "1.1.6" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.5", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.6", path = "../schema-derive" } schemars = "0.8.3" serde = "1.0" serde_json = "1.0.40" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index acc8faa5e..0c792c491 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.5" +version = "1.1.6" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.5" } +cosmwasm-derive = { path = "../derive", version = "1.1.6" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0.13" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.6" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index da9736e87..38c7b5fab 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.5" +version = "1.1.6" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.5", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.6", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index da7857ee7..adaadd9f1 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.5" +version = "1.1.6" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.5", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.5" } +cosmwasm-std = { path = "../std", version = "1.1.6", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.6" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.3" From 518850cf49f1f3f9fd6fe00eea8a8c716689a51a Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 21:01:39 +0100 Subject: [PATCH 332/344] QueryResponses: no default type in gen'd impl block --- CHANGELOG.md | 9 +++++++-- packages/schema-derive/src/query_responses.rs | 4 ++++ packages/schema/tests/idl.rs | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8847ec6ff..729dc5dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to ## [Unreleased] +### Fixed + +- cosmwasm-schema: Fix type params on `QueryMsg` causing a compiler error when + used with the `QueryResponses` derive macro. + ## [1.1.6] - 2022-11-16 ### Added @@ -23,8 +28,8 @@ and this project adheres to - all: Bump a few dependency versions to make the codebase compile with `-Zminimal-versions` ([#1465]). -- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we - cannot properly measure different runtimes for differet Wasm opcodes. +- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that + we cannot properly measure different runtimes for differet Wasm opcodes. - cosmwasm-schema: schema generation is now locked to produce strictly `draft-07` schemas - cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound diff --git a/packages/schema-derive/src/query_responses.rs b/packages/schema-derive/src/query_responses.rs index 7c8d32a64..195bb93d7 100644 --- a/packages/schema-derive/src/query_responses.rs +++ b/packages/schema-derive/src/query_responses.rs @@ -58,6 +58,10 @@ pub fn query_responses_derive_impl(input: ItemEnum) -> ItemImpl { fn impl_generics(ctx: &Context, generics: &Generics) -> Generics { let mut impl_generics = generics.to_owned(); for param in impl_generics.type_params_mut() { + // remove the default type if present, as those are invalid in + // a trait implementation + param.default = None; + if !ctx.no_bounds_for.contains(¶m.ident) { param .bounds diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index e09bc571f..5f1f8b036 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -124,6 +124,13 @@ where QueryData { data: T }, } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, QueryResponses)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsgWithGenericsAndDefaultType { + #[returns(u128)] + QueryData { data: T }, +} + #[test] fn test_query_responses_generics() { let api_str = generate_api! { From f5597d4c6009d3a8d3495c3cd987aca7adcd70ad Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 21:07:24 +0100 Subject: [PATCH 333/344] run .md formatter --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 729dc5dae..52d0b460b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,8 +28,8 @@ and this project adheres to - all: Bump a few dependency versions to make the codebase compile with `-Zminimal-versions` ([#1465]). -- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that - we cannot properly measure different runtimes for differet Wasm opcodes. +- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we + cannot properly measure different runtimes for differet Wasm opcodes. - cosmwasm-schema: schema generation is now locked to produce strictly `draft-07` schemas - cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound From bf2b34670f30f6610f18898d74a3a9643b3c2ff5 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 23:13:12 +0100 Subject: [PATCH 334/344] Set version: 1.1.8 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0c1c8f27..841f420b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.6" +version = "1.1.8" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "syn", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -307,7 +307,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "chrono", @@ -327,7 +327,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -335,7 +335,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index aab6e4eb2..d7c2559c1 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 70e33e062..cd0e7537e 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 0b83be8a3..4a16a453e 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 500aa21fd..0109cbb93 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 8390c799d..269d5a282 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 5049396e6..0960cc955 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 98831f427..6d65820fb 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index cd65a4253..5f8d19de9 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 881705e2a..9a4b45857 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 4e52d9f26..6cd13c3e0 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" dependencies = [ "bitflags", "bytecheck", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 16298994c..c5f406f18 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.6" +version = "1.1.8" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1.0.57" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.6" } -cosmwasm-std = { path = "../std", version = "1.1.6" } +cosmwasm-vm = { path = "../vm", version = "1.1.8" } +cosmwasm-std = { path = "../std", version = "1.1.8" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index e8177964f..72435158d 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.6" +version = "1.1.8" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index 36bbf3838..f50fd0fea 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.6" +version = "1.1.8" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index 5476c1fe6..f99e6a9ac 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.6" +version = "1.1.8" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index efde157f5..543e9c460 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.6" +version = "1.1.8" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.6", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.8", path = "../schema-derive" } schemars = "0.8.3" serde = "1.0" serde_json = "1.0.40" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 0c792c491..8401f5239 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.6" +version = "1.1.8" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.6" } +cosmwasm-derive = { path = "../derive", version = "1.1.8" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0.13" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.6" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.8" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 38c7b5fab..48b4fc5b3 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.6" +version = "1.1.8" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.6", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.8", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index adaadd9f1..3685730c5 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.6" +version = "1.1.8" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.6", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.6" } +cosmwasm-std = { path = "../std", version = "1.1.8", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.8" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.3" From d1d36436749d1399eb1a5eb5cbca6676cab7b335 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 23:57:20 +0100 Subject: [PATCH 335/344] CHANGELOG update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d0b460b..1c075e7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.8] - 2022-11-22 + ### Fixed - cosmwasm-schema: Fix type params on `QueryMsg` causing a compiler error when From 37555ee994e42a0edcacb5b1fcfa0cbaa439dc62 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 6 Dec 2022 17:23:50 +0100 Subject: [PATCH 336/344] Add test to reproduce missing QueryResponses path --- packages/schema/tests/idl.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/schema/tests/idl.rs b/packages/schema/tests/idl.rs index 5f1f8b036..d6f00d4f5 100644 --- a/packages/schema/tests/idl.rs +++ b/packages/schema/tests/idl.rs @@ -77,6 +77,32 @@ fn test_basic_structure() { ); } +// Test to reproduce https://github.com/CosmWasm/cosmwasm/issues/1527 +#[test] +fn generate_api_works_when_only_types_are_imported() { + mod my_api_generator { + // Note super::QueryResponses is not imported in that case. + use super::generate_api; + use super::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg}; + + pub fn generate() { + let _api_str = generate_api! { + name: "test", + version: "0.1.0", + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + sudo: SudoMsg, + migrate: MigrateMsg, + } + .render() + .to_string() + .unwrap(); + } + } + my_api_generator::generate(); +} + #[test] fn test_query_responses() { let api_str = generate_api! { From 9b6ffba4c528c3b412789ed6a3f7a9ab8c8e42ed Mon Sep 17 00:00:00 2001 From: Chris Ricketts Date: Thu, 1 Dec 2022 18:39:57 +0000 Subject: [PATCH 337/344] fix: issue #1527 --- packages/schema-derive/src/generate_api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-derive/src/generate_api.rs b/packages/schema-derive/src/generate_api.rs index f3f8bbcaa..b275ca561 100644 --- a/packages/schema-derive/src/generate_api.rs +++ b/packages/schema-derive/src/generate_api.rs @@ -166,7 +166,7 @@ impl Parse for Options { let ty = ty.unwrap_type(); ( quote! {Some(::cosmwasm_schema::schema_for!(#ty))}, - quote! { Some(<#ty as QueryResponses>::response_schemas().unwrap()) }, + quote! { Some(<#ty as ::cosmwasm_schema::QueryResponses>::response_schemas().unwrap()) }, ) } None => (quote! { None }, quote! { None }), @@ -272,7 +272,7 @@ mod tests { query: Some(::cosmwasm_schema::schema_for!(QueryMsg)), migrate: Some(::cosmwasm_schema::schema_for!(MigrateMsg)), sudo: Some(::cosmwasm_schema::schema_for!(SudoMsg)), - responses: Some(::response_schemas().unwrap()), + responses: Some(::response_schemas().unwrap()), } } ); From 40b05d39aa0d902acc9983b485f815535a27fcbd Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 6 Dec 2022 17:29:08 +0100 Subject: [PATCH 338/344] Add CHANGELOG entry for issue #1527 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c075e7a6..18937cc7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to ## [Unreleased] +### Fixed + +- cosmwasm-schema: Fix type fully qualified path to symbol `QueryResponses` in + macro `cosmwasm_schema::generate_api!` ([#1527]). + +[#1527]: https://github.com/CosmWasm/cosmwasm/issues/1527 + ## [1.1.8] - 2022-11-22 ### Fixed From f944ef9b02988b836503536a73ea395403ce0fca Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 6 Dec 2022 17:54:22 +0100 Subject: [PATCH 339/344] Update CHANGELOG formatting --- CHANGELOG.md | 4 ++-- devtools/format_md.sh | 2 +- devtools/format_yml.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18937cc7a..9dac51f47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,8 @@ and this project adheres to - all: Bump a few dependency versions to make the codebase compile with `-Zminimal-versions` ([#1465]). -- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we - cannot properly measure different runtimes for differet Wasm opcodes. +- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that + we cannot properly measure different runtimes for differet Wasm opcodes. - cosmwasm-schema: schema generation is now locked to produce strictly `draft-07` schemas - cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound diff --git a/devtools/format_md.sh b/devtools/format_md.sh index 1ad0f38f3..f45b8c690 100755 --- a/devtools/format_md.sh +++ b/devtools/format_md.sh @@ -11,4 +11,4 @@ while getopts c option; do esac done -npx prettier@2.2.1 --$op "./**/*.md" +npx prettier@2.7.1 --$op "./**/*.md" diff --git a/devtools/format_yml.sh b/devtools/format_yml.sh index 36d684bf5..142ca7a43 100755 --- a/devtools/format_yml.sh +++ b/devtools/format_yml.sh @@ -11,4 +11,4 @@ while getopts c option; do esac done -npx prettier@2.2.1 --$op "./**/*.yml" +npx prettier@2.7.1 --$op "./**/*.yml" From 38821e78e7ef63650dc22aea9c3d5e40082fbed4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 6 Dec 2022 18:00:41 +0100 Subject: [PATCH 340/344] Set version: 1.1.9 --- CHANGELOG.md | 6 +++++- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 14 +++++++------- contracts/cyberpunk/Cargo.lock | 14 +++++++------- contracts/floaty/Cargo.lock | 14 +++++++------- contracts/hackatom/Cargo.lock | 14 +++++++------- contracts/ibc-reflect-send/Cargo.lock | 14 +++++++------- contracts/ibc-reflect/Cargo.lock | 14 +++++++------- contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 14 +++++++------- contracts/staking/Cargo.lock | 14 +++++++------- packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 4 ++-- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 20 files changed, 97 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dac51f47..f365e5925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.1.9] - 2022-12-06 + ### Fixed - cosmwasm-schema: Fix type fully qualified path to symbol `QueryResponses` in @@ -1537,7 +1539,9 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.6...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.9...HEAD +[1.1.9]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.8...v1.1.9 +[1.1.8]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.6...v1.1.8 [1.1.6]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.5...v1.1.6 [1.1.5]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.4...v1.1.5 [1.1.4]: https://github.com/CosmWasm/cosmwasm/compare/v1.1.3...v1.1.4 diff --git a/Cargo.lock b/Cargo.lock index 841f420b5..452ae792e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.1.8" +version = "1.1.9" dependencies = [ "anyhow", "clap", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "criterion", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "syn", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -307,7 +307,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "chrono", @@ -327,7 +327,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -335,7 +335,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index d7c2559c1..9aa8268e0 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -185,14 +185,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index cd0e7537e..89c1b0fa6 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -180,14 +180,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 4a16a453e..bb60f23f9 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -203,14 +203,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 0109cbb93..1f8896e46 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 269d5a282..1e4b664d7 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index 0960cc955..85313cae0 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 6d65820fb..63e0de31e 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index 5f8d19de9..7887dbb95 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 9a4b45857..10257afce 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 6cd13c3e0..8e9bd98fa 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" dependencies = [ "digest 0.10.3", "ed25519-zebra", @@ -174,14 +174,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" dependencies = [ "proc-macro2", "quote", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" dependencies = [ "base64", "cosmwasm-crypto", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" dependencies = [ "cosmwasm-std", "serde", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" dependencies = [ "bitflags", "bytecheck", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index c5f406f18..2d094890a 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.1.8" +version = "1.1.9" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,5 +11,5 @@ license = "Apache-2.0" anyhow = "1.0.57" clap = "2" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.1.8" } -cosmwasm-std = { path = "../std", version = "1.1.8" } +cosmwasm-vm = { path = "../vm", version = "1.1.9" } +cosmwasm-std = { path = "../std", version = "1.1.9" } diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 72435158d..c5b07db3c 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.1.8" +version = "1.1.9" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index f50fd0fea..939cebab5 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.1.8" +version = "1.1.9" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index f99e6a9ac..7527b0442 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.1.8" +version = "1.1.9" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index 543e9c460..07e79dd65 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.1.8" +version = "1.1.9" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.1.8", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.1.9", path = "../schema-derive" } schemars = "0.8.3" serde = "1.0" serde_json = "1.0.40" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 8401f5239..4ca85911b 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.1.8" +version = "1.1.9" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -39,7 +39,7 @@ cosmwasm_1_1 = [] [dependencies] base64 = "0.13.0" -cosmwasm-derive = { path = "../derive", version = "1.1.8" } +cosmwasm-derive = { path = "../derive", version = "1.1.9" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -50,7 +50,7 @@ thiserror = "1.0.13" uint = "0.9.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.1.8" } +cosmwasm-crypto = { path = "../crypto", version = "1.1.9" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index 48b4fc5b3..07c778d2b 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.1.8" +version = "1.1.9" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.8", default-features = false } +cosmwasm-std = { path = "../std", version = "1.1.9", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 3685730c5..685474d65 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.1.8" +version = "1.1.9" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -41,8 +41,8 @@ required-features = ["iterator"] [dependencies] clru = "0.4.0" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.1.8", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.1.8" } +cosmwasm-std = { path = "../std", version = "1.1.9", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.1.9" } hex = "0.4" parity-wasm = "0.42" schemars = "0.8.3" From 01d3ca193fcd803debf1bcf171e3cb6daa4561d9 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Thu, 15 Dec 2022 19:20:16 +0900 Subject: [PATCH 341/344] ci: change default rustlang version from v1.57.0 to v1.60.0 in CI, and update `Cargo.lock` of each contracts. Signed-off-by: zemyblue --- .github/workflows/benchmarking.yml | 18 +- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 4 +- .github/workflows/tests.yml | 108 +-- Cargo.lock | 1130 +++++++++++------------- contracts/burner/Cargo.lock | 924 +++++++++---------- contracts/crypto-verify/Cargo.lock | 951 +++++++++----------- contracts/cyberpunk/Cargo.lock | 981 +++++++++----------- contracts/floaty/Cargo.lock | 924 +++++++++---------- contracts/hackatom/Cargo.lock | 926 +++++++++---------- contracts/ibc-reflect-send/Cargo.lock | 924 +++++++++---------- contracts/ibc-reflect/Cargo.lock | 924 +++++++++---------- contracts/query-queue/Cargo.lock | 924 +++++++++---------- contracts/queue/Cargo.lock | 924 +++++++++---------- contracts/reflect/Cargo.lock | 916 +++++++++---------- contracts/staking/Cargo.lock | 936 +++++++++----------- contracts/voting-with-uuid/Cargo.lock | 924 +++++++++---------- packages/std/schema/query_request.json | 21 - 18 files changed, 5512 insertions(+), 6949 deletions(-) diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index ccb751ada..a2674db30 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -22,15 +22,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-benchmarking-rust:1.57.0-{{ checksum "Cargo.lock" }} + key: cargocache-v2-benchmarking-rust:1.60.0-{{ checksum "Cargo.lock" }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Run vm benchmarks (Singlepass) @@ -51,15 +51,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_crypto-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_crypto-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build @@ -80,15 +80,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_vm-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_vm-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index def0099f5..1d50ccbda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.59.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 719ffa2b2..df185a893 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true @@ -57,7 +57,7 @@ jobs: working-directory: ./ run: | echo "Checking all contracts under ./artifacts" - docker run --volumes-from with_code rust:1.57.0 /bin/bash -e -c 'cd ./code/packages/vm; export GLOBIGNORE=../../artifacts/floaty.wasm; ./examples/check_contract.sh ../../artifacts/*.wasm' + docker run --volumes-from with_code rust:1.60.0 /bin/bash -e -c 'cd ./code/packages/vm; export GLOBIGNORE=../../artifacts/floaty.wasm; ./examples/check_contract.sh ../../artifacts/*.wasm' docker cp with_code:/code/artifacts . - name: Create Release diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f341b0b8..5544c9486 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,15 +19,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_crypto-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_crypto-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build @@ -48,15 +48,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_derive-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_derive-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build @@ -77,15 +77,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_schema-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_schema-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build @@ -106,15 +106,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_std-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_std-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -160,15 +160,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_storage-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_storage-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build library for native target @@ -192,15 +192,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-package_vm-rust:1.57.0-${{ hashFiles('Cargo.lock') }} + key: cargocache-v2-package_vm-rust:1.60.0-${{ hashFiles('Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Build @@ -227,15 +227,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_burner-rust:1.57.0-${{ hashFiles('contracts/burner/Cargo.lock') }} + key: cargocache-v2-contract_burner-rust:1.60.0-${{ hashFiles('contracts/burner/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -273,15 +273,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_crypto_verify-rust:1.57.0-${{ hashFiles('contracts/crypto-verify/Cargo.lock') }} + key: cargocache-v2-contract_crypto_verify-rust:1.60.0-${{ hashFiles('contracts/crypto-verify/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -319,15 +319,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_hackatom-rust:1.57.0-${{ hashFiles('contracts/hackatom/Cargo.lock') }} + key: cargocache-v2-contract_hackatom-rust:1.60.0-${{ hashFiles('contracts/hackatom/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -365,15 +365,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_ibc_reflect-rust:1.57.0-${{ hashFiles('contracts/ibc-reflect/Cargo.lock') }} + key: cargocache-v2-contract_ibc_reflect-rust:1.60.0-${{ hashFiles('contracts/ibc-reflect/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -411,15 +411,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_ibc_reflect_send-rust:1.57.0-${{ hashFiles('contracts/ibc-reflect-send/Cargo.lock') }} + key: cargocache-v2-contract_ibc_reflect_send-rust:1.60.0-${{ hashFiles('contracts/ibc-reflect-send/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -457,15 +457,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_queue-rust:1.57.0-${{ hashFiles('contracts/queue/Cargo.lock') }} + key: cargocache-v2-contract_queue-rust:1.60.0-${{ hashFiles('contracts/queue/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -504,15 +504,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_query_queue-rust:1.57.0-${{ hashFiles('contracts/queue/Cargo.lock', 'contracts/query-queue/Cargo.lock') }} + key: cargocache-v2-contract_query_queue-rust:1.60.0-${{ hashFiles('contracts/queue/Cargo.lock', 'contracts/query-queue/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -553,15 +553,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_reflect-rust:1.57.0-${{ hashFiles('contracts/reflect/Cargo.lock') }} + key: cargocache-v2-contract_reflect-rust:1.60.0-${{ hashFiles('contracts/reflect/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -599,15 +599,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_staking-rust:1.57.0-${{ hashFiles('contracts/staking/Cargo.lock') }} + key: cargocache-v2-contract_staking-rust:1.60.0-${{ hashFiles('contracts/staking/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -645,15 +645,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-contract_staking-rust:1.57.0-${{ hashFiles('contracts/voting-with-uuid/Cargo.lock') }} + key: cargocache-v2-contract_staking-rust:1.60.0-${{ hashFiles('contracts/voting-with-uuid/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add wasm32 target @@ -691,15 +691,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-fmt-rust:1.57.0-${{ hashFiles('Cargo.lock', 'contracts/*/Cargo.lock') }} + key: cargocache-v2-fmt-rust:1.60.0-${{ hashFiles('Cargo.lock', 'contracts/*/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add rustfmt component @@ -743,15 +743,15 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.57.0 + toolchain: 1.60.0 target: wasm32-unknown-unknown profile: minimal override: true - name: Cache cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cargo - key: cargocache-v2-clippy-rust:1.57.0-${{ hashFiles('Cargo.lock', 'contracts/*/Cargo.lock') }} + key: cargocache-v2-clippy-rust:1.60.0-${{ hashFiles('Cargo.lock', 'contracts/*/Cargo.lock') }} - name: Version information run: rustc --version; cargo --version; rustup --version; rustup target list --installed - name: Add clippy component diff --git a/Cargo.lock b/Cargo.lock index ea10d7f81..44af299f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,49 +2,58 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.0", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" -version = "0.7.0" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.0", + "getrandom", "once_cell", "version_check", ] [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "atty" -version = "0.2.2" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "kernel32-sys", + "hermit-abi", "libc", - "winapi 0.2.4", + "winapi", ] -[[package]] -name = "autocfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" - [[package]] name = "autocfg" version = "1.1.0" @@ -53,24 +62,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.5" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.3.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -81,33 +83,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -120,24 +110,18 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bstr" -version = "0.2.1" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cc0572e02f76cb335f309b19e0a0d585b4f62788f7d26de2a13a836a637385f" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "lazy_static", "memchr", @@ -147,21 +131,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -169,9 +147,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -180,37 +158,21 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cast" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1665bed21c8708b1683ab1b71486d75e9689b781d041f0f6dba88d8aa8cab9c" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -220,9 +182,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.10" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "num-integer", "num-traits", @@ -230,14 +192,14 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", "bitflags", - "strsim 0.8.0", + "strsim", "textwrap", "unicode-width", "vec_map", @@ -257,14 +219,14 @@ checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" dependencies = [ "atty", "lazy_static", - "winapi 0.3.5", + "winapi", ] [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -274,12 +236,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -302,17 +264,17 @@ version = "1.1.9-0.7.0" dependencies = [ "base64", "criterion", - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "english-numbers", "hex", "hex-literal", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", "serde_json", "sha-1", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", ] @@ -396,11 +358,11 @@ dependencies = [ "leb128", "loupe", "parity-wasm", - "rand 0.8.0", + "rand", "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "tempfile", "thiserror", "wasmer", @@ -419,24 +381,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -445,30 +407,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -478,25 +440,25 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "criterion" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab327ed7354547cc2ef43cbe20ef68b988e70b4b593cbd66a2a61733123a3d23" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" dependencies = [ "atty", "cast", "clap", "criterion-plot", "csv", - "itertools 0.10.0", + "itertools", "lazy_static", "num-traits", "oorandom", @@ -513,56 +475,55 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" dependencies = [ "cast", - "itertools 0.9.0", + "itertools", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -573,21 +534,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -595,44 +556,44 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.0" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54cd62557f353f140b42305fb4efcff2ae08e32fbabaf5b0929423000febb63" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", - "itoa", + "itoa 0.4.8", "ryu", "serde", ] [[package]] name = "csv-core" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" dependencies = [ "memchr", ] [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -640,23 +601,22 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.9.0", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", @@ -665,9 +625,9 @@ dependencies = [ [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -675,9 +635,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -695,20 +655,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -738,9 +698,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -750,40 +710,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -791,9 +751,9 @@ dependencies = [ [[package]] name = "english-numbers" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a096b6649797211983dbd88bb4de2b10d02f9cc4646ed846408542e17069b610" +checksum = "4e4f5d6e192964d498b45abee72ca445e91909094bc8e8791259e82c2a0d1aa6" [[package]] name = "enum-iterator" @@ -817,18 +777,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -836,33 +796,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -872,9 +835,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -882,159 +845,163 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "half" -version = "1.2.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6c0438de3ca4d8cac2eec62b228e2f8865cfe9ebefea720406774223fa2d2e" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] [[package]] -name = "itertools" -version = "0.9.0" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "either", + "cfg-if", ] [[package]] name = "itertools" -version = "0.10.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.3" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.4", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -1042,39 +1009,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -1109,93 +1073,113 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] -name = "memmap2" -version = "0.5.0" +name = "memoffset" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "libc", + "autocfg", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ - "autocfg 1.1.0", + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num-integer" -version = "0.1.36" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ + "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "oorandom" -version = "11.1.0" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "oorandom" +version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "opaque-debug" @@ -1205,15 +1189,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1227,9 +1211,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca0ae5f169d0917a7c7f5a9c1a3d3d9598f18f529dd2b8373ed988efea307a" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" dependencies = [ "num-traits", "plotters-backend", @@ -1240,30 +1224,30 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07fffcddc1cb3a1de753caa4e4df03b79922ba43cf882acc1bdd7e8df9f4590" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38a02e23bd9604b842a812063aec4ef702b57989c37b655254bb61c471ad211" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1274,40 +1258,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1316,125 +1298,79 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha 0.2.0", - "rand_core 0.5.0", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", + "rand_chacha", + "rand_core 0.6.4", ] [[package]] name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - -[[package]] -name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core 0.6.4", ] [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.0", -] - -[[package]] -name = "rand_hc" -version = "0.3.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.6.2", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1449,27 +1385,24 @@ dependencies = [ [[package]] name = "regex" -version = "1.3.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc98360d9e6ad383647702acc90f80b0582eac3ea577ab47d96325d3575de908" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.5" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4324c97bd13d1f83985e92e805e4b5ca6d058fcafb4ccfc5c0e388bebeadaafc" -dependencies = [ - "byteorder", -] +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "region" @@ -1480,32 +1413,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1514,12 +1447,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1528,9 +1461,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1539,50 +1472,42 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.4" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "same-file" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3257af0472da4b8b8902102a57bafffd9991f0f43772a8af6153d597e6e4ae2" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi 0.3.5", + "winapi-util", ] [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1592,9 +1517,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1610,9 +1535,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1630,15 +1555,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.0" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76b5842e81eb9bbea19276a9dbbda22ac042532f390a67ab08b895617978abf3" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1654,18 +1579,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_cbor" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ "half", "serde", @@ -1673,9 +1598,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1684,9 +1609,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1695,11 +1620,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ - "itoa", + "itoa 1.0.4", "ryu", "serde", ] @@ -1711,10 +1636,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1725,48 +1650,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1780,15 +1700,15 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" @@ -1796,58 +1716,41 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "strsim" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" - [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand 0.7.0", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1861,18 +1764,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1881,9 +1784,9 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ "serde", "serde_json", @@ -1891,11 +1794,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1904,9 +1807,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1915,24 +1818,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1941,22 +1844,22 @@ dependencies = [ ] [[package]] -name = "unicode-width" -version = "0.1.4" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1964,52 +1867,52 @@ dependencies = [ [[package]] name = "vec_map" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f4ebb15cedacc4a9f5c3469ca29787482d0b7502ff5a4a47ed1f55b987c9b4" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.5", + "winapi", "winapi-util", ] [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -2018,9 +1921,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2028,9 +1931,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2041,9 +1944,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "wasm-encoder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05632e0a66a6ed8cca593c24223aabd6262f256c3693ad9822c315285f010614" +dependencies = [ + "leb128", +] [[package]] name = "wasmer" @@ -2051,7 +1963,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -2069,7 +1981,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -2112,7 +2024,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -2132,7 +2044,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -2183,13 +2095,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -2209,7 +2121,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -2220,7 +2132,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -2257,7 +2169,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -2287,7 +2199,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -2295,7 +2207,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -2304,7 +2216,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -2315,27 +2227,30 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wast" -version = "2.0.0" +version = "50.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85f2240bf8d4be830c9006b484a090697ab76d767c985e1a074a28ad76a84ed" +checksum = "a2cbb59d4ac799842791fe7e806fa5dbbf6b5554d538e51cc8e176db6ff0ae34" dependencies = [ "leb128", + "memchr", + "unicode-width", + "wasm-encoder", ] [[package]] name = "wat" -version = "1.0.2" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25a59611835032704e4ab1b6e3b499fa2a1d3a808ebb869dd1aa3a207208dcc" +checksum = "584aaf7a1ecf4d383bbe1a25eeab0cbb8ff96acc6796707ff65cde48f4632f15" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.39" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2343,36 +2258,25 @@ dependencies = [ [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5350e40d908c7e8b9e5c9edb541ca47cc617c6229d3575a46da6f550f36c96fd" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2381,11 +2285,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] @@ -2439,6 +2343,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 876ff3b64..dfd539252 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,24 +84,18 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "burner" @@ -126,17 +108,11 @@ dependencies = [ "serde", ] -[[package]] -name = "byte-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" - [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -144,9 +120,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -155,31 +131,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -195,9 +155,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -207,12 +167,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -222,10 +182,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -294,7 +254,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -311,24 +271,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -337,30 +297,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -370,55 +330,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -429,21 +388,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -451,22 +410,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -474,44 +433,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -519,9 +467,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -539,20 +487,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -582,9 +530,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -594,40 +542,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -655,18 +603,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -674,33 +622,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -710,9 +661,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -720,129 +671,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -850,39 +808,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -917,66 +872,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -986,15 +963,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1006,17 +983,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1027,40 +998,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1069,94 +1038,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1178,32 +1111,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1212,12 +1145,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1226,9 +1159,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1237,41 +1170,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1281,9 +1206,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1299,9 +1224,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1319,9 +1244,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1337,18 +1262,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1357,9 +1282,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1368,9 +1293,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1384,10 +1309,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1398,48 +1323,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1453,84 +1373,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1539,11 +1442,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1552,9 +1455,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1563,24 +1466,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1589,16 +1492,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1606,35 +1509,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1643,9 +1546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1653,9 +1556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1666,9 +1569,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1676,7 +1579,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1694,7 +1597,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1737,7 +1640,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1757,7 +1660,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1808,13 +1711,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1834,7 +1737,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1845,7 +1748,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1882,7 +1785,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1912,7 +1815,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1920,7 +1823,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1929,7 +1832,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1940,36 +1843,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2027,6 +1919,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 61e0bcef8..a439f6d63 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,37 +120,21 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -190,9 +150,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -202,12 +162,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -217,10 +177,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -297,7 +257,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -314,24 +274,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -340,30 +300,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -373,55 +333,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -432,21 +391,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -465,28 +424,28 @@ dependencies = [ "rlp", "schemars", "serde", - "sha2 0.10.3", + "sha2 0.10.6", "sha3", ] [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -494,44 +453,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -539,9 +487,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -559,20 +507,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -602,9 +550,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -614,40 +562,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -675,18 +623,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -694,33 +642,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -730,9 +681,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -740,141 +691,151 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", + "sha2 0.10.6", ] [[package]] name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "kernel32-sys" -version = "0.2.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" dependencies = [ - "winapi 0.2.5", - "winapi-build", + "cpufeatures", ] [[package]] @@ -882,39 +843,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -949,66 +907,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ - "autocfg 1.1.0", + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -1018,15 +998,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1038,17 +1018,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1059,40 +1033,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1101,94 +1073,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1210,32 +1146,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1244,12 +1180,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1258,9 +1194,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1269,9 +1205,9 @@ dependencies = [ [[package]] name = "rlp" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", "rustc-hex", @@ -1279,47 +1215,39 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hex" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1329,9 +1257,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1347,9 +1275,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1367,9 +1295,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1385,18 +1313,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1405,9 +1333,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1416,9 +1344,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1432,10 +1360,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1446,58 +1374,53 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "sha3" -version = "0.10.0" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f935e31cf406e8c0e96c2815a5516181b7004ae8c5f296293221e9b1e356bd" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "keccak", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1511,84 +1434,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1597,11 +1503,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1610,9 +1516,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1621,24 +1527,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1647,16 +1553,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1664,35 +1570,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1701,9 +1607,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1711,9 +1617,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1724,9 +1630,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1734,7 +1640,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1752,7 +1658,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1795,7 +1701,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1815,7 +1721,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1866,13 +1772,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1892,7 +1798,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1903,7 +1809,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1940,7 +1846,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1970,7 +1876,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1978,7 +1884,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1987,7 +1893,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1998,36 +1904,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2085,6 +1980,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 0bcee92df..08e9d372e 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -3,36 +3,42 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "arrayref" -version = "0.3.5" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "arrayvec" -version = "0.4.7" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "nodrop", + "getrandom", + "once_cell", + "version_check", ] [[package]] -name = "autocfg" -version = "0.1.6" +name = "arrayref" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "autocfg" @@ -42,26 +48,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -72,52 +69,33 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - -[[package]] -name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2b_simd" -version = "0.5.0" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b424e042bcb16e38df7952698ac0e97154532e0318125d4abb102a09b3075b7" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", "arrayvec", - "byteorder", "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -129,36 +107,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -166,9 +132,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -177,31 +143,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -217,15 +167,15 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "constant_time_eq" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "convert_case" @@ -235,12 +185,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -250,10 +200,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -292,7 +242,7 @@ dependencies = [ name = "cosmwasm-std" version = "1.1.9-0.7.0" dependencies = [ - "base64 0.13.0", + "base64", "cosmwasm-crypto", "cosmwasm-derive", "derivative", @@ -330,7 +280,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -347,24 +297,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -373,30 +323,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -406,66 +356,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", - "crossbeam-utils 0.8.7", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", - "lazy_static", - "memoffset", + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.7.0" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "autocfg 0.1.6", - "cfg-if 0.1.2", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -476,21 +414,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -498,13 +436,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] @@ -523,9 +461,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -533,44 +471,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -578,9 +505,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -598,20 +525,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -641,9 +568,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -653,40 +580,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -714,18 +641,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -733,33 +660,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -769,9 +699,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -779,129 +709,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" -dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -909,39 +846,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -976,72 +910,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] -name = "more-asserts" -version = "0.2.0" +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] [[package]] -name = "nodrop" -version = "0.1.12" +name = "miniz_oxide" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "more-asserts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -1051,15 +1001,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1071,17 +1021,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1092,40 +1036,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1134,94 +1076,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.6", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.7", - "lazy_static", + "crossbeam-utils", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1243,32 +1149,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1277,12 +1183,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1291,9 +1197,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1302,53 +1208,45 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375368e03ae25fdbe75c19884c72b8dd235c2f5e5858dc88ea8f0a85aeeb2d51" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" dependencies = [ - "base64 0.11.0", + "base64", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.7.0", + "crossbeam-utils", ] [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1358,9 +1256,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1376,9 +1274,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1396,9 +1294,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1414,18 +1312,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1434,9 +1332,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1445,9 +1343,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1461,10 +1359,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1475,48 +1373,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1530,84 +1423,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1616,11 +1492,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1629,9 +1505,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1640,24 +1516,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1666,16 +1542,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1683,35 +1559,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1720,9 +1596,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1730,9 +1606,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1743,9 +1619,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1753,7 +1629,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1771,7 +1647,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1814,7 +1690,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1834,7 +1710,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1885,13 +1761,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1911,7 +1787,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1922,7 +1798,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1959,7 +1835,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1989,7 +1865,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1997,7 +1873,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -2006,7 +1882,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -2017,36 +1893,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2104,6 +1969,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index 66faca21f..66145d371 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,20 +484,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -579,9 +527,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -591,40 +539,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -652,18 +600,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -671,25 +619,28 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] @@ -708,9 +659,9 @@ dependencies = [ [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -720,9 +671,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -730,129 +681,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -860,39 +818,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -927,66 +882,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -996,15 +973,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1016,17 +993,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1037,40 +1008,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1079,94 +1048,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1188,32 +1121,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1222,12 +1155,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1236,9 +1169,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1247,41 +1180,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1291,9 +1216,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1309,9 +1234,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1329,9 +1254,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1347,18 +1272,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1367,9 +1292,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1378,9 +1303,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1394,10 +1319,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1408,48 +1333,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1463,84 +1383,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1549,11 +1452,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1562,9 +1465,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1573,24 +1476,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1599,16 +1502,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1616,35 +1519,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1653,9 +1556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1663,9 +1566,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1676,9 +1579,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1686,7 +1589,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1704,7 +1607,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1747,7 +1650,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1767,7 +1670,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1818,13 +1721,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1844,7 +1747,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1855,7 +1758,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1892,7 +1795,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1922,7 +1825,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1930,7 +1833,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1939,7 +1842,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1950,36 +1853,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2037,6 +1929,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index 6c1331778..15ccc52f9 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,20 +484,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -579,9 +527,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -591,40 +539,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -652,18 +600,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -671,33 +619,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -707,9 +658,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -717,44 +668,40 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] @@ -768,92 +715,103 @@ dependencies = [ "cosmwasm-vm", "schemars", "serde", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -861,39 +819,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -928,66 +883,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -997,15 +974,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1017,17 +994,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1038,40 +1009,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1080,94 +1049,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1189,32 +1122,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1223,12 +1156,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1237,9 +1170,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1248,41 +1181,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1292,9 +1217,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1310,9 +1235,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1330,9 +1255,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1348,18 +1273,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1368,9 +1293,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1379,9 +1304,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1395,10 +1320,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1409,48 +1334,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1464,84 +1384,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1550,11 +1453,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1563,9 +1466,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1574,24 +1477,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1600,16 +1503,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1617,35 +1520,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1654,9 +1557,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1664,9 +1567,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1677,9 +1580,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1687,7 +1590,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1705,7 +1608,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1748,7 +1651,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1768,7 +1671,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1819,13 +1722,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1845,7 +1748,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1856,7 +1759,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1893,7 +1796,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1923,7 +1826,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1931,7 +1834,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1940,7 +1843,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1951,36 +1854,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2038,6 +1930,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index c193d486f..2e1346e40 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,20 +484,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -579,9 +527,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -591,40 +539,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -652,18 +600,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -671,33 +619,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -707,9 +658,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -717,75 +668,83 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -802,56 +761,55 @@ dependencies = [ [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -859,39 +817,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -926,66 +881,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -995,15 +972,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1015,17 +992,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1036,40 +1007,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1078,94 +1047,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1187,32 +1120,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1221,12 +1154,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1235,9 +1168,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1246,41 +1179,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1290,9 +1215,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1308,9 +1233,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1328,9 +1253,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1346,18 +1271,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1366,9 +1291,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1377,9 +1302,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1393,10 +1318,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1407,48 +1332,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1462,84 +1382,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1548,11 +1451,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1561,9 +1464,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1572,24 +1475,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1598,16 +1501,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1615,35 +1518,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1652,9 +1555,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1662,9 +1565,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1675,9 +1578,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1685,7 +1588,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1703,7 +1606,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1746,7 +1649,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1766,7 +1669,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1817,13 +1720,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1843,7 +1746,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1854,7 +1757,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1891,7 +1794,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1921,7 +1824,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1929,7 +1832,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1938,7 +1841,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1949,36 +1852,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2036,6 +1928,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 9a302d2a6..2243f0447 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,20 +484,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -579,9 +527,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -591,40 +539,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -652,18 +600,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -671,33 +619,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -707,9 +658,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -717,75 +668,83 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -802,56 +761,55 @@ dependencies = [ [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -859,39 +817,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -926,66 +881,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -995,15 +972,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1015,17 +992,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1036,40 +1007,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1078,94 +1047,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1187,32 +1120,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1221,12 +1154,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1235,9 +1168,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1246,41 +1179,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1290,9 +1215,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1308,9 +1233,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1328,9 +1253,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1346,18 +1271,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1366,9 +1291,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1377,9 +1302,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1393,10 +1318,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1407,48 +1332,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1462,84 +1382,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1548,11 +1451,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1561,9 +1464,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1572,24 +1475,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1598,16 +1501,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1615,35 +1518,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1652,9 +1555,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1662,9 +1565,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1675,9 +1578,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1685,7 +1588,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1703,7 +1606,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1746,7 +1649,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1766,7 +1669,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1817,13 +1720,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1843,7 +1746,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1854,7 +1757,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1891,7 +1794,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1921,7 +1824,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1929,7 +1832,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1938,7 +1841,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1949,36 +1852,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2036,6 +1928,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/query-queue/Cargo.lock b/contracts/query-queue/Cargo.lock index 0eb1b4780..6f5ef920a 100644 --- a/contracts/query-queue/Cargo.lock +++ b/contracts/query-queue/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -283,7 +243,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -300,24 +260,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -326,30 +286,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -359,55 +319,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -418,21 +377,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -440,22 +399,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -463,44 +422,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -508,9 +456,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -528,20 +476,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -571,9 +519,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -583,40 +531,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -644,18 +592,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -663,33 +611,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -699,9 +650,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -709,129 +660,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -839,39 +797,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -906,66 +861,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -975,15 +952,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -995,17 +972,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1016,40 +987,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1069,94 +1038,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1178,32 +1111,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1212,12 +1145,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1226,9 +1159,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1237,41 +1170,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1281,9 +1206,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1299,9 +1224,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1319,9 +1244,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1337,18 +1262,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1357,9 +1282,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1368,9 +1293,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1384,10 +1309,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1398,48 +1323,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1453,84 +1373,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1539,11 +1442,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1552,9 +1455,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1563,24 +1466,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1589,16 +1492,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1606,35 +1509,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1643,9 +1546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1653,9 +1556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1666,9 +1569,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1676,7 +1579,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1694,7 +1597,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1737,7 +1640,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1757,7 +1660,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1808,13 +1711,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1834,7 +1737,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1845,7 +1748,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1882,7 +1785,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1912,7 +1815,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1920,7 +1823,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1929,7 +1832,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1940,36 +1843,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2027,6 +1919,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index fd1559f88..5d59d2230 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -283,7 +243,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -300,24 +260,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -326,30 +286,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -359,55 +319,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -418,21 +377,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -440,22 +399,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -463,44 +422,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -508,9 +456,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -528,20 +476,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -571,9 +519,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -583,40 +531,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -644,18 +592,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -663,33 +611,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -699,9 +650,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -709,129 +660,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -839,39 +797,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -906,66 +861,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -975,15 +952,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -995,17 +972,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1016,40 +987,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1069,94 +1038,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1178,32 +1111,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1212,12 +1145,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1226,9 +1159,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1237,41 +1170,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1281,9 +1206,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1299,9 +1224,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1319,9 +1244,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1337,18 +1262,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1357,9 +1282,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1368,9 +1293,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1384,10 +1309,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1398,48 +1323,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1453,84 +1373,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1539,11 +1442,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1552,9 +1455,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1563,24 +1466,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1589,16 +1492,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1606,35 +1509,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1643,9 +1546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1653,9 +1556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1666,9 +1569,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1676,7 +1579,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1694,7 +1597,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1737,7 +1640,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1757,7 +1660,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1808,13 +1711,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1834,7 +1737,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1845,7 +1748,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1882,7 +1785,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1912,7 +1815,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1920,7 +1823,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1929,7 +1832,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1940,36 +1843,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2027,6 +1919,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 823432a71..8da709e4e 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,20 +484,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -579,9 +527,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -591,40 +539,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -652,18 +600,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -671,33 +619,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -707,9 +658,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -717,129 +668,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -847,39 +805,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -914,66 +869,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -983,15 +960,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1003,17 +980,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1024,40 +995,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1066,94 +1035,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "reflect" @@ -1188,32 +1121,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1222,12 +1155,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1236,9 +1169,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1247,41 +1180,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1291,9 +1216,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1309,9 +1234,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1347,9 +1272,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] @@ -1367,9 +1292,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1378,9 +1303,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1394,10 +1319,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1408,48 +1333,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1463,84 +1383,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1549,11 +1452,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1562,9 +1465,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1573,24 +1476,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1599,16 +1502,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1616,35 +1519,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1653,9 +1556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1663,9 +1566,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1676,9 +1579,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1686,7 +1589,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1704,7 +1607,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1747,7 +1650,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1767,7 +1670,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1818,13 +1721,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1844,7 +1747,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1855,7 +1758,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1892,7 +1795,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1922,7 +1825,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1930,7 +1833,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1939,7 +1842,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1950,36 +1853,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2037,6 +1929,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 5a3bfada8..9307ce625 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,22 +407,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -471,44 +430,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -516,9 +464,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -536,26 +484,26 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "doc-comment" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -585,9 +533,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -597,40 +545,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -658,18 +606,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -677,33 +625,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -713,9 +664,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -723,129 +674,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -853,39 +811,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -920,66 +875,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -989,15 +966,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1009,17 +986,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1030,40 +1001,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1072,94 +1041,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1181,32 +1114,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1215,12 +1148,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1229,9 +1162,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1240,41 +1173,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1284,9 +1209,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1302,9 +1227,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1322,9 +1247,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1340,18 +1265,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1360,9 +1285,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1371,9 +1296,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1387,10 +1312,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1401,48 +1326,49 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snafu" -version = "0.6.6" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ec0ae2ed980f26e1ad62e717feb01df90731df56887b5391a2c79f9f6805be" +checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" dependencies = [ "doc-comment", "snafu-derive", @@ -1450,21 +1376,15 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.6" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec32ba84a7a86aeb0bc32fd0c46d31b0285599f68ea72e87eff6127889d99e1" +checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "spin" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" - [[package]] name = "spki" version = "0.6.0" @@ -1477,9 +1397,9 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staking" @@ -1496,78 +1416,61 @@ dependencies = [ [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3711fd1c4e75b3eff12ba5c40dba762b6b65c5476e8174c1a664772060c49bf" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.13" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2b85ba4c9aa32dd3343bd80eb8d22e9b54b7688c17ea3907f236885353b233" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1576,11 +1479,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1589,9 +1492,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1600,24 +1503,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1626,16 +1529,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1643,35 +1546,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1680,9 +1583,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1690,9 +1593,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1703,9 +1606,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1713,7 +1616,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1731,7 +1634,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1774,7 +1677,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1794,7 +1697,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1845,13 +1748,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1871,7 +1774,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1882,7 +1785,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1919,7 +1822,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1949,7 +1852,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1957,7 +1860,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1966,7 +1869,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1977,36 +1880,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2064,6 +1956,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/contracts/voting-with-uuid/Cargo.lock b/contracts/voting-with-uuid/Cargo.lock index 9bec560c7..04a5d3638 100644 --- a/contracts/voting-with-uuid/Cargo.lock +++ b/contracts/voting-with-uuid/Cargo.lock @@ -3,21 +3,30 @@ version = 3 [[package]] -name = "ahash" -version = "0.7.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa60d2eadd8b12a996add391db32bd1153eac697ba4869660c0016353611426" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "getrandom 0.2.0", - "once_cell", - "version_check", + "gimli 0.27.0", ] [[package]] -name = "autocfg" -version = "0.1.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23213af7601f0f2d929f73d2a772804562cb09063f50bba9c361f86d6a0376f8" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "autocfg" @@ -27,26 +36,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.0" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "backtrace-sys", - "cfg-if 0.1.2", - "dbghelp-sys", - "kernel32-sys", + "addr2line", + "cc", + "cfg-if", "libc", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", - "winapi 0.2.5", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3216d6e2b2c36c648a78afab0fdcb124d5365f7eb9b0895eab395549d76280d2" -dependencies = [ - "libc", ] [[package]] @@ -57,33 +57,21 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bitflags" -version = "1.1.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" - -[[package]] -name = "block-buffer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -96,36 +84,24 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bc2cfa52dc218b47ea000b15e6e5d00ca2f831db31e41592383c14d8802907" - [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" - -[[package]] -name = "byte-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytecheck" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e41b4c23aca8e5dd453b1142c330704cc461bff785cbebaf0b4582d6a0ea5" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -133,9 +109,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb785814a4df138638a22e448a4067ca0661a864ba2add6fea0d1cbece1c63d3" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -144,31 +120,15 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -dependencies = [ - "lazy_static", - "ppv-lite86", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.0" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -184,9 +144,9 @@ checksum = "591ff76ca0691bd91c1b0b5b987e5cf93b21ec810ad96665c5a569c60846dd93" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "convert_case" @@ -196,12 +156,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ - "autocfg 1.1.0", - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "libc", "scopeguard", "windows-sys", @@ -211,10 +171,10 @@ dependencies = [ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.2", + "rand_core 0.6.4", "sha-1", "thiserror", ] @@ -291,7 +251,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "sha2 0.10.3", + "sha2 0.10.6", "thiserror", "wasmer", "wasmer-middlewares", @@ -308,24 +268,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888db2229fb6bbaf83ae89068609a6318af704926710bf815b5aa5327935e52" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6d411726fb6eef630dbfb544736e2334cef2ba7476bfba552d018d28f211f5" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -334,30 +294,30 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb1f26cde43be393eb3f3bf026d5e2d0cf356246039008d0a4452b2868964dd" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e2ad9068b111c4df96517f42e257eee38d0b2239b1be346a10b4de007327f4" +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7009e6aa5153759283240333935d9ffb7dcaeb00cc2bccb5cead0e431cc35f" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" [[package]] name = "cranelift-frontend" -version = "0.82.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99032c765ec601b4fcba100c4e9c11afe5d943e6813fc486df02a70a1104bd21" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", "log", @@ -367,55 +327,54 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", + "autocfg", + "cfg-if", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] @@ -426,21 +385,21 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -448,13 +407,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.0", + "rand_core 0.5.1", "subtle", "zeroize", ] @@ -475,9 +434,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a205b8ec3ffbc5d85cbdc3529670203d962e0178c47004571bf13c20dfd96d" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -485,44 +444,33 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0ba52d4a23a061c077190e2fe4e5e21e24b5ac1e50e14cbba9c125bdc2fd3" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.10.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56b0552edb8cbd4d50941e2ac6bf3a434c3109e2ce093cd1d5dbb4fcad25e8" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", "syn", ] -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -dependencies = [ - "winapi 0.2.5", - "winapi-build", -] - [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -530,9 +478,9 @@ dependencies = [ [[package]] name = "derivative" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73ebd1ac665acd78292be651d05966c372ab3ca631d49252d5e1b7dcffb3b2b" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -550,20 +498,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da518043f6481364cd454be81dfe096cfd3f82daa1466f4946d24ea325b0941" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "dynasm" @@ -593,9 +541,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e852f4174d2a8646a0fa8a34b55797856c722f86267deb0aa1e93f7f247f800e" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -605,40 +553,40 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.2", + "rand_core 0.6.4", "serde", - "sha2 0.9.0", - "thiserror", + "sha2 0.9.9", "zeroize", ] [[package]] name = "either" -version = "1.0.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.2", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -666,18 +614,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.2" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3365a51d694a57eb4ee05fb3a7f11353708b1f3f1e9a3da4d003d7fcd1dd5135" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0ab0a4d1e54dfbfef7aca606f4501af48235308449c7d985b0bbd2f8393ff" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -685,33 +633,36 @@ dependencies = [ "syn", ] -[[package]] -name = "fake-simd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0ab991abb1eec35079831199b79b4139553d299a9182aa3bfc4019615a0cb1" - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forward_ref" @@ -721,9 +672,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -731,129 +682,136 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d68102e030c3d41969bb76ebf55ed731fd946a0a91e0fa7e02f6392cc6db21" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "getrandom" -version = "0.2.0" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a03ce013ffccead76c11a15751231f777d9295b845cc1266ed4d34fcbd7977" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "group" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.2", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362385356d610bd1e5a408ddf8d022041774b683f345a1d2cfcb4f60f8ae2db5" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hex" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "ident_case" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.9.0", + "autocfg", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" -version = "0.4.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6006147b5759ec0eab8d5347e0477983332a47422b2b8f655a0172ff4fbe53" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.3", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1ca084b49bfd975182288e1a5f1d27ea34ff2d6ae084ae5e66e1652427eada" -dependencies = [ - "winapi 0.2.5", - "winapi-build", + "sha2 0.10.6", ] [[package]] @@ -861,39 +819,36 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "leb128" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae1e955eb4170323d5389f7b61d4e3dfe118830ee8a4ad0e51a53f4d6230052" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.5", + "cfg-if", + "winapi", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", ] [[package]] @@ -928,66 +883,88 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ - "autocfg 1.1.0", + "adler", ] [[package]] name = "more-asserts" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56bcace28f4f8d439250edfa9091406688bdeeca710f8ccf30de5e2148d8336" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "num_cpus" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", - "hashbrown 0.11.0", + "hashbrown 0.11.2", "indexmap", "memchr", ] [[package]] -name = "once_cell" -version = "1.5.2" +name = "object" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +dependencies = [ + "memchr", +] [[package]] -name = "opaque-debug" -version = "0.2.1" +name = "once_cell" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -997,15 +974,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parity-wasm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9921ade5a54eb2818b30ee19d9c1e0f7fe78d5b0869815f27b26ef0647817512" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "pin-project-lite" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkcs8" @@ -1017,17 +994,11 @@ dependencies = [ "spki", ] -[[package]] -name = "ppv-lite86" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1c37e6347ad1a8351171bee25a92342401f8cd550f76e153724e765ac76bca" - [[package]] name = "proc-macro-error" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d259aa4825fa1a2371419d30a520219feff9fb3591550a209b4477d2ebaae4f" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -1038,40 +1009,38 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd21889899aa8e1ca2b924c1d3f08086631fc90768225b3268b5d5c3e806a503" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "syn", - "syn-mid", "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "ptr_meta" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7424255320182a46c403331afed6f95e0259a7c578f9da54a27e262ef3b60118" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53005b9863728f508d3f23ae37e03d60986a01b65f7ae8397dcebaa1d5e54e10" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", @@ -1080,94 +1049,58 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -dependencies = [ - "getrandom 0.1.4", - "libc", - "rand_chacha", - "rand_core 0.5.0", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e193067942ef6f485a349a113329140d0ab9e2168ce92274499bb0e9a4190d9d" -dependencies = [ - "autocfg 0.1.0", - "c2-chacha", - "rand_core 0.5.0", -] - [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -dependencies = [ - "getrandom 0.1.4", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.0", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.0", + "getrandom", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] [[package]] name = "regalloc" @@ -1189,32 +1122,32 @@ dependencies = [ "bitflags", "libc", "mach", - "winapi 0.3.5", + "winapi", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.5", + "winapi", ] [[package]] name = "rend" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b1d060a116ee1cf2522965825bed81136d04df7c731e211cd46dbd1107eab1" +checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" dependencies = [ "bytecheck", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -1223,12 +1156,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e419b2e30d088b21c4bf3072561535305df8066e89937ad05fc205b99874c23c" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.0", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -1237,9 +1170,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.20" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae58c4ba80f15f2f0842f4c61729e92c4e33a09bd78196c2b1ab9b0771a3ddf" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -1248,41 +1181,33 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.0" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0409577de8e3c214d35a81c4fd29bd07d445cb9151eacfcd588b2552c623d6" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" -dependencies = [ - "byteorder", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -1292,9 +1217,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -1310,9 +1235,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "seahash" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b427e64850f2efd9de2f99148a3e523ff1aaef7d407add544864d923ac15045e" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" @@ -1330,9 +1255,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.125" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] @@ -1348,18 +1273,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.0" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdb1004e9bd1b250e568f264d013ee39efbee424e090a0921344dc2d4cd96d7" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.125" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -1368,9 +1293,9 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", @@ -1379,9 +1304,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1395,10 +1320,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -1409,48 +1334,43 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.9.0" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72377440080fd008550fe9b441e854e43318db116f90181eef92e9ae9aedab48" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.8.0", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "fake-simd", - "opaque-debug 0.2.1", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.2", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "spin" -version = "0.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "spki" @@ -1464,84 +1384,67 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa13613355688665b68639b1c378a62dbedea78aff0fc59a4fa656cbbdec657" - -[[package]] -name = "strsim" -version = "0.9.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be23478587f30ca7b4b423b6bee7baf5b6986c1e511bf1904a984cb6105621" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 0.1.2", + "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.5", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1550,11 +1453,11 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1563,9 +1466,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -1574,24 +1477,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -1600,16 +1503,16 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "uuid" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "serde", "sha1_smol", @@ -1617,35 +1520,35 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1654,9 +1557,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1664,9 +1567,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1677,9 +1580,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmer" @@ -1687,7 +1590,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indexmap", "js-sys", "loupe", @@ -1705,7 +1608,7 @@ dependencies = [ "wasmer-engine-universal", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1748,7 +1651,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -1768,7 +1671,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -1819,13 +1722,13 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enum-iterator", "enumset", "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -1845,7 +1748,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "enumset", "leb128", "loupe", @@ -1856,7 +1759,7 @@ dependencies = [ "wasmer-engine-universal-artifact", "wasmer-types", "wasmer-vm", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1893,7 +1796,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1923,7 +1826,7 @@ checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" dependencies = [ "backtrace", "cc", - "cfg-if 1.0.0", + "cfg-if", "corosensei", "enum-iterator", "indexmap", @@ -1931,7 +1834,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -1940,7 +1843,7 @@ dependencies = [ "thiserror", "wasmer-artifact", "wasmer-types", - "winapi 0.3.5", + "winapi", ] [[package]] @@ -1951,36 +1854,25 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "which" -version = "4.0.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3edc3cf5458851a4d6a2329232bd5f42c7f9bbe4c4782c4ef9ce37e5d101b2" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", - "thiserror", + "once_cell", ] [[package]] name = "winapi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537" - -[[package]] -name = "winapi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2038,6 +1930,6 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "zeroize" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" diff --git a/packages/std/schema/query_request.json b/packages/std/schema/query_request.json index 565373942..2099d32b1 100644 --- a/packages/std/schema/query_request.json +++ b/packages/std/schema/query_request.json @@ -42,27 +42,6 @@ "definitions": { "BankQuery": { "oneOf": [ - { - "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", - "type": "object", - "required": [ - "supply" - ], - "properties": { - "supply": { - "type": "object", - "required": [ - "denom" - ], - "properties": { - "denom": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, { "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", "type": "object", From fd48729a4db7f61b9a244dd009e156b07cff86f1 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Thu, 15 Dec 2022 21:28:19 +0900 Subject: [PATCH 342/344] chore: update changeslog Signed-off-by: zemyblue --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ec33f2bb..3f7308d9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [Unreleased] + +### Features +* (cosmwasm) bump up cosmwasm from v1.0.0 to v1.1.9 ([#256](https://github.com/line/cosmwasm/pull/256)) + +### Fixes + ## [[0.16.3-0.5.1](https://github.com/line/cosmwasm/compare/v0.16.3-0.5.0...0.16.3-0.5.1)] - 2022-03-03 @@ -85,3 +92,5 @@ Initial code is based on the cosmwasm v0.12.0 * (cosmwasm) [v0.12.0](https://github.com/CosmWasm/cosmwasm/releases/tag/v0.12.0). Please refer [CHANGELOG_OF_COSMWASM_v0.12.0](https://github.com/CosmWasm/cosmwasm/releases?after=v0.12.0) + +[unreleased]: https://github.com/line/cosmwasm/compare/v1.0.0-0.6.0...HEAD From 7e38a0517e09b0068da4a916f93882321ffb10b6 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Mon, 26 Dec 2022 10:27:01 +0900 Subject: [PATCH 343/344] chore: remove unreleased section in chagnelog Signed-off-by: zemyblue --- CHANGELOG.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f7308d9b..8ec33f2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,5 @@ # Changelog -## [Unreleased] - -### Features -* (cosmwasm) bump up cosmwasm from v1.0.0 to v1.1.9 ([#256](https://github.com/line/cosmwasm/pull/256)) - -### Fixes - ## [[0.16.3-0.5.1](https://github.com/line/cosmwasm/compare/v0.16.3-0.5.0...0.16.3-0.5.1)] - 2022-03-03 @@ -92,5 +85,3 @@ Initial code is based on the cosmwasm v0.12.0 * (cosmwasm) [v0.12.0](https://github.com/CosmWasm/cosmwasm/releases/tag/v0.12.0). Please refer [CHANGELOG_OF_COSMWASM_v0.12.0](https://github.com/CosmWasm/cosmwasm/releases?after=v0.12.0) - -[unreleased]: https://github.com/line/cosmwasm/compare/v1.0.0-0.6.0...HEAD From 7aa68c306b3551e9da132383a447244e6b59d5ab Mon Sep 17 00:00:00 2001 From: zemyblue Date: Tue, 10 Jan 2023 16:27:02 +0900 Subject: [PATCH 344/344] chore: remove unnecessary codes. Signed-off-by: zemyblue --- .circleci/config.yml | 0 README.md | 2 -- 2 files changed, 2 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/README.md b/README.md index 02f3166da..944f70877 100644 --- a/README.md +++ b/README.md @@ -11,5 +11,3 @@ For more detail, see the original documents. - [REDAME.md](https://github.com/CosmWasm/cosmwasm/blob/main/README.md) - [SEMANTICS.md](https://github.com/CosmWasm/cosmwas/blob/main/SEMANTICS.md) - [EntryPoints.md](https://github.com/CosmWasm/cosmwasm/blob/main/EntryPoints.md) -- [MIGRATING.md](https://github.com/CosmWasm/cosmwasm/blob/main/MIGRATING.md) -- [IBC.md](https://github.com/CosmWasm/cosmwasm/blob/main/IBC.md)