Class FeeDelegatedValueTransfer


  • public class FeeDelegatedValueTransfer
    extends AbstractFeeDelegatedTransaction
    Represents a fee delegated value transfer transaction. Please refer to https://docs.klaytn.com/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfer to see more detail.
    • Constructor Detail

      • FeeDelegatedValueTransfer

        public FeeDelegatedValueTransfer​(FeeDelegatedValueTransfer.Builder builder)
        Creates a FeeDelegatedValueTransfer instance.
        Parameters:
        builder - FeeDelegatedValueTransfer.Builder instance.
      • FeeDelegatedValueTransfer

        public FeeDelegatedValueTransfer​(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 to,
                                         java.lang.String value)
        Creates a FeeDelegatedValueTransfer instance.
        Parameters:
        klaytnCall - Klay RPC instance
        from - 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 ID
        signatures - A sender signature list.
        feePayer - A fee payer address
        feePayerSignatures - A fee payer signature list
        to - The account address that will receive the transferred value.
        value - The amount of KLAY in peb to be transferred.
    • Method Detail

      • create

        public static FeeDelegatedValueTransfer 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 to,
                                                       java.lang.String value)
        Creates a FeeDelegatedValueTransfer instance.
        Parameters:
        klaytnCall - Klay RPC instance
        from - 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 ID
        signatures - A sender signature list.
        feePayer - A fee payer address
        feePayerSignatures - A fee payer signature list
        to - The account address that will receive the transferred value.
        value - The amount of KLAY in peb to be transferred.
        Returns:
        FeeDelegatedValueTransfer
      • getGasPrice

        public java.lang.String getGasPrice()
        Getter function for gas price
        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 FeeDelegatedValueTransfer decode​(java.lang.String rlpEncoded)
        Decodes a RLP-encoded FeeDelegatedValueTransfer string.
        Parameters:
        rlpEncoded - RLP-encoded FeeDelegatedValueTransfer string
        Returns:
        FeeDelegatedValueTransfer
      • decode

        public static FeeDelegatedValueTransfer decode​(byte[] rlpEncoded)
        Decodes a RLP-encoded FeeDelegatedValueTransfer byte array.
        Parameters:
        rlpEncoded - RLP-encoded FeeDelegatedValueTransfer byte array.
        Returns:
        FeeDelegatedValueTransfer
      • getRLPEncoding

        public java.lang.String getRLPEncoding()
        Returns the RLP-encoded string of this transaction (i.e., rawTransaction).
        Specified by:
        getRLPEncoding in class AbstractTransaction
        Returns:
        String
      • getCommonRLPEncodingForSignature

        public java.lang.String getCommonRLPEncodingForSignature()
        Returns the RLP-encoded string to make the signature of this transaction.
        Specified by:
        getCommonRLPEncodingForSignature in class AbstractTransaction
        Returns:
        String
      • getSenderTxHash

        public java.lang.String getSenderTxHash()
        Returns a senderTxHash of transaction
        Overrides:
        getSenderTxHash in class AbstractTransaction
        Returns:
        String
      • 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 class AbstractTransaction
        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 class AbstractTransaction
        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 class AbstractTransaction
      • 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.
      • getTo

        public java.lang.String getTo()
        Getter function for to
        Returns:
        The account address that will receive the transferred value.
      • getValue

        public java.lang.String getValue()
        Getter function for value
        Returns:
        The amount of KLAY in peb to be transferred.