Closed
Description
When passing a JSON payload that contains parameters to FireFly (e.g. to deploy a contract that has constructor parameters) evmconnect returns FF22062: Negative numeric value is invalid for component %!!(MISSING)s(uint16=256)%!!(MISSING)(EXTRA string=[0])
if the numeric parameter exceeds the maximum size of a float64
.
This appears to be because Golang deserialises large JSON numbers to float64
when deserialising to an interface{}
, and silently loses any precision caused by the JSON number exceeding the maximum representable value of a float64
.