git.delta.rocks / unique-network / refs/commits / 909792523ad1

difftreelog

fix(evm-coder-substrate-pallet) add error when non existing function is called on collection contract

Grigoriy Simonov2022-08-12parent: #e4268af.patch.diff
in: master

5 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5871,7 +5871,7 @@
 
 [[package]]
 name = "pallet-evm-coder-substrate"
-version = "0.1.1"
+version = "0.1.2"
 dependencies = [
  "ethereum",
  "evm-coder",
addedpallets/evm-coder-substrate/CHANGELOG.mddiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-coder-substrate/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+
+## [0.1.2] - 2022-08-12
+
+### Fixed
+
+ - Issue with error not being thrown when non existing function is called on collection contract
+    
+ 
+ 
\ No newline at end of file
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "pallet-evm-coder-substrate"
-version = "0.1.1"
+version = "0.1.2"
 license = "GPLv3"
 edition = "2021"
 
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -261,7 +261,7 @@
 	let (selector, mut reader) = AbiReader::new_call(input)?;
 	let call = C::parse(selector, &mut reader)?;
 	if call.is_none() {
-		return Ok(None);
+		return Err("Function not found".into());
 	}
 	let call = call.unwrap();
 
addedtests/src/evmCoder.test.tsdiffbeforeafterboth

no changes