Open
Description
Hi there,
I'm trying to call a contract function with a big number in the args that is represented in the scientific format in the serialized string.
...
"A": {
"field": 7e+24,
...
}
The contract function execution fails with:
{"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'Failed to deserialize input from JSON.: Error(\"expected `,` or `}`\", line: 1, column: 135)'
The column 135 is exactly the "e" character in the number "7e+24" and I think borsh can't cope with the scientific notation of numbers.
I'd expect borsh to deserialize "7e+24" into 7000000000000000000000000 just fine.
Maybe this error is also somehow intentional, because I'm trying to deserialize into a u128 and not every number with a scientific notation can be parsed into a u128. But then I'd expect a different error message, telling me that types are incompatible or so.
Hope this helps
Metadata
Assignees
Labels
No labels