difftreelog
CORE-302 serde_json -> serde-json-core
in: master
3 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6114,7 +6114,7 @@
"pallet-nonfungible",
"parity-scale-codec",
"scale-info",
- "serde_json",
+ "serde-json-core",
"sp-core",
"sp-runtime",
"sp-std",
@@ -10777,6 +10777,16 @@
]
[[package]]
+name = "serde-json-core"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8014aeea272bca0f0779778d43253f2f3375b414185b30e6ecc4d3e4a9994781"
+dependencies = [
+ "ryu",
+ "serde",
+]
+
+[[package]]
name = "serde_derive"
version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
pallets/evm-collection/Cargo.tomldiffbeforeafterboth1[package]2name = "pallet-evm-collection"3version = "0.1.0"4license = "GPLv3"5edition = "2021"67[dependencies]8scale-info = { version = "2.0.1", default-features = false, features = [9 "derive",10] }11ethereum = { version = "0.12.0", default-features = false }12log = { default-features = false, version = "0.4.14" }13serde_json = { version = "1.0.68", default-features = false, features = ["alloc"] }1415# Substrate16frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }17frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }18sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }19sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }20sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }2122# Unique23pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }24fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }2526# Locals27evm-coder = { default-features = false, path = '../../crates/evm-coder' }28pallet-common = { default-features = false, path = '../../pallets/common' }29pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }30pallet-nonfungible = { default-features = false, path = '../../pallets/nonfungible' }31up-data-structs = { default-features = false, path = '../../primitives/data-structs', features = ["serde1"] }3233[dependencies.codec]34default-features = false35features = ['derive']36package = 'parity-scale-codec'37version = '3.1.2'3839[features]40default = ["std"]41std = [42 "frame-support/std",43 "frame-system/std",44 "sp-runtime/std",45 "sp-std/std",46 "sp-core/std",47 "evm-coder/std",48 "pallet-evm-coder-substrate/std",49 "pallet-evm/std",50]1[package]2name = "pallet-evm-collection"3version = "0.1.0"4license = "GPLv3"5edition = "2021"67[dependencies]8scale-info = { version = "2.0.1", default-features = false, features = [9 "derive",10] }11ethereum = { version = "0.12.0", default-features = false }12log = { default-features = false, version = "0.4.14" }13serde-json-core = { version = "0.4", default-features = false }1415# Substrate16frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }17frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }18sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }19sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }20sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }2122# Unique23pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }24fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }2526# Locals27evm-coder = { default-features = false, path = '../../crates/evm-coder' }28pallet-common = { default-features = false, path = '../../pallets/common' }29pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }30pallet-nonfungible = { default-features = false, path = '../../pallets/nonfungible' }31up-data-structs = { default-features = false, path = '../../primitives/data-structs', features = ["serde1"] }3233[dependencies.codec]34default-features = false35features = ['derive']36package = 'parity-scale-codec'37version = '3.1.2'3839[features]40default = ["std"]41std = [42 "frame-support/std",43 "frame-system/std",44 "sp-runtime/std",45 "sp-std/std",46 "sp-core/std",47 "evm-coder/std",48 "pallet-evm-coder-substrate/std",49 "pallet-evm/std",50 "serde-json-core/std",51]pallets/evm-collection/src/eth.rsdiffbeforeafterboth--- a/pallets/evm-collection/src/eth.rs
+++ b/pallets/evm-collection/src/eth.rs
@@ -191,9 +191,9 @@
let mut collection = collection_from_address(collection_address, &self.0)?;
check_is_owner(caller, &collection)?;
- let limits = serde_json::from_str(limits_json.as_ref())
+ let limits = serde_json_core::from_str(limits_json.as_ref())
.map_err(|e| Error::Revert(format!("Parse JSON error: {}", e)))?;
- collection.limits = limits;
+ collection.limits = limits.0;
collection.save().map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
Ok(())
}