Data type mismatch in go-sdk

UInt64 is used in go-sdk to store “amount”, which is definitely not enough. Current amount precision is 10^18 in testnet, that means number “10000000000000000010” represents amount “10.00000000000000001”.

“10000000000000000010” exceeds the limit of UInt64 (18446744073709551615 or 0xffffffffffffffff). So go-sdk breaks as long as amount is bigger than UInt64 boundary.

Is go-sdk still incompatible with epoch v0.25 ?

Hi @skywind3000

Our developers will get back to you ASAP.

Best regards,
Mark

The problem is that in swagger.json, amount, fee etc are referred to as integers. Not even unsigned int64, but just int64. The code generated from that swagger.json of course is meant for int64, and a lot of manual patching is needed to even convert it to uint64 within the go-sdk and change the validation too.

For now, it sorta works, given that the focus is more on the Python/Javascript SDK - but everyone agrees a more permanent solution will have to be found.

1 Like