Skip to content

Conversation

@SkymanOne
Copy link
Contributor

Fields in EventMetadata now also store name of a type specified in the pallet's source code.

Required for #673 in cargo-contract

@SkymanOne SkymanOne requested a review from ascjones September 15, 2022 19:19
@jsdw
Copy link
Collaborator

jsdw commented Sep 16, 2022

LGTM aside from my tiny nit and Andrew's suggestion!

.iter()
.map(|f| (f.name().map(|n| n.to_owned()), f.ty().id()))
.map(|f| {
EventFieldMetadata::new(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe we could use something like impl From<Field<PortableForm>> here

Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing! 👍

@SkymanOne SkymanOne merged commit 033ceb2 into master Sep 20, 2022
@SkymanOne SkymanOne deleted the gn-add-field-type branch September 20, 2022 08:59
This was referenced Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants