Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pallet-revive] Update typeInfo #6263

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions prdoc/pr_6263.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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
16 changes: 14 additions & 2 deletions substrate/frame/revive/src/evm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: TypeInfo + 'static,
Signature: TypeInfo + 'static,
E::Extension: TypeInfo + 'static,
{
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>
Expand Down
Loading