org.web3j.abi.datatypes.generated.Uint16 Java Examples
The following examples show how to use
org.web3j.abi.datatypes.generated.Uint16.
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: StakingParam.java From client-sdk-java with Apache License 2.0 | 6 votes |
public List<Type> getSubmitInputParameters() { return Arrays.<Type>asList(new Uint16(stakingAmountType.getValue()) , new BytesType(Numeric.hexStringToByteArray(benifitAddress)) , new BytesType(Numeric.hexStringToByteArray(nodeId)) , new Utf8String(externalId) , new Utf8String(nodeName) , new Utf8String(webSite) , new Utf8String(details) , new Int256(amount) , new Uint16(rewardPer) , new Uint32(processVersion.getProgramVersion()) , new BytesType(Numeric.hexStringToByteArray(processVersion.getProgramVersionSign())) , new BytesType(Numeric.hexStringToByteArray(blsPubKey)) , new BytesType(Numeric.hexStringToByteArray(blsProof)) ); }
Example #2
Source File: DelegateContract.java From client-sdk-java with Apache License 2.0 | 5 votes |
private Function createDelegateFunction(String nodeId, StakingAmountType stakingAmountType, BigInteger amount) { Function function = new Function(FunctionType.DELEGATE_FUNC_TYPE, Arrays.asList(new Uint16(stakingAmountType.getValue()) , new BytesType(Numeric.hexStringToByteArray(nodeId)) , new Uint256(amount))); return function; }
Example #3
Source File: UpdateStakingParam.java From client-sdk-java with Apache License 2.0 | 5 votes |
public List<Type> getSubmitInputParameters() { return Arrays.asList(new BytesType(Numeric.hexStringToByteArray(benifitAddress)), new BytesType(Numeric.hexStringToByteArray(nodeId)), new Uint16(rewardPer), new Utf8String(externalId), new Utf8String(nodeName), new Utf8String(webSite), new Utf8String(details)); }
Example #4
Source File: StakingContract.java From client-sdk-java with Apache License 2.0 | 5 votes |
private Function createAddStakingFunction(String nodeId, StakingAmountType stakingAmountType, BigInteger amount) { Function function = new Function(FunctionType.ADD_STAKING_FUNC_TYPE, Arrays.asList(new BytesType(Numeric.hexStringToByteArray(nodeId)), new Uint16(stakingAmountType.getValue()), new Uint256(amount))); return function; }
Example #5
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEventAdditionalTypes(BigInteger uint16Value, BigInteger int64Value, byte[] byteValue) { final Function function = new Function( FUNC_EMITEVENTADDITIONALTYPES, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint16(uint16Value), new org.web3j.abi.datatypes.generated.Int64(int64Value), new org.web3j.abi.datatypes.generated.Bytes1(byteValue)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #6
Source File: RedeemSignatureDisplayModel.java From alpha-wallet-android with MIT License | 5 votes |
private void receiveBurnNotification(TransferFromEventResponse burnTx) { String userAddr = Numeric.cleanHexPrefix(defaultWallet().getValue().address).toLowerCase(); if (burnTx._from.toLowerCase().contains(userAddr)) { List<Uint16> transferIndicies = burnTx._indices; markUsedIndicies(transferIndicies); } }
Example #7
Source File: RedeemSignatureDisplayModel.java From alpha-wallet-android with MIT License | 5 votes |
private void markUsedIndicies(List<Uint16> burnList) { for (Uint16 indexVal : burnList) { Integer index = indexVal.getValue().intValue(); if (tickets.contains(index)) { tickets.remove(index); } } }