Reference Contract Schema on chain
- Dominant language
- Go
- Stars
- 416
- Forks
- 538
- PR merge metrics
- No merged PRs in 30d
Description
So many developers build tools on top of CosmWasm have complained to me that there is no way to get the contract schema, and no reference to it on chain.
**User story:** *As a developer, I would like to be able to query the contract's schema on chain.*
With the latest version of `cosmwasm-schema` we're generating nice single file schemas. I see two viable paths for getting a first version of this shipped:
- When uploading a code id, add a `--schema` option that takes a `schema-url` which could simply be the IPFS address of the schema
- Extend [cw2](https://docs.rs/cw2/0.15.1/cw2/) to have a reference to a `scheme-url`
I will note that verification of the contract code and schema is a _separate_ _problem_. Have _a lot_ of devs asking for this, and would like to get something for them soon.
Related: #241
Contributor guide
Research direction
Start by resolving which proposed path is intended: a --schema upload option with an IPFS schema URL, or a cw2 reference to a schema URL. Review the latest cosmwasm-schema single-file output and the linked cw2 0.15.1 API, then define the query behavior and acceptance criteria for a first version. Related issue #241 provides additional context; done means a contract schema reference is queryable on chain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100