$ethabi = new Ethabi($this->abi);
$balance ='0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001';
$balance = $ethabi->decodeParameter('uint256[]', $balance);
return $balance[1]; // 1
Returned 1,
It should have been 1.8321 Such decimals;
decodeParameters($types, $param) decode uint256[] Cannot return decimals,Only return integers;
$ethabi = new Ethabi($this->abi); $balance ='0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001'; $balance = $ethabi->decodeParameter('uint256[]', $balance); return $balance[1]; // 1
Returned 1, It should have been 1.8321 Such decimals;
How to handle it???