diff --git a/crates/env/Cargo.toml b/crates/env/Cargo.toml index 0b353d459a4..74c52009145 100644 --- a/crates/env/Cargo.toml +++ b/crates/env/Cargo.toml @@ -38,7 +38,7 @@ blake2 = { version = "0.9", optional = true } # Sadly couldn't be marked as dev-dependency. # Never use this crate outside of the off-chain environment! rand = { version = "0.8", default-features = false, features = ["alloc"], optional = true } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [features] default = ["std"] diff --git a/crates/lang/macro/Cargo.toml b/crates/lang/macro/Cargo.toml index 1339b483536..f15dcc2a70d 100644 --- a/crates/lang/macro/Cargo.toml +++ b/crates/lang/macro/Cargo.toml @@ -30,7 +30,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../storage/" } ink_lang = { version = "3.0.0-rc2", path = ".." } trybuild = "1.0.24" -scale-info = { version = "0.5", default-features = false, features = ["derive"] } +scale-info = { version = "0.6", default-features = false, features = ["derive"] } [lib] name = "ink_lang_macro" diff --git a/crates/metadata/Cargo.toml b/crates/metadata/Cargo.toml index 74558b97ef0..cfb548ade38 100644 --- a/crates/metadata/Cargo.toml +++ b/crates/metadata/Cargo.toml @@ -21,7 +21,7 @@ ink_primitives = { version = "3.0.0-rc2", path = "../primitives/", default-featu serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } impl-serde = "0.3.1" derive_more = { version = "0.99", default-features = false, features = ["from"] } -scale-info = { version = "0.5", default-features = false, features = ["derive", "serde"] } +scale-info = { version = "0.6", default-features = false, features = ["derive", "serde"] } [dev-dependencies] pretty_assertions = "0.6.1" diff --git a/crates/metadata/src/lib.rs b/crates/metadata/src/lib.rs index ad39c6de12b..4f7c7893394 100644 --- a/crates/metadata/src/lib.rs +++ b/crates/metadata/src/lib.rs @@ -47,30 +47,25 @@ use impl_serde::serialize as serde_hex; #[cfg(feature = "derive")] use scale_info::{ - form::{ - FormString, - PortableForm, - }, + form::PortableForm, IntoPortable as _, PortableRegistry, Registry, }; use serde::{ - de::DeserializeOwned, Deserialize, Serialize, }; /// An entire ink! project for metadata file generation purposes. #[derive(Debug, Serialize, Deserialize)] -#[serde(bound(deserialize = "S: DeserializeOwned"))] -pub struct InkProject { +pub struct InkProject { #[serde(flatten)] - registry: PortableRegistry, + registry: PortableRegistry, #[serde(rename = "storage")] /// The layout of the storage data structure - layout: layout::Layout>, - spec: ContractSpec>, + layout: layout::Layout, + spec: ContractSpec, } impl InkProject { @@ -89,22 +84,19 @@ impl InkProject { } } -impl InkProject -where - S: FormString, -{ +impl InkProject { /// Returns a read-only registry of types in the contract. - pub fn registry(&self) -> &PortableRegistry { + pub fn registry(&self) -> &PortableRegistry { &self.registry } /// Returns the storage layout of the contract. - pub fn layout(&self) -> &layout::Layout> { + pub fn layout(&self) -> &layout::Layout { &self.layout } /// Returns the specification of the contract. - pub fn spec(&self) -> &ContractSpec> { + pub fn spec(&self) -> &ContractSpec { &self.spec } } diff --git a/crates/metadata/src/tests.rs b/crates/metadata/src/tests.rs index 0ae170b81a0..91a5991ec65 100644 --- a/crates/metadata/src/tests.rs +++ b/crates/metadata/src/tests.rs @@ -32,7 +32,7 @@ fn spec_constructor_selector_must_serialize_to_hex() { // when let json = serde_json::to_value(&portable_spec).unwrap(); - let deserialized: ConstructorSpec> = + let deserialized: ConstructorSpec = serde_json::from_value(json.clone()).unwrap(); // then @@ -183,7 +183,7 @@ fn trim_docs() { // when let json = serde_json::to_value(&compact_spec).unwrap(); - let deserialized: ConstructorSpec> = + let deserialized: ConstructorSpec = serde_json::from_value(json.clone()).unwrap(); // then diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 51826dd47dc..2a7c0e52760 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -18,7 +18,7 @@ include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"] ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false } tiny-keccak = { version = "2.0", features = ["keccak"] } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [dev-dependencies] diff --git a/crates/storage/Cargo.toml b/crates/storage/Cargo.toml index 77ddef3a564..95ed9fd1de3 100644 --- a/crates/storage/Cargo.toml +++ b/crates/storage/Cargo.toml @@ -23,7 +23,7 @@ ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] } derive_more = { version = "0.99", default-features = false, features = ["from", "display"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } cfg-if = "1.0" array-init = "1.0" generic-array = "0.14.1" diff --git a/examples/contract-terminate/Cargo.toml b/examples/contract-terminate/Cargo.toml index 11900736389..b787dc6898d 100644 --- a/examples/contract-terminate/Cargo.toml +++ b/examples/contract-terminate/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc1", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc1", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/contract-transfer/Cargo.toml b/examples/contract-transfer/Cargo.toml index f05ad122929..965e2331dd5 100644 --- a/examples/contract-transfer/Cargo.toml +++ b/examples/contract-transfer/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc1", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc1", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/delegator/Cargo.toml b/examples/delegator/Cargo.toml index 001dc99c8ae..a18319f1e25 100644 --- a/examples/delegator/Cargo.toml +++ b/examples/delegator/Cargo.toml @@ -16,7 +16,7 @@ scale = { package = "parity-scale-codec", version = "2.0", default-features = fa adder = { version = "3.0.0-rc2", path = "adder", default-features = false, features = ["ink-as-dependency"] } subber = { version = "3.0.0-rc2", path = "subber", default-features = false, features = ["ink-as-dependency"] } accumulator = { version = "3.0.0-rc2", path = "accumulator", default-features = false, features = ["ink-as-dependency"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] name = "delegator" diff --git a/examples/delegator/accumulator/Cargo.toml b/examples/delegator/accumulator/Cargo.toml index b1679f8b9b5..9d82983f90e 100644 --- a/examples/delegator/accumulator/Cargo.toml +++ b/examples/delegator/accumulator/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../../crates/storage", default ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/delegator/adder/Cargo.toml b/examples/delegator/adder/Cargo.toml index 1211b2e1e44..c0f36498aaf 100644 --- a/examples/delegator/adder/Cargo.toml +++ b/examples/delegator/adder/Cargo.toml @@ -14,7 +14,7 @@ ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-featu accumulator = { version = "3.0.0-rc2", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/delegator/subber/Cargo.toml b/examples/delegator/subber/Cargo.toml index c16b184ea6c..95b2b984ea0 100644 --- a/examples/delegator/subber/Cargo.toml +++ b/examples/delegator/subber/Cargo.toml @@ -14,7 +14,7 @@ ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-featu accumulator = { version = "3.0.0-rc2", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/dns/Cargo.toml b/examples/dns/Cargo.toml index c7d6adc8d26..37c1b9976ec 100644 --- a/examples/dns/Cargo.toml +++ b/examples/dns/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/erc20/Cargo.toml b/examples/erc20/Cargo.toml index f168e47c9a5..e099eaacabe 100644 --- a/examples/erc20/Cargo.toml +++ b/examples/erc20/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/erc721/Cargo.toml b/examples/erc721/Cargo.toml index 185abbb428e..3fde6c63099 100644 --- a/examples/erc721/Cargo.toml +++ b/examples/erc721/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/flipper/Cargo.toml b/examples/flipper/Cargo.toml index 67495220541..a4e4fe2889c 100644 --- a/examples/flipper/Cargo.toml +++ b/examples/flipper/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/incrementer/Cargo.toml b/examples/incrementer/Cargo.toml index e1408fefb56..9f74c164e81 100644 --- a/examples/incrementer/Cargo.toml +++ b/examples/incrementer/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/multisig_plain/Cargo.toml b/examples/multisig_plain/Cargo.toml index 80393b2fbd5..27558a86623 100755 --- a/examples/multisig_plain/Cargo.toml +++ b/examples/multisig_plain/Cargo.toml @@ -13,7 +13,7 @@ ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features ink_prelude = { version = "3.0.0-rc2", path = "../../crates/prelude", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/rand-extension/Cargo.toml b/examples/rand-extension/Cargo.toml index 8247cef05ca..3ed587f0c87 100755 --- a/examples/rand-extension/Cargo.toml +++ b/examples/rand-extension/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { path = "../../crates/storage", default-features = false } ink_lang = { path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] name = "rand_extension" diff --git a/examples/trait-erc20/Cargo.toml b/examples/trait-erc20/Cargo.toml index f168e47c9a5..e099eaacabe 100644 --- a/examples/trait-erc20/Cargo.toml +++ b/examples/trait-erc20/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] diff --git a/examples/trait-flipper/Cargo.toml b/examples/trait-flipper/Cargo.toml index a5d69926a74..05d0f639af9 100644 --- a/examples/trait-flipper/Cargo.toml +++ b/examples/trait-flipper/Cargo.toml @@ -12,7 +12,7 @@ ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-fe ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false } scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] } -scale-info = { version = "0.5", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true } [lib] name = "flipper"