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
--- a/crates/evm-coder/CHANGELOG.md
+++ b/crates/evm-coder/CHANGELOG.md
@@ -3,25 +3,28 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+
 ## [v0.1.4] - 2022-11-02
+
 ### Added
- - Named structures support.
 
+- Named structures support.
+
 ## [v0.1.3] - 2022-08-29
 
 ### Fixed
 
- - Parsing simple values.
+- Parsing simple values.
 
 ## [v0.1.2] 2022-08-19
 
 ### Added
 
- - Implementation `AbiWrite` for tuples.
+- Implementation `AbiWrite` for tuples.
 
- ### Fixes
+### Fixes
 
- - Tuple generation for solidity.
+- Tuple generation for solidity.
 
 ## [v0.1.1] 2022-08-16
 
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
25use pallet_common::{25use pallet_common::{
26 CollectionById, dispatch::CollectionDispatch, erc::static_property::key, Pallet as PalletCommon,26 CollectionById,
27 dispatch::CollectionDispatch,
28 erc::{static_property::key, CollectionHelpersEvents},
29 Pallet as PalletCommon,
27};30};
28use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};31use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};