수수료 위임 트랜잭션
TxTypeFeeDelegatedValueTransfer
TxTypeFeeDelegatedValueTransfer는 사용자가 KLAY를 보내려고 할 때 사용됩니다. Klaytn은 각 목적에 맞는 여러가지 트랜잭션 유형들을 제공하는데, TxTypeFeeDelegatedValueTransfer는 KLAY를 EOA에 전송할 때 사용하는 기능입니다. 따라서 TxTypeFeeDelegatedValueTransfer는 to가 EOA일때만 작동합니다. KLAY를 스마트 컨트랙트로 전송하려면 TxTypeFeeDelegatedSmartContractExecution를 대신 사용하여야 합니다. The following changes will be made by this transaction type.
트랜잭션 수수료 납부자의 잔고는 트랜잭션 수수료만큼 감소합니다.
The sender's nonce increases by one.
valueKLAY is transferred from the sender to the recipient.
Attributes
type
uint8 (Go)
TxTypeFeeDelegatedValueTransfer의 유형입니다. 이는 0x09이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of gas the transaction is allowed to use.
to
common.Address (Go)
The account address that will receive the transferred value.
value
*big.Int (Go)
The amount of KLAY in peb to be transferred.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
트랜잭션 수수료 납부자의 주소입니다.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
트랜잭션 수수료 납부자의 서명입니다.
발신자의 서명을 위한 RLP 인코딩
발신자의 서명을 만들려면 다음과 같이 RLP 직렬화를 수행해야 합니다.
수수료 납부자의 서명을 위한 RLP 인코딩
수수료 납부자의 서명을 만들려면 RLP 직렬화를 다음과 같이 수행해야 합니다.
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedValueTransferMemo
TxTypeFeeDelegatedValueTransferMemo는 사용자가 특정 메시지와 함께 KLAY를 보내려고 할 때 사용됩니다. 따라서 TxTypeFeeDelegatedValueTransferMemo는 to가 EOA일때만 작동합니다. To transfer KLAY to a smart contract account, use TxTypeFeeDelegatedSmartContractExecution instead. The following changes will be made by this transaction type.
The fee payer's balance decreases by the amount of the transaction fee.
The sender's nonce increases by one.
valueKLAY is transferred from the sender to the recipient.
Attributes
type
uint8 (Go)
TxTypeFeeDelegatedValueTransferMemo의 유형입니다. 이는 0x11이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of gas the transaction is allowed to use.
to
common.Address (Go)
The account address that will receive the transferred value.
value
*big.Int (Go)
The amount of KLAY in peb to be transferred.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
input
[]byte (Go)
Data attached to the transaction. The message should be passed to this attribute.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedSmartContractDeploy
TxTypeFeeDelegatedSmartContractDeploy는 트랜잭션 수수료를 위임하는 스마트 컨트랙트를 배포합니다. The following changes will be made by this transaction type.
The fee payer's balance decreases by the amount of the transaction fee.
The sender's nonce increases by one.
A smart contract is deployed with the code in
input. The deployed address will be returned viacontractAddressin the receipt.valueKLAY is transferred from the sender to the recipient.
Attributes
type
uint8 (Go)
TxTypeFeeDelegatedSmartContractDeploy의 유형입니다. 이는 0x29이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of gas the transaction is allowed to use.
to
*common.Address (Go)
The account address that will receive the transferred value. Currently, this value must be nil. Specifying the address will be supported in the future.
value
*big.Int (Go)
The amount of KLAY in peb to be transferred.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
input
[]byte (Go)
Data attached to the transaction, used for transaction execution.
humanReadable
bool (Go)
This must be false since human-readable address is not supported yet. If true, the transaction will be rejected.
codeFormat
uint8 (Go)
The code format of smart contract code. The supported value for now is EVM(0x00) only.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedSmartContractExecution
TxTypeFeeDelegatedSmartContractExecution는 스마트 컨트랙트를 실행하고, input에 입력된 데이터를 이용합니다. 트랜잭션 수수료는 지정된 수수료 납부자가 지불합니다. TxTypeFeeDelegatedSmartContractExecution는 to가 스마트 컨트랙트 계정일 때만 실행됩니다. KLAY를 외부 소유 계정으로 전송하려면 TxTypeFeeDelegatedValueTransfer를 대신 사용하십시오. The following changes will be made by this transaction type.
If
tois a smart contract account, the code is executed based oninput. Otherwise, this transaction will be rejected.The fee payer's balance decreases by the amount of the transaction fee.
The sender's nonce increases by one.
If
valuewas provided,valueKLAY is transferred from the sender to thetosmart contract. The contract should have a payable fallback function to receive KLAY.
Attributes
type
uint8 (Go)
TxTypeFeeDelegatedSmartContractExecution의 유형입니다. 이는 0x31이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of gas the transaction is allowed to use.
to
common.Address (Go)
The address of the smart contract account to be executed.
value
*big.Int (Go)
The amount of KLAY in peb to be transferred.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
input
[]byte (Go)
Data attached to the transaction, used for transaction execution.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedAccountUpdate
TxTypeFeeDelegatedAccountUpdate는 해당 계정의 키를 업데이트합니다. 트랜잭션 수수료는 트랜잭션 수수료 납부자가 지불합니다. 이 트랜잭션 유형은 다음과 같은 변경 사항을 만듭니다.
The fee payer's balance decreases by the amount of the transaction fee.
The sender's nonce increases by one.
The account's key is updated with
key.Once this type of transaction is executed, transactions sent from the account afterward will be validated with the new
key.The transaction fee is paid by the fee payer.
Attributes
type
uint8 (Go)
The type of TxTypeAccountUpdate. 이는 0x21이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A multiplier to get how much the sender will pay in tokens. The amount of tokens the sender will pay is calculated via gas * gasPrice. For example, the sender will pay 10 KLAY for a transaction fee if gas is 10 and gasPrice is 10^18. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of transaction fee the transaction is allowed to use.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedCancel
TxTypeFeeDelegatedCancel는 트랜잭션 풀에서 같은 논스를 가진 트랜잭션을 취소합니다. 자세한 내용은 TxTypeCancel를 참조하세요.
The following changes will apply by this transaction type. 1. The fee payer's balance decreases by the amount of the transaction fee. 2. The sender's nonce increases by one.
Attributes
type
uint8 (Go)
The type of TxTypeCancel. 이는 0x39이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of transaction fee the transaction is allowed to use.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
TxTypeFeeDelegatedChainDataAnchoring
TxTypeFeeDelegatedChainDataAnchoring는 서비스체인 데이터를 Klaytn 메인체인에 앵커링하는 수수료 위임 트랜잭션입니다. Service chains periodically send this type of transaction to the Klaytn mainchain to ensure its security and credibility of data. For more details about the data anchoring, see Anchoring. 이 트랜잭션은 수수료 위임 트랜잭션이므로 트랜잭션 수수료가 트랜잭션 수수료 납부자에게 부과됩니다. Be mindful that it is not allowed to send this transaction via RPC. Currently, this transaction is executed through private p2p channels for security reasons. This transaction does not change the state of the Klaytn blockchain except the sender's nonce being increased by one.
Attributes
type
uint8 (Go)
TxTypeFeeDelegatedChainDataAnchoring의 타입입니다. 이는 0x49이어야 합니다.
nonce
uint64 (Go)
A value used to uniquely identify a sender’s transaction. If two transactions with the same nonce are generated by a sender, only one is executed.
gasPrice
*big.Int (Go)
A unit price of gas in peb the sender will pay for a transaction fee. The amount of transaction fee is calculated as gas * gasPrice. For example, if the transaction consumes 10 units of gas and gasPrice is 10^18, the transaction fee will be 10 KLAY. See Unit of KLAY.
gas
uint64 (Go)
The maximum amount of transaction fee the transaction is allowed to use.
from
common.Address (Go)
The address of the sender. For more details, see Signature Validation of Transactions.
input
[]byte (Go)
Data of the service chain.
txSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The sender's signatures. For more details, see Signature Validation of Transactions.
feePayer
common.Address (Go)
The address of the fee payer.
feePayerSignatures
[]{*big.Int, *big.Int, *big.Int} (Go)
The fee payer's signatures.
RLP Encoding for Signature of the Sender
To make a signature of the sender, RLP serialization should be done like the following:
RLP Encoding for Signature of the Fee Payer
To make a signature of the fee payer, RLP serialization should be done like the following:
RLP Encoding for SenderTxHash
To make a SenderTxHash, RLP serialization should be done like the following:
RLP Encoding for Transaction Hash
To make a transaction hash, RLP serialization should be done like the following:
RLP Encoding (Example)
The following shows the result of RLP serialization and the transaction object:
RPC Output (Example)
The following shows a transaction object returned via JSON RPC.
Last updated
Was this helpful?