git.delta.rocks / unique-network / refs/commits / e2ead47ea043

difftreelog

Merge pull request #706 from UniqueNetwork/fix/evm-stubs

Yaroslav Bolyukin2022-11-08parents: #c0afeb6 #c633ab6.patch.diff
in: master
fix evm-stubs:

4 files changed

modifiedcrates/evm-coder/CHANGELOG.mddiffbeforeafterboth
3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.
44
5<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->
6
6## [v0.1.4] - 2022-11-027## [v0.1.4] - 2022-11-02
8
7### Added9### Added
10
8 - Named structures support.11- Named structures support.
912
10## [v0.1.3] - 2022-08-2913## [v0.1.3] - 2022-08-29
1114
12### Fixed15### Fixed
1316
14 - Parsing simple values.17- Parsing simple values.
1518
16## [v0.1.2] 2022-08-1919## [v0.1.2] 2022-08-19
1720
18### Added21### Added
1922
20 - Implementation `AbiWrite` for tuples.23- Implementation `AbiWrite` for tuples.
2124
22 ### Fixes25### Fixes
2326
24 - Tuple generation for solidity.27- Tuple generation for solidity.
2528
26## [v0.1.1] 2022-08-1629## [v0.1.1] 2022-08-16
2730
modifiedcrates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth
--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -928,10 +928,13 @@
 			.chain(self.info.inline_is.0.iter())
 			.map(|is| Is::expand_generator(is, &gen_ref));
 		let solidity_event_generators = self.info.events.0.iter().map(Is::expand_event_generator);
-
+		let solidity_events_idents = self.info.events.0.iter().map(|is| is.name.clone());
 		let docs = &self.docs;
 
 		quote! {
+			#(
+				const _: ::core::marker::PhantomData<#solidity_events_idents> = ::core::marker::PhantomData;
+			)*
 			#[derive(Debug)]
 			#(#[doc = #docs])*
 			pub enum #call_name #gen_ref {
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -34,7 +34,7 @@
 ]
 try-runtime = ["frame-support/try-runtime"]
 limit-testing = ["up-data-structs/limit-testing"]
-
+stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
 ################################################################################
 # Standart Dependencies
 
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -23,7 +23,10 @@
 use crate::Pallet;
 
 use pallet_common::{
-	CollectionById, dispatch::CollectionDispatch, erc::static_property::key, Pallet as PalletCommon,
+	CollectionById,
+	dispatch::CollectionDispatch,
+	erc::{static_property::key, CollectionHelpersEvents},
+	Pallet as PalletCommon,
 };
 use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
 use pallet_evm_coder_substrate::{dispatch_to_evm, SubstrateRecorder, WithRecorder};