Java Code Examples for org.fisco.bcos.web3j.utils.Numeric#decodeQuantity()
The following examples show how to use
org.fisco.bcos.web3j.utils.Numeric#decodeQuantity() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Log.java From web3sdk with Apache License 2.0 | 5 votes |
private BigInteger convert(String value) { if (value != null) { return Numeric.decodeQuantity(value); } else { return null; } }
Example 2
Source File: TransactionReceipt.java From web3sdk with Apache License 2.0 | 5 votes |
@JsonIgnore public boolean isStatusOK() { if (null == status) { return true; } try { BigInteger statusQuantity = Numeric.decodeQuantity(status); return BigInteger.ZERO.equals(statusQuantity); } catch (Exception e) { return false; } }
Example 3
Source File: RevertResolver.java From web3sdk with Apache License 2.0 | 5 votes |
/** * @param status * @param output * @return */ public static boolean hasRevertMessage(String status, String output) { if (Strings.isEmpty(status) || Strings.isEmpty(output)) { return false; } try { BigInteger statusQuantity = Numeric.decodeQuantity(status); return !BigInteger.ZERO.equals(statusQuantity) && isOutputStartWithRevertMethod(output); } catch (Exception e) { return false; } }
Example 4
Source File: BcosBlock.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getGasLimit() { return Numeric.decodeQuantity(gasLimit); }
Example 5
Source File: BlockNumber.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getBlockNumber() { return Numeric.decodeQuantity(getResult()); }
Example 6
Source File: PendingTxSize.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getPendingTxSize() { return Numeric.decodeQuantity(getResult()); }
Example 7
Source File: BcosFilter.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getFilterId() { return Numeric.decodeQuantity(getResult()); }
Example 8
Source File: TransactionReceipt.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getGasUsed() { return Numeric.decodeQuantity(gasUsed); }
Example 9
Source File: TransactionReceipt.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getBlockNumber() { return Numeric.decodeQuantity(blockNumber); }
Example 10
Source File: TransactionReceipt.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getTransactionIndex() { return Numeric.decodeQuantity(transactionIndex); }
Example 11
Source File: BcosBlock.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getTimestamp() { return Numeric.decodeQuantity(timestamp); }
Example 12
Source File: BcosBlock.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getGasUsed() { return Numeric.decodeQuantity(gasUsed); }
Example 13
Source File: BcosBlock.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getNonce() { if (nonce == null) return new BigInteger("0"); return Numeric.decodeQuantity(nonce); }
Example 14
Source File: BcosBlock.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getNumber() { return Numeric.decodeQuantity(number); }
Example 15
Source File: PbftView.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getPbftView() { return Numeric.decodeQuantity(getResult()); }
Example 16
Source File: Transaction.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getGas() { return Numeric.decodeQuantity(gas); }
Example 17
Source File: TotalTransactionCount.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getTxSum() { return Numeric.decodeQuantity(txSum); }
Example 18
Source File: Transaction.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getValue() { return Numeric.decodeQuantity(value); }
Example 19
Source File: Transaction.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getTransactionIndex() { return Numeric.decodeQuantity(transactionIndex); }
Example 20
Source File: Transaction.java From web3sdk with Apache License 2.0 | 4 votes |
public BigInteger getNonce() { return Numeric.decodeQuantity(nonce); }