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

add constants api to codegen #402

Merged
merged 3 commits into from
Jan 27, 2022
Merged

Conversation

gregdhill
Copy link
Contributor

Signed-off-by: Gregory Hill gregorydhill@outlook.com

Closes #396

@gregdhill gregdhill marked this pull request as draft January 20, 2022 22:43
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
@gregdhill
Copy link
Contributor Author

@ascjones @jsdw what do you think of this approach? Do you have any recommendations?

codegen/src/api/constants.rs Outdated Show resolved Hide resolved
@jsdw
Copy link
Collaborator

jsdw commented Jan 21, 2022

Offhand I'm happy with this approach; it looks fairly clean and I like the api that you end up with!

@gregdhill gregdhill marked this pull request as ready for review January 24, 2022 13:58
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM!

Clippy needs fixing

codegen/src/api/constants.rs Outdated Show resolved Hide resolved
codegen/src/api/constants.rs Outdated Show resolved Hide resolved
codegen/src/api/constants.rs Outdated Show resolved Hide resolved
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
@jsdw jsdw merged commit 5f5a7ef into paritytech:master Jan 27, 2022
@gregdhill gregdhill deleted the constants-api branch January 27, 2022 14:27
0623forbidden pushed a commit to DEIPworld/substrate-subxt that referenced this pull request Feb 15, 2022
* add constants api to codegen

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* handle constant decoding error

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* fix clippy and remove extra constants allocation

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
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.

Generate API for pallet constants
3 participants