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
1[package]1[package]
2name = "evm-coder"2name = "evm-coder"
3version = "0.1.2"3version = "0.1.3"
4license = "GPLv3"4license = "GPLv3"
5edition = "2021"5edition = "2021"
66
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
--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "pallet-fungible"
-version = "0.1.4"
+version = "0.1.5"
 license = "GPLv3"
 edition = "2021"