Class FeeDelegatedSmartContractDeployWithRatio
- java.lang.Object
-
- com.klaytn.caver.transaction.AbstractTransaction
-
- com.klaytn.caver.transaction.AbstractFeeDelegatedTransaction
-
- com.klaytn.caver.transaction.AbstractFeeDelegatedWithRatioTransaction
-
- com.klaytn.caver.transaction.type.FeeDelegatedSmartContractDeployWithRatio
-
- All Implemented Interfaces:
ITransactionWithGasPriceField
public class FeeDelegatedSmartContractDeployWithRatio extends AbstractFeeDelegatedWithRatioTransaction implements ITransactionWithGasPriceField
Represents a fee delegated smart contract deploy with ratio transaction. Please refer to https://docs.klaytn.com/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedsmartcontractdeploywithratio to see more detail.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FeeDelegatedSmartContractDeployWithRatio.Builder
FeeDelegatedSmartContractDeployWithRatio Builder class
-
Constructor Summary
Constructors Constructor Description FeeDelegatedSmartContractDeployWithRatio(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, java.lang.String to, java.lang.String value, java.lang.String input, boolean humanReadable, java.lang.String codeFormat)
Creates a FeeDelegatedSmartContractDeployWithRatio instance.FeeDelegatedSmartContractDeployWithRatio(FeeDelegatedSmartContractDeployWithRatio.Builder builder)
Creates a FeeDelegatedSmartContractDeployWithRatio 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 FeeDelegatedSmartContractDeployWithRatio
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, java.lang.String to, java.lang.String value, java.lang.String input, boolean humanReadable, java.lang.String codeFormat)
Creates a FeeDelegatedSmartContractDeployWithRatio instance.static FeeDelegatedSmartContractDeployWithRatio
create(FeeDelegatedSmartContractDeployWithRatio.Builder builder)
Creates a FeeDelegatedSmartContractDeployWithRatio instance.static FeeDelegatedSmartContractDeployWithRatio
decode(byte[] rlpEncoded)
Decodes a RLP-encoded FeeDelegatedSmartContractDeployWithRatio byte array.static FeeDelegatedSmartContractDeployWithRatio
decode(java.lang.String rlpEncoded)
Decodes a RLP-encoded FeeDelegatedSmartContractDeployWithRatio string.void
fillTransaction()
Fills empty optional transaction field.(gasPrice)java.lang.String
getCodeFormat()
Getter function for code formatjava.lang.String
getCommonRLPEncodingForSignature()
Returns the RLP-encoded string to make the signature of this transaction.java.lang.String
getGasPrice()
Getter function for gas priceboolean
getHumanReadable()
Getter function for humanReadablejava.lang.String
getInput()
Getter function for input.java.lang.String
getRLPEncoding()
Returns the RLP-encoded string of this transaction (i.e., rawTransaction).java.lang.String
getSenderTxHash()
Returns a senderTxHash of transactionjava.lang.String
getTo()
Getter function for to.java.lang.String
getValue()
Getter function for value.void
setCodeFormat(java.lang.String codeFormat)
Setter function for codeFormatvoid
setGasPrice(java.lang.String gasPrice)
Setter function for gas price.void
setGasPrice(java.math.BigInteger gasPrice)
Setter function for gas price.void
setHumanReadable(boolean humanReadable)
Setter function for humanReadablevoid
setInput(java.lang.String input)
Setter function for inputvoid
setTo(java.lang.String to)
Setter function for tovoid
setValue(java.lang.String value)
Setter function for valuevoid
setValue(java.math.BigInteger value)
Setter function for valuevoid
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
-
FeeDelegatedSmartContractDeployWithRatio
public FeeDelegatedSmartContractDeployWithRatio(FeeDelegatedSmartContractDeployWithRatio.Builder builder)
Creates a FeeDelegatedSmartContractDeployWithRatio instance.- Parameters:
builder
- FeeDelegatedSmartContractDeployWithRatio.Builder instance.
-
FeeDelegatedSmartContractDeployWithRatio
public FeeDelegatedSmartContractDeployWithRatio(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, java.lang.String to, java.lang.String value, java.lang.String input, boolean humanReadable, java.lang.String codeFormat)
Creates a FeeDelegatedSmartContractDeployWithRatio 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.to
- The account address that will receive the transferred value.value
- The amount of KLAY in peb to be transferred.input
- The data attached to the transaction, used for transaction execution.humanReadable
- Is human-readable address.codeFormat
- The code format of smart contract code
-
-
Method Detail
-
create
public static FeeDelegatedSmartContractDeployWithRatio create(FeeDelegatedSmartContractDeployWithRatio.Builder builder)
Creates a FeeDelegatedSmartContractDeployWithRatio instance.- Parameters:
builder
- FeeDelegatedSmartContractDeployWithRatio.Builder instance.- Returns:
- FeeDelegatedSmartContractDeployWithRatio
-
create
public static FeeDelegatedSmartContractDeployWithRatio 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, java.lang.String to, java.lang.String value, java.lang.String input, boolean humanReadable, java.lang.String codeFormat)
Creates a FeeDelegatedSmartContractDeployWithRatio 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.to
- The account address that will receive the transferred value.value
- The amount of KLAY in peb to be transferred.input
- The data attached to the transaction, used for transaction execution.humanReadable
- Is human-readable address.codeFormat
- The code format of smart contract code- Returns:
- FeeDelegatedSmartContractDeployWithRatio
-
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 FeeDelegatedSmartContractDeployWithRatio decode(java.lang.String rlpEncoded)
Decodes a RLP-encoded FeeDelegatedSmartContractDeployWithRatio string.- Parameters:
rlpEncoded
- RLP-encoded FeeDelegatedSmartContractDeployWithRatio string.- Returns:
- FeeDelegatedSmartContractDeployWithRatio
-
decode
public static FeeDelegatedSmartContractDeployWithRatio decode(byte[] rlpEncoded)
Decodes a RLP-encoded FeeDelegatedSmartContractDeployWithRatio byte array.- Parameters:
rlpEncoded
- RLP-encoded FeeDelegatedSmartContractDeployWithRatio byte array.- Returns:
- FeeDelegatedSmartContractDeployWithRatio
-
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 AbstractFeeDelegatedTransaction 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
-
getTo
public java.lang.String getTo()
Getter function for to.- Returns:
- String
-
getValue
public java.lang.String getValue()
Getter function for value.- Returns:
- String
-
getInput
public java.lang.String getInput()
Getter function for input.- Returns:
- String
-
getHumanReadable
public boolean getHumanReadable()
Getter function for humanReadable- Returns:
- boolean
-
getCodeFormat
public java.lang.String getCodeFormat()
Getter function for code format- Returns:
- String
-
setTo
public void setTo(java.lang.String to)
Setter function for to- Parameters:
to
- The account address that will receive the transferred value.
-
setValue
public void setValue(java.lang.String value)
Setter function for value- Parameters:
value
- The amount of KLAY in peb to be transferred.
-
setValue
public void setValue(java.math.BigInteger value)
Setter function for value- Parameters:
value
- The amount of KLAY in peb to be transferred.
-
setInput
public void setInput(java.lang.String input)
Setter function for input- Parameters:
input
- Data attached to the transaction, used for transaction execution.
-
setHumanReadable
public void setHumanReadable(boolean humanReadable)
Setter function for humanReadable- Parameters:
humanReadable
- boolean
-
setCodeFormat
public void setCodeFormat(java.lang.String codeFormat)
Setter function for codeFormat- Parameters:
codeFormat
- The code format of smart contract code.
-
-