blockcypher / php-client

PHP wrapper for the BlockCypher APIs
Apache License 2.0
51 stars 85 forks source link

Couldn't deserialize request #81

Closed yura-sutnuk closed 5 years ago

yura-sutnuk commented 6 years ago

Hi, when i trying to send more then 9eth i get error

Couldn't deserialize request: math/big: cannot unmarshal "1.1E+21" into a *big.Int

i think it is becouse the amount in WEI that i trying to send is biger then PHP_INT_MAX but if I try to break a transaction into several outputs i get

"error": "Missing output or too many outputs, Ethereum transactions take exactly one.

How can i send for example 11 eth to someone?

cooljar commented 5 years ago

Hi, do you already slove this issue, i have same problem.

yura-sutnuk commented 5 years ago

Yes, the problem was that after I got the SKELETON transaction, I use the json_decode function to convert json to an array, and at that moment the transaction value is not converted correctly and looks like 1.1E+21. Solution: it is durty but I worked with Json, as with a string so as not to transform into an array or object