hackbg / hackbg/fadroma-example

schema_for! uses f64, resulting in invalid build

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

[This is the macro `schema_for!`](https://docs.rs/schemars/0.7.6/src/schemars/macros.rs.html) from the [`cosmwasm-schema` crate](https://docs.rs/cosmwasm-schema/0.10.1/cosmwasm_schema/index.html), as used by the [`schema-contract`](https://github.com/hackbg/fadroma-example/blob/main/schema-contract/schema-contract.rs#L39-L41) contract.

However, including `cosmwasm-schema` in a contract results in an invalid build.

The build contains float-related WebAssembly opcodes, which are unsupported by the chain runtime. (`cosmwasm-schema` probably has a float-enabled dependency by way of `serde` even though CosmWasm doesn't use floats.)

Find a way to produce a WASM contract build that reports its own schema and does not contain the unsupported `f64` opcodes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.