Permalink
Browse files

Revert @1099511627776

  • Loading branch information...
serderovsh committed Jan 24, 2019
1 parent a8ffbad commit a40f526347e72d42e884f263b6544ff652365b39
Showing with 8 additions and 10 deletions.
  1. +8 −10 src/TransactionBuilder.php
@@ -463,17 +463,15 @@ public function triggerSmartContract($abi,
'consume_user_resource_percent' => $bandwidthLimit,
]);
if(count($func_abi['outputs']) === 0) {
if($result['result']['result'])
return $result['transaction'];
if($result['result']['result']) {
if(count($func_abi['outputs']) >= 0 && isset($result['constant_result'])) {
return $eth_abi->decodeParameters($func_abi, $result['constant_result'][0]);
}
return $result['transaction'];
}
$message = isset($result['result']['message']) ?
$this->tron->hexString2Utf8($result['result']['message']) : '';
if(!isset($result['constant_result']))
{
$message = isset($result['result']['message']) ?
$this->tron->hexString2Utf8($result['result']['message']) : '';
throw new TronException('Failed to execute. Error:'.$message);
}
return $eth_abi->decodeParameters($func_abi, $result['constant_result'][0]);
throw new TronException('Failed to execute. Error:'.$message);
}
}

0 comments on commit a40f526

Please sign in to comment.