Open KeKs0r opened 7 months ago
hey there @KeKs0r ! Thanks for reporting. it was our understanding not to support floats, doubles, or proto2 fields.
@webmaster128 — Simon, did we misunderstand, and is double something we need? It looks like umee is using double, not sure how the encoding should output, but we can take a look at ts-proto output
ideally mayabe we can treat double similar to other fields and maybe not a big add on
As far as I can tell (and according to this resource), the JavaScript number type is a 64 bit float, i.e. can hold protobuf floats and doubles.
Floats/doubles are generally not used much in blockchains as their behaviour can be host specific and can lead to non-deterministic execution. However, there are cases like compute in a query where this is safe as long as the query result is not used by the chain itself (which happens if you allow CosmWasm contracts to do the query).
Hi,
I am trying to decode queries for Umee, and they apparently use the
double
type: https://github.com/umee-network/umee/blob/main/proto/umee/leverage/v1/query.proto#L409But when generating code i see that the binary reader throws an error that
double
is not supported:Is there a known workaround, or way to support doubles?