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

BCI-1511: only contract schema changes #359

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

augustbleeds
Copy link
Contributor

@augustbleeds augustbleeds commented Aug 21, 2023

Originally diffed from #355 to just seperate out the schema changes

Changes:

  • For query messages use serialized objects instead of enums (ex: { "owner": {} } instead of "owner" to query the owner of a contract) for best practices + type generation compatibility
  • Modify schema generation script to use new write_api! macro. It creates a main .json file which describes the entire contract json api and raw/ file folder which contains individual json schemas
  • Add main .json cw-plus files in gauntlet-cw-plus package

TODO: make changes to gauntlet to support the query message types (in a later PR)

@cfal cfal requested a review from archseer August 21, 2023 15:18
@@ -22,6 +22,7 @@ backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-schema = { version = "1.1.5" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm why the need for this? The crate's readme specifically states it's a dev dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://book.cosmwasm.com/basics/good-practices.html#json-schema -- just copied over here. It also didn't work as a dev dependency as I wasn't able to use it in schema.rs

Copy link
Collaborator

@archseer archseer left a comment

Choose a reason for hiding this comment

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

LGTM, it does look like the schema conventions changed slightly (so no more dev dependency, custom macros)

@augustbleeds augustbleeds merged commit ec5c38e into develop Aug 29, 2023
11 of 14 checks passed
@augustbleeds augustbleeds deleted the augustus.BCI-1511.only-contract-schema-changes branch August 29, 2023 12:41
@augustbleeds augustbleeds mentioned this pull request Aug 29, 2023
7 tasks
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.

2 participants