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

The following examples show how to use org.web3j.utils.Numeric#toHexStringWithPrefixZeroPadded() . 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: WasmAddress.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
public WasmAddress(byte[] value) {
	this.value = value;
	this.bigIntValue = Numeric.toBigInt(value);
	this.address = Numeric.toHexStringWithPrefixZeroPadded(bigIntValue, LENGTH_IN_HEX);
}
 
Example 2
Source File: Address.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return Numeric.toHexStringWithPrefixZeroPadded(
            value.getValue(), LENGTH_IN_HEX);
}
 
Example 3
Source File: Address.java    From etherscan-explorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String toString() {
    return Numeric.toHexStringWithPrefixZeroPadded(
            value.getValue(), LENGTH_IN_HEX);
}
 
Example 4
Source File: Address.java    From web3j with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return Numeric.toHexStringWithPrefixZeroPadded(value.getValue(), value.getBitSize() >> 2);
}