Skip to content

Conversation

@ascjones
Copy link
Contributor

@ascjones ascjones commented Sep 9, 2020

Following on from #19 which enables decoding of scale-info meta types, this PR makes the fields of those types accessible via public getters.

The motivation for this is to allow 3rd party libraries to make use of instances of the meta types for e.g code generation of types in another language.

The immediate use case I am planning for is to build a library which is able to deserialize ink! contract metadata and use that to construct contract calls.

Additionally we rename Form::TypeId to Form::Type to be more accurate.

Copy link
Contributor

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

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

Is this not possible with some idiomatic getters instead?

@ascjones
Copy link
Contributor Author

ascjones commented Sep 9, 2020

I thought it was idiomatic for these types which are data, e.g. in syn?

@ascjones ascjones changed the title Make public fields in scale-info meta type hierarchy Make public fields in meta type hierarchy Sep 9, 2020
@ascjones ascjones changed the title Make public fields in meta type hierarchy Add public getters for fields in meta type hierarchy Oct 2, 2020
Copy link
Contributor

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

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

LGTM

@ascjones ascjones merged commit 1ccbefa into master Oct 2, 2020
@ascjones ascjones deleted the aj-pub-types branch October 2, 2020 14:05
@ascjones ascjones mentioned this pull request Oct 5, 2020
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.

3 participants