Class FeeDelegatedAccountUpdateWithRatio
- java.lang.Object
-
- com.klaytn.caver.transaction.AbstractTransaction
-
- com.klaytn.caver.transaction.AbstractFeeDelegatedTransaction
-
- com.klaytn.caver.transaction.AbstractFeeDelegatedWithRatioTransaction
-
- com.klaytn.caver.transaction.type.FeeDelegatedAccountUpdateWithRatio
-
- All Implemented Interfaces:
ITransactionWithGasPriceField
public class FeeDelegatedAccountUpdateWithRatio extends AbstractFeeDelegatedWithRatioTransaction implements ITransactionWithGasPriceField
Represents a fee delegated account update with ratio transaction. Please refer to https://docs.klaytn.com/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedaccountupdatewithratio to see more detail.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FeeDelegatedAccountUpdateWithRatio.Builder
FeeDelegatedAccountUpdateWithRatio Builder class.
-
Constructor Summary
Constructors Constructor Description FeeDelegatedAccountUpdateWithRatio(Klay klaytnCall, java.lang.String from, java.lang.String nonce, java.lang.String gas, java.lang.String gasPrice, java.lang.String chainId, java.util.List<SignatureData> signatures, java.lang.String feePayer, java.util.List<SignatureData> feePayerSignatures, java.lang.String feeRatio, Account account)
Creates a FeeDelegatedAccountUpdateWithRatio instance.FeeDelegatedAccountUpdateWithRatio(FeeDelegatedAccountUpdateWithRatio.Builder builder)
Creates a FeeDelegatedAccountUpdateWithRatio instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
combineSignedRawTransactions(java.util.List<java.lang.String> rlpEncoded)
Combines signatures to the transaction from RLP-encoded transaction strings and returns a single transaction with all signatures combined.boolean
compareTxField(AbstractFeeDelegatedWithRatioTransaction txObj, boolean checkSig)
Check equals txObj passed parameter and Current instance.static FeeDelegatedAccountUpdateWithRatio
create(Klay klaytnCall, java.lang.String from, java.lang.String nonce, java.lang.String gas, java.lang.String gasPrice, java.lang.String chainId, java.util.List<SignatureData> signatures, java.lang.String feePayer, java.util.List<SignatureData> feePayerSignatures, java.lang.String feeRatio, Account account)
Creates a FeeDelegatedAccountUpdateWithRatio instance.static FeeDelegatedAccountUpdateWithRatio
create(FeeDelegatedAccountUpdateWithRatio.Builder builder)
Creates a FeeDelegatedAccountUpdateWithRatio instance.static FeeDelegatedAccountUpdateWithRatio
decode(byte[] rlpEncoded)
Decodes a RLP-encoded FeeDelegatedAccountUpdateWithRatio byte array.static FeeDelegatedAccountUpdateWithRatio
decode(java.lang.String rlpEncoded)
Decodes a RLP-encoded FeeDelegatedAccountUpdateWithRatio string.void
fillTransaction()
Fills empty optional transaction field.(gasPrice)Account
getAccount()
Getter function for Accountjava.lang.String
getCommonRLPEncodingForSignature()
Returns the RLP-encoded string to make the signature of this transaction.java.lang.String
getGasPrice()
Getter function for gas pricejava.lang.String
getRLPEncoding()
Returns the RLP-encoded string of this transaction (i.e., rawTransaction).java.lang.String
getSenderTxHash()
Returns a senderTxHash of transactionvoid
setAccount(Account account)
Setter function for Accountvoid
setGasPrice(java.lang.String gasPrice)
Setter function for gas price.void
setGasPrice(java.math.BigInteger gasPrice)
Setter function for gas price.void
validateOptionalValues(boolean checkChainID)
Checks that member variables that can be defined by the user are defined.-
Methods inherited from class com.klaytn.caver.transaction.AbstractFeeDelegatedWithRatioTransaction
getFeeRatio, getFeeRatioInteger, setFeeRatio, setFeeRatio
-
Methods inherited from class com.klaytn.caver.transaction.AbstractFeeDelegatedTransaction
appendFeePayerSignatures, appendFeePayerSignatures, compareTxField, getFeePayer, getFeePayerSignatures, getRLPEncodingForFeePayerSignature, recoverFeePayerPublicKeys, setFeePayer, setFeePayerSignatures, signAsFeePayer, signAsFeePayer, signAsFeePayer, signAsFeePayer, signAsFeePayer, signAsFeePayer
-
Methods inherited from class com.klaytn.caver.transaction.AbstractTransaction
appendSignatures, appendSignatures, compareTxField, getChainId, getFrom, getGas, getKeyType, getKlaytnCall, getNonce, getRawTransaction, getRLPEncodingForSignature, getSignatures, getTransactionHash, getType, recoverPublicKeys, refineSignature, setChainId, setChainId, setFrom, setGas, setGas, setKlaytnCall, setNonce, setNonce, setSignatures, setType, sign, sign, sign, sign, sign, sign, suggestGasPrice
-
-
-
-
Constructor Detail
-
FeeDelegatedAccountUpdateWithRatio
public FeeDelegatedAccountUpdateWithRatio(FeeDelegatedAccountUpdateWithRatio.Builder builder)
Creates a FeeDelegatedAccountUpdateWithRatio instance.- Parameters:
builder
- FeeDelegatedAccountUpdateWithRatio.Builder instance.
-
FeeDelegatedAccountUpdateWithRatio
public FeeDelegatedAccountUpdateWithRatio(Klay klaytnCall, java.lang.String from, java.lang.String nonce, java.lang.String gas, java.lang.String gasPrice, java.lang.String chainId, java.util.List<SignatureData> signatures, java.lang.String feePayer, java.util.List<SignatureData> feePayerSignatures, java.lang.String feeRatio, Account account)
Creates a FeeDelegatedAccountUpdateWithRatio instance.- Parameters:
klaytnCall
- Klay RPC instancefrom
- The address of the sender.nonce
- A value used to uniquely identify a sender’s transaction.gas
- The maximum amount of gas the transaction is allowed to use.gasPrice
- A unit price of gas in peb the sender will pay for a transaction fee.chainId
- Network IDsignatures
- A Signature listfeePayer
- A fee payer address.feePayerSignatures
- A fee payer signature list.feeRatio
- A fee ratio of the fee payer.account
- An account instance includes account key to be updated to the account in the network.
-
-
Method Detail
-
create
public static FeeDelegatedAccountUpdateWithRatio create(FeeDelegatedAccountUpdateWithRatio.Builder builder)
Creates a FeeDelegatedAccountUpdateWithRatio instance.- Parameters:
builder
- FeeDelegatedAccountUpdateWithRatio.Builder instance.- Returns:
- FeeDelegatedAccountUpdateWithRatio
-
create
public static FeeDelegatedAccountUpdateWithRatio create(Klay klaytnCall, java.lang.String from, java.lang.String nonce, java.lang.String gas, java.lang.String gasPrice, java.lang.String chainId, java.util.List<SignatureData> signatures, java.lang.String feePayer, java.util.List<SignatureData> feePayerSignatures, java.lang.String feeRatio, Account account)
Creates a FeeDelegatedAccountUpdateWithRatio instance.- Parameters:
klaytnCall
- Klay RPC instancefrom
- The address of the sender.nonce
- A value used to uniquely identify a sender’s transaction.gas
- The maximum amount of gas the transaction is allowed to use.gasPrice
- A unit price of gas in peb the sender will pay for a transaction fee.chainId
- Network IDsignatures
- A Signature listfeePayer
- A fee payer address.feePayerSignatures
- A fee payer signature list.feeRatio
- A fee ratio of the fee payer.account
- An account instance includes account key to be updated to the account in the network.- Returns:
- FeeDelegatedAccountUpdateWithRatio
-
getGasPrice
public java.lang.String getGasPrice()
Getter function for gas price- Specified by:
getGasPrice
in interfaceITransactionWithGasPriceField
- Returns:
- String
-
setGasPrice
public void setGasPrice(java.lang.String gasPrice)
Setter function for gas price.- Parameters:
gasPrice
- A unit price of gas in peb the sender will pay for a transaction fee.
-
setGasPrice
public void setGasPrice(java.math.BigInteger gasPrice)
Setter function for gas price.- Parameters:
gasPrice
- A unit price of gas in peb the sender will pay for a transaction fee.
-
decode
public static FeeDelegatedAccountUpdateWithRatio decode(java.lang.String rlpEncoded)
Decodes a RLP-encoded FeeDelegatedAccountUpdateWithRatio string.- Parameters:
rlpEncoded
- RLP-encoded FeeDelegatedAccountUpdateWithRatio string.- Returns:
- FeeDelegatedAccountUpdateWithRatio
-
decode
public static FeeDelegatedAccountUpdateWithRatio decode(byte[] rlpEncoded)
Decodes a RLP-encoded FeeDelegatedAccountUpdateWithRatio byte array.- Parameters:
rlpEncoded
- RLP-encoded FeeDelegatedAccountUpdateWithRatio byte array.- Returns:
- FeeDelegatedAccountUpdateWithRatio
-
getRLPEncoding
public java.lang.String getRLPEncoding()
Returns the RLP-encoded string of this transaction (i.e., rawTransaction).- Specified by:
getRLPEncoding
in classAbstractTransaction
- Returns:
- String
-
getCommonRLPEncodingForSignature
public java.lang.String getCommonRLPEncodingForSignature()
Returns the RLP-encoded string to make the signature of this transaction.- Specified by:
getCommonRLPEncodingForSignature
in classAbstractTransaction
- Returns:
- String
-
getSenderTxHash
public java.lang.String getSenderTxHash()
Returns a senderTxHash of transaction- Overrides:
getSenderTxHash
in classAbstractTransaction
- Returns:
- String
-
compareTxField
public boolean compareTxField(AbstractFeeDelegatedWithRatioTransaction txObj, boolean checkSig)
Check equals txObj passed parameter and Current instance.- Overrides:
compareTxField
in classAbstractFeeDelegatedWithRatioTransaction
- Parameters:
txObj
- The AbstractFeeDelegatedWithRatioTransaction Object to comparecheckSig
- Check whether signatures field is equal.- Returns:
- boolean
-
combineSignedRawTransactions
public java.lang.String combineSignedRawTransactions(java.util.List<java.lang.String> rlpEncoded)
Combines signatures to the transaction from RLP-encoded transaction strings and returns a single transaction with all signatures combined. When combining the signatures into a transaction instance, an error is thrown if the decoded transaction contains different value except signatures.- Specified by:
combineSignedRawTransactions
in classAbstractTransaction
- Parameters:
rlpEncoded
- A List of RLP-encoded transaction strings.- Returns:
- String
-
fillTransaction
public void fillTransaction() throws java.io.IOException
Fills empty optional transaction field.(gasPrice)- Overrides:
fillTransaction
in classAbstractTransaction
- Throws:
java.io.IOException
-
validateOptionalValues
public void validateOptionalValues(boolean checkChainID)
Checks that member variables that can be defined by the user are defined. If there is an undefined variable, an error occurs.- Overrides:
validateOptionalValues
in classAbstractTransaction
-
getAccount
public Account getAccount()
Getter function for Account- Returns:
- Account
-
setAccount
public void setAccount(Account account)
Setter function for Account- Parameters:
account
- Account instance
-
-