git.delta.rocks / unique-network / refs/commits / 67a4ea452077

difftreelog

fix Tuple size calculation. Some PR fixes.

Trubnikov Sergey2022-08-29parent: #78a9952.patch.diff
in: master

4 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2169,7 +2169,7 @@
 
 [[package]]
 name = "evm-coder"
-version = "0.1.2"
+version = "0.1.3"
 dependencies = [
  "ethereum",
  "evm-coder-procedural",
@@ -5749,7 +5749,7 @@
 
 [[package]]
 name = "pallet-fungible"
-version = "0.1.4"
+version = "0.1.5"
 dependencies = [
  "ethereum",
  "evm-coder",
modifiedcrates/evm-coder/Cargo.tomldiffbeforeafterboth
--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "evm-coder"
-version = "0.1.2"
+version = "0.1.3"
 license = "GPLv3"
 edition = "2021"
 
modifiedcrates/evm-coder/src/abi.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -354,6 +354,15 @@
 				ABI_ALIGNMENT
 			}
 		}
+		impl AbiRead<$ty> for $ty {
+			fn abi_read(&mut self) -> Result<$ty> {
+				todo!("Refactor requered.")
+			}
+
+			fn size() -> usize {
+				ABI_ALIGNMENT
+			}
+		}
 	};
 }
 
@@ -412,6 +421,7 @@
 		where
 			$(
 				Self: AbiRead<$ident>,
+				$ident: AbiRead<$ident>,
 			)+
 			($($ident,)+): TypeHelper<($($ident,)+)>,
 		{
@@ -424,7 +434,7 @@
 			}
 
 			fn size() -> usize {
-				0 $(+ {let _ : $ident; ABI_ALIGNMENT})+
+				0 $(+ <$ident>::size())+
 			}
 		}
 		#[allow(non_snake_case)]
modifiedpallets/fungible/Cargo.tomldiffbeforeafterboth
before · pallets/fungible/Cargo.toml
1[package]2name = "pallet-fungible"3version = "0.1.4"4license = "GPLv3"5edition = "2021"67[dependencies.codec]8default-features = false9features = ['derive']10package = 'parity-scale-codec'11version = '3.1.2'1213[dependencies]14frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }15frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }16sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }17sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }18sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }19pallet-common = { default-features = false, path = '../common' }20pallet-structure = { default-features = false, path = '../structure' }21up-data-structs = { default-features = false, path = '../../primitives/data-structs' }22evm-coder = { default-features = false, path = '../../crates/evm-coder' }23pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }24ethereum = { version = "0.12.0", default-features = false }25frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }26pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }27scale-info = { version = "2.0.1", default-features = false, features = [28    "derive",29] }3031[features]32default = ["std"]33std = [34    "frame-support/std",35    "frame-system/std",36    "sp-runtime/std",37    "sp-std/std",38    "up-data-structs/std",39    "pallet-common/std",40    "pallet-structure/std",41    "evm-coder/std",42    "ethereum/std",43    "pallet-evm-coder-substrate/std",44    'frame-benchmarking/std',45    "pallet-evm/std",46]47runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
after · pallets/fungible/Cargo.toml
1[package]2name = "pallet-fungible"3version = "0.1.5"4license = "GPLv3"5edition = "2021"67[dependencies.codec]8default-features = false9features = ['derive']10package = 'parity-scale-codec'11version = '3.1.2'1213[dependencies]14frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }15frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }16sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }17sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }18sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }19pallet-common = { default-features = false, path = '../common' }20pallet-structure = { default-features = false, path = '../structure' }21up-data-structs = { default-features = false, path = '../../primitives/data-structs' }22evm-coder = { default-features = false, path = '../../crates/evm-coder' }23pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }24ethereum = { version = "0.12.0", default-features = false }25frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }26pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }27scale-info = { version = "2.0.1", default-features = false, features = [28    "derive",29] }3031[features]32default = ["std"]33std = [34    "frame-support/std",35    "frame-system/std",36    "sp-runtime/std",37    "sp-std/std",38    "up-data-structs/std",39    "pallet-common/std",40    "pallet-structure/std",41    "evm-coder/std",42    "ethereum/std",43    "pallet-evm-coder-substrate/std",44    'frame-benchmarking/std',45    "pallet-evm/std",46]47runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']