Java Code Examples for org.web3j.utils.Numeric#decodeQuantity()
The following examples show how to use
org.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: BaseContract.java From client-sdk-java with Apache License 2.0 | 5 votes |
private BigInteger numberDecoder(Object number) { if(number instanceof String) { String numberStr = (String)number; return Numeric.decodeQuantity(numberStr); } else if(number instanceof Number ){ Number number2 = (Number)number; return BigInteger.valueOf(number2.longValue()); } else { throw new MessageDecodingException("Can not decode number value = " + number); } }
Example 2
Source File: Delegation.java From client-sdk-java with Apache License 2.0 | 5 votes |
public void setDelegateLockedHes(String delegateLockedHes) { if(delegateLockedHes != null && delegateLockedHes.length()>0) { this.delegateLockedHes = Numeric.decodeQuantity(delegateLockedHes); }else { this.delegateLockedHes = BigInteger.ZERO; } }
Example 3
Source File: Delegation.java From client-sdk-java with Apache License 2.0 | 5 votes |
public void setDelegateReleased(String delegateReleased) { if(delegateReleased != null && delegateReleased.length()>0) { this.delegateReleased = Numeric.decodeQuantity(delegateReleased); }else { this.delegateReleased = BigInteger.ZERO; } }
Example 4
Source File: Node.java From client-sdk-java with Apache License 2.0 | 5 votes |
public void setDelegateTotal(String delegateTotal) { if (delegateTotal != null && delegateTotal.length() > 0) { this.delegateTotal = Numeric.decodeQuantity(delegateTotal); } else { this.delegateTotal = BigInteger.ZERO; } }
Example 5
Source File: EthBlock.java From web3j with Apache License 2.0 | 4 votes |
public BigInteger getSize() { return size != null ? Numeric.decodeQuantity(size) : BigInteger.ZERO; }
Example 6
Source File: Transaction.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getValue() { return Numeric.decodeQuantity(value); }
Example 7
Source File: PlatonGasPrice.java From client-sdk-java with Apache License 2.0 | 4 votes |
public BigInteger getGasPrice() { return Numeric.decodeQuantity(getResult()); }
Example 8
Source File: PlatonBlockNumber.java From client-sdk-java with Apache License 2.0 | 4 votes |
public BigInteger getBlockNumber() { return Numeric.decodeQuantity(getResult()); }
Example 9
Source File: EthGetBalance.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getBalance() { return Numeric.decodeQuantity(getResult()); }
Example 10
Source File: EthEstimateGas.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getAmountUsed() { return Numeric.decodeQuantity(getResult()); }
Example 11
Source File: ShhMessages.java From client-sdk-java with Apache License 2.0 | 4 votes |
public BigInteger getExpiry() { return Numeric.decodeQuantity(expiry); }
Example 12
Source File: EthFilter.java From web3j with Apache License 2.0 | 4 votes |
public BigInteger getFilterId() { return Numeric.decodeQuantity(getResult()); }
Example 13
Source File: EthGetTransactionCount.java From web3j with Apache License 2.0 | 4 votes |
public BigInteger getTransactionCount() { return Numeric.decodeQuantity(getResult()); }
Example 14
Source File: Trace.java From web3j with Apache License 2.0 | 4 votes |
public BigInteger getValue() { return Numeric.decodeQuantity(value); }
Example 15
Source File: ShhNewFilter.java From client-sdk-java with Apache License 2.0 | 4 votes |
public BigInteger getFilterId() { return Numeric.decodeQuantity(getResult()); }
Example 16
Source File: Trace.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getValue() { return Numeric.decodeQuantity(value); }
Example 17
Source File: EthGetBalance.java From web3j with Apache License 2.0 | 4 votes |
public BigInteger getBalance() { return Numeric.decodeQuantity(getResult()); }
Example 18
Source File: Transaction.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getGasPrice() { return Numeric.decodeQuantity(gasPrice); }
Example 19
Source File: ShhMessages.java From etherscan-explorer with GNU General Public License v3.0 | 4 votes |
public BigInteger getTtl() { return Numeric.decodeQuantity(ttl); }
Example 20
Source File: RestrictingItem.java From client-sdk-java with Apache License 2.0 | 4 votes |
public void setBalance(String balance) { this.balance = Numeric.decodeQuantity(balance); }