Java Code Examples for org.web3j.utils.Numeric#encodeQuantity()

The following examples show how to use org.web3j.utils.Numeric#encodeQuantity() . 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: Transaction.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
private static String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null;  // we don't want the field to be encoded if not present
    }
}
 
Example 2
Source File: ShhPost.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
private String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null;
    }
}
 
Example 3
Source File: Transaction.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
private static String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null;  // we don't want the field to be encoded if not present
    }
}
 
Example 4
Source File: ShhPost.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
private String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null;
    }
}
 
Example 5
Source File: Transaction.java    From web3j with Apache License 2.0 5 votes vote down vote up
private static String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null; // we don't want the field to be encoded if not present
    }
}
 
Example 6
Source File: ShhPost.java    From web3j with Apache License 2.0 5 votes vote down vote up
private String convert(BigInteger value) {
    if (value != null) {
        return Numeric.encodeQuantity(value);
    } else {
        return null;
    }
}
 
Example 7
Source File: PrivateTransactionRequest.java    From besu with Apache License 2.0 4 votes vote down vote up
private String convert(final BigInteger value) {
  return value == null ? null : Numeric.encodeQuantity(value);
}
 
Example 8
Source File: DefaultBlockParameterNumber.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
@Override
@JsonValue
public String getValue() {
    return Numeric.encodeQuantity(blockNumber);
}
 
Example 9
Source File: DefaultBlockParameterNumber.java    From etherscan-explorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
@JsonValue
public String getValue() {
    return Numeric.encodeQuantity(blockNumber);
}
 
Example 10
Source File: DefaultBlockParameterNumber.java    From web3j with Apache License 2.0 4 votes vote down vote up
@Override
@JsonValue
public String getValue() {
    return Numeric.encodeQuantity(blockNumber);
}