Skip to content
Snippets Groups Projects
Unverified Commit 7e876547 authored by PG Herveou's avatar PG Herveou Committed by GitHub
Browse files

[pallet-revive] Update typeInfo (#6263)


Update typeinfo impl to make it transparent for subxt

see https://github.com/paritytech/subxt/pull/1845

---------

Co-authored-by: default avatarGitHub Action <action@github.com>
parent 58fd5ae4
Branches
No related merge requests found
Pipeline #503295 waiting for manual action with stages
in 30 minutes and 11 seconds
title: '[pallet-revive] Update typeInfo'
doc:
- audience: Runtime Dev
description: |-
Update typeinfo impl to make it transparent for subxt
see https://github.com/paritytech/subxt/pull/1845
crates:
- name: pallet-revive
bump: minor
......@@ -25,7 +25,7 @@ use frame_support::{
traits::{ExtrinsicCall, InherentBuilder, SignedTransactionBuilder},
};
use pallet_transaction_payment::OnChargeTransaction;
use scale_info::TypeInfo;
use scale_info::{StaticTypeInfo, TypeInfo};
use sp_arithmetic::Percent;
use sp_core::{Get, U256};
use sp_runtime::{
......@@ -52,12 +52,24 @@ pub const GAS_PRICE: u32 = 1u32;
/// Wraps [`generic::UncheckedExtrinsic`] to support checking unsigned
/// [`crate::Call::eth_transact`] extrinsic.
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]
#[scale_info(skip_type_params(E))]
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]
pub struct UncheckedExtrinsic<Address, Signature, E: EthExtra>(
pub generic::UncheckedExtrinsic<Address, CallOf<E::Config>, Signature, E::Extension>,
);
impl<Address, Signature, E: EthExtra> TypeInfo for UncheckedExtrinsic<Address, Signature, E>
where
Address: StaticTypeInfo,
Signature: StaticTypeInfo,
E::Extension: StaticTypeInfo,
{
type Identity =
generic::UncheckedExtrinsic<Address, CallOf<E::Config>, Signature, E::Extension>;
fn type_info() -> scale_info::Type {
generic::UncheckedExtrinsic::<Address, CallOf<E::Config>, Signature, E::Extension>::type_info()
}
}
impl<Address, Signature, E: EthExtra>
From<generic::UncheckedExtrinsic<Address, CallOf<E::Config>, Signature, E::Extension>>
for UncheckedExtrinsic<Address, Signature, E>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment