difftreelog
refactor drop TransactionConverter support
in: master
4 files changed
primitives/common/src/types.rsdiffbeforeafterboth49 + Sync49 + Sync50 + 'static;50 + 'static;5152 type TransactionConverter: fp_rpc::ConvertTransaction<UncheckedExtrinsic>53 + Send54 + Sync55 + 'static;5657 fn get_transaction_converter() -> Self::TransactionConverter;58 }51 }59}52}6053runtime/common/ethereum/mod.rsdiffbeforeafterboth--- a/runtime/common/ethereum/mod.rs
+++ b/runtime/common/ethereum/mod.rs
@@ -17,4 +17,3 @@
pub mod precompiles;
pub mod self_contained_call;
pub mod sponsoring;
-pub mod transaction_converter;
runtime/common/ethereum/transaction_converter.rsdiffbeforeafterboth--- a/runtime/common/ethereum/transaction_converter.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use codec::{Encode, Decode};
-use crate::{opaque, Runtime, UncheckedExtrinsic};
-
-pub struct TransactionConverter;
-
-impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
- fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
- UncheckedExtrinsic::new_unsigned(
- pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
- )
- }
-}
-
-impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {
- fn convert_transaction(
- &self,
- transaction: pallet_ethereum::Transaction,
- ) -> opaque::UncheckedExtrinsic {
- let extrinsic = UncheckedExtrinsic::new_unsigned(
- pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
- );
- let encoded = extrinsic.encode();
- opaque::UncheckedExtrinsic::decode(&mut &encoded[..])
- .expect("Encoded extrinsic is always valid")
- }
-}
runtime/common/instance.rsdiffbeforeafterboth--- a/runtime/common/instance.rs
+++ b/runtime/common/instance.rs
@@ -1,6 +1,6 @@
use crate::{
runtime_common::{
- config::ethereum::CrossAccountId, ethereum::transaction_converter::TransactionConverter,
+ config::ethereum::CrossAccountId,
},
Runtime,
};
@@ -8,9 +8,4 @@
impl RuntimeInstance for Runtime {
type CrossAccountId = CrossAccountId;
- type TransactionConverter = TransactionConverter;
-
- fn get_transaction_converter() -> TransactionConverter {
- TransactionConverter
- }
}