org.web3j.abi.datatypes.generated.Uint8 Java Examples

The following examples show how to use org.web3j.abi.datatypes.generated.Uint8. 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: ShipIt.java    From web3j with Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>> shipments(String param0) {
    final Function function = new Function(FUNC_SHIPMENTS, 
            Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(param0)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint8>() {}, new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Bytes32>() {}));
    return new RemoteCall<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>>(
            new Callable<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>>() {
                @Override
                public Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]> call() throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>(
                            (String) results.get(0).getValue(), 
                            (String) results.get(1).getValue(), 
                            (BigInteger) results.get(2).getValue(), 
                            (BigInteger) results.get(3).getValue(), 
                            (BigInteger) results.get(4).getValue(), 
                            (BigInteger) results.get(5).getValue(), 
                            (String) results.get(6).getValue(), 
                            (byte[]) results.get(7).getValue());
                }
            });
}
 
Example #2
Source File: PayWages.java    From client-sdk-java with Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple4<BigInteger, BigInteger, String, String>> getEmployee(String _account) {
	final Function function = new Function(FUNC_GETEMPLOYEE, Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(_account)),
			Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {
			}, new TypeReference<Uint8>() {
			}, new TypeReference<Utf8String>() {
			}, new TypeReference<Address>() {
			}));
	return new RemoteCall<Tuple4<BigInteger, BigInteger, String, String>>(new Callable<Tuple4<BigInteger, BigInteger, String, String>>() {
		@Override
		public Tuple4<BigInteger, BigInteger, String, String> call() throws Exception {
			List<Type> results = executeCallMultipleValueReturn(function);
			return new Tuple4<BigInteger, BigInteger, String, String>((BigInteger) results.get(0).getValue(),
					(BigInteger) results.get(1).getValue(), (String) results.get(2).getValue(), (String) results.get(3).getValue());
		}
	});
}
 
Example #3
Source File: ShipIt.java    From etherscan-explorer with GNU General Public License v3.0 6 votes vote down vote up
public RemoteCall<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>> shipments(String param0) {
    final Function function = new Function("shipments", 
            Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(param0)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint8>() {}, new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Bytes32>() {}));
    return new RemoteCall<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>>(
            new Callable<Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>>() {
                @Override
                public Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]> call() throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple8<String, String, BigInteger, BigInteger, BigInteger, BigInteger, String, byte[]>(
                            (String) results.get(0).getValue(), 
                            (String) results.get(1).getValue(), 
                            (BigInteger) results.get(2).getValue(), 
                            (BigInteger) results.get(3).getValue(), 
                            (BigInteger) results.get(4).getValue(), 
                            (BigInteger) results.get(5).getValue(), 
                            (String) results.get(6).getValue(), 
                            (byte[]) results.get(7).getValue());
                }
            });
}
 
Example #4
Source File: TokenRepository.java    From alpha-wallet-android with MIT License 6 votes vote down vote up
public static byte[] createDropCurrency(MagicLinkData order, int v, byte[] r, byte[] s, String recipient)
{
    Function function = new Function(
            "dropCurrency",
            Arrays.asList(new org.web3j.abi.datatypes.generated.Uint32(order.nonce),
                          new org.web3j.abi.datatypes.generated.Uint32(order.amount),
                          new org.web3j.abi.datatypes.generated.Uint32(order.expiry),
                          new org.web3j.abi.datatypes.generated.Uint8(v),
                          new org.web3j.abi.datatypes.generated.Bytes32(r),
                          new org.web3j.abi.datatypes.generated.Bytes32(s),
                          new org.web3j.abi.datatypes.Address(recipient)),
            Collections.emptyList());

    String encodedFunction = FunctionEncoder.encode(function);
    return Numeric.hexStringToByteArray(Numeric.cleanHexPrefix(encodedFunction));
}
 
Example #5
Source File: ProposalContract.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
private Function createVoteFunction(ProgramVersion programVersion, String proposalID, String verifier, VoteOption voteOption) {
    Function function = new Function(FunctionType.VOTE_FUNC_TYPE,
            Arrays.asList(new BytesType(Numeric.hexStringToByteArray(verifier)),
                    new BytesType(Numeric.hexStringToByteArray(proposalID)), new Uint8(voteOption.getValue()),
                    new Uint32(programVersion.getProgramVersion()),
                    new BytesType(Numeric.hexStringToByteArray(programVersion.getProgramVersionSign()))));
    return function;
}
 
Example #6
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #7
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #8
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #9
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, credentials, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #10
Source File: HumanStandardTokenIT.java    From web3j with Apache License 2.0 5 votes vote down vote up
private String sendCreateContractTransaction(Credentials credentials, BigInteger initialSupply)
        throws Exception {
    BigInteger nonce = getNonce(credentials.getAddress());

    String encodedConstructor =
            FunctionEncoder.encodeConstructor(
                    Arrays.asList(
                            new Uint256(initialSupply),
                            new Utf8String("web3j tokens"),
                            new Uint8(BigInteger.TEN),
                            new Utf8String("w3j$")));

    RawTransaction rawTransaction =
            RawTransaction.createContractTransaction(
                    nonce,
                    GAS_PRICE,
                    GAS_LIMIT,
                    BigInteger.ZERO,
                    getHumanStandardTokenBinary() + encodedConstructor);

    byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
    String hexValue = Numeric.toHexString(signedMessage);

    EthSendTransaction transactionResponse =
            web3j.ethSendRawTransaction(hexValue).sendAsync().get();

    return transactionResponse.getTransactionHash();
}
 
Example #11
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #12
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #13
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #14
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount),
            new org.web3j.abi.datatypes.Utf8String(_tokenName),
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits),
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, credentials, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #15
Source File: TokenERC20.java    From Android-Wallet-Token-ERC20 with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<TokenERC20> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialSupply, String tokenName, String tokenSymbol, BigInteger tokendecimals) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new Uint256(initialSupply),
            new Utf8String(tokenName),
            new Utf8String(tokenSymbol),
            new Uint8(tokendecimals)));
    return deployRemoteCall(TokenERC20.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #16
Source File: TokenERC20.java    From Android-Wallet-Token-ERC20 with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<TokenERC20> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialSupply, String tokenName, String tokenSymbol, BigInteger tokendecimals) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new Uint256(initialSupply),
            new Utf8String(tokenName),
            new Utf8String(tokenSymbol),
            new Uint8(tokendecimals)));
    return deployRemoteCall(TokenERC20.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #17
Source File: TokenRepository.java    From alpha-wallet-android with MIT License 5 votes vote down vote up
private int getDecimals(String address, NetworkInfo network) throws Exception {
    if (EthereumNetworkRepository.decimalOverride(address, network.chainId) > 0) return EthereumNetworkRepository.decimalOverride(address, network.chainId);
    Function function = decimalsOf();
    Wallet temp = new Wallet(null);
    String responseValue = callSmartContractFunction(function, address, network, temp);
    if (TextUtils.isEmpty(responseValue)) return 18;

    List<Type> response = FunctionReturnDecoder.decode(
            responseValue, function.getOutputParameters());
    if (response.size() == 1) {
        return ((Uint8) response.get(0)).getValue().intValue();
    } else {
        return 18;
    }
}
 
Example #18
Source File: HumanStandardToken.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), 
            new org.web3j.abi.datatypes.Utf8String(_tokenName), 
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), 
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #19
Source File: HumanStandardToken.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
    String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), 
            new org.web3j.abi.datatypes.Utf8String(_tokenName), 
            new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), 
            new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
    return deployRemoteCall(HumanStandardToken.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #20
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, GasProvider contractGasProvider,
		BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
	String encodedConstructor = FunctionEncoder.encodeConstructor(
			Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), new org.web3j.abi.datatypes.Utf8String(_tokenName),
					new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
	return deployRemoteCall(HumanStandardToken.class, web3j, credentials, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #21
Source File: HumanStandardTokenIT.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
private String sendCreateContractTransaction(
        Credentials credentials, BigInteger initialSupply) throws Exception {
    BigInteger nonce = getNonce(credentials.getAddress());

    String encodedConstructor =
            FunctionEncoder.encodeConstructor(
                    Arrays.asList(
                            new Uint256(initialSupply),
                            new Utf8String("web3j tokens"),
                            new Uint8(BigInteger.TEN),
                            new Utf8String("w3j$")));

    RawTransaction rawTransaction = RawTransaction.createContractTransaction(
            nonce,
            GAS_PRICE,
            GAS_LIMIT,
            BigInteger.ZERO,
            getHumanStandardTokenBinary() + encodedConstructor);

    byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
    String hexValue = Numeric.toHexString(signedMessage);

    EthSendTransaction transactionResponse = web3j.ethSendRawTransaction(hexValue)
            .sendAsync().get();

    return transactionResponse.getTransactionHash();
}
 
Example #22
Source File: PayWages.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
public RemoteCall<TransactionReceipt> addEmployee(BigInteger _id, BigInteger _status, String _name, String _account) {
	final Function function = new Function(FUNC_ADDEMPLOYEE,
			Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_id), new org.web3j.abi.datatypes.generated.Uint8(_status),
					new org.web3j.abi.datatypes.Utf8String(_name), new org.web3j.abi.datatypes.Address(_account)),
			Collections.<TypeReference<?>>emptyList());
	return executeRemoteCallTransaction(function);
}
 
Example #23
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit,
		BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
	String encodedConstructor = FunctionEncoder.encodeConstructor(
			Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), new org.web3j.abi.datatypes.Utf8String(_tokenName),
					new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
	return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #24
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, TransactionManager transactionManager, GasProvider contractGasProvider,
		BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
	String encodedConstructor = FunctionEncoder.encodeConstructor(
			Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), new org.web3j.abi.datatypes.Utf8String(_tokenName),
					new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
	return deployRemoteCall(HumanStandardToken.class, web3j, transactionManager, contractGasProvider, BINARY, encodedConstructor);
}
 
Example #25
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
@Deprecated
public static RemoteCall<HumanStandardToken> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit,
		BigInteger _initialAmount, String _tokenName, BigInteger _decimalUnits, String _tokenSymbol) {
	String encodedConstructor = FunctionEncoder.encodeConstructor(
			Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_initialAmount), new org.web3j.abi.datatypes.Utf8String(_tokenName),
					new org.web3j.abi.datatypes.generated.Uint8(_decimalUnits), new org.web3j.abi.datatypes.Utf8String(_tokenSymbol)));
	return deployRemoteCall(HumanStandardToken.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor);
}
 
Example #26
Source File: Purchase.java    From web3j with Apache License 2.0 4 votes vote down vote up
public RemoteCall<BigInteger> state() {
    final Function function = new Function(FUNC_STATE,
            Arrays.<Type>asList(),
            Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
    return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}
 
Example #27
Source File: StaticArrayTest.java    From web3j with Apache License 2.0 4 votes vote down vote up
private Uint[] arrayOfUints(int length) {
    return IntStream.rangeClosed(1, length).mapToObj(Uint8::new).toArray(Uint[]::new);
}
 
Example #28
Source File: ERC20.java    From web3j with Apache License 2.0 4 votes vote down vote up
public RemoteCall<BigInteger> decimals() {
    final Function function = new Function(FUNC_DECIMALS, 
            Arrays.<Type>asList(), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
    return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}
 
Example #29
Source File: StaticArrayTest.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
private Uint[] arrayOfUints(int length) {
    return IntStream.rangeClosed(1, length).mapToObj(Uint8::new).toArray(Uint[]::new);
}
 
Example #30
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
public RemoteCall<BigInteger> decimals() {
	final Function function = new Function(FUNC_DECIMALS, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {
	}));
	return executeRemoteCallSingleValueReturn(function, BigInteger.class);
}