수수료 부분 위임 트랜잭션

TxTypeFeeDelegatedValueTransferWithRatio

TxTypeFeeDelegatedValueTransferWithRatio는 사용자가 KLAY를 보내려고 할 때 사용됩니다. Klaytn은 각 목적에 맞는 여러가지 트랜잭션 유형들을 제공하는데, TxTypeFeeDelegatedValueTransferWithRatio는 KLAY를 EOA에 전송할 때 사용하는 기능입니다. 따라서 TxTypeFeeDelegatedValueTransferWithRatio는 to가 EOA일때만 작동합니다. KLAY를 스마트 컨트랙트로 전송하려면 TxTypeFeeDelegatedSmartContractExecutionWithRatio를 대신 사용하여야 합니다. The following changes will be made by this transaction type.

  1. 수수료 납부자의 잔고는 주어진 트랜잭션 수수료 비율(fee ratio)에 따라 감소합니다.

  2. 발신자의 잔고는 남은 트랜잭션 수수료만큼 줄어듭니다. 예를 들어 만약 feeRatio가 30이라면 30%의 트랜잭션 수수료가 수수료 납부자에 의해서 지불되고, 남은 70%는 발신자에 의해서 지불됩니다.

  3. The sender's nonce increases by one.

  4. value KLAY is transferred from the sender to the recipient.

Attributes

Attribute
Type
Description

type

uint8 (Go)

TxTypeFeeDelegatedValueTransferWithRatio의 유형입니다. 이는 0x0a이어야 합니다.

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. 유효한 범위는 1에서 99 사이입니다. 영(0)은 허용되지 않습니다. 100 이상 또한 허용되지 않습니다.

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.

TxTypeFeeDelegatedValueTransferMemoWithRatio

TxTypeFeeDelegatedValueTransferMemoWithRatio는 사용자가 특정 메시지와 함께 KLAY를 보내려고 할 때 사용됩니다. 따라서 TxTypeFeeDelegatedValueTransferMemoWithRatio는 to가 EOA일때만 작동합니다. To transfer KLAY to a smart contract account, use TxTypeFeeDelegatedSmartContractExecutionWithRatio instead. The following changes will be made by this transaction type.

  1. 트랜잭션 수수료 납부자의 잔액은 트랜잭션 수수료의 수수료 부담 비율만큼 감소합니다.

  2. The sender's balance decreases by the remaining transaction fee. 예를 들어 만약 feeRatio가 30이라면 30%의 트랜잭션 수수료가 수수료 납부자에 의해서 지불되고, 남은 70%는 발신자에 의해서 지불됩니다.

  3. The sender's nonce increases by one.

  4. value KLAY is transferred from the sender to the recipient.

Attributes

Attribute
Description
Type

type

uint8 (Go)

TxTypeFeeDelegatedValueTransferMemoWithRatio의 유형입니다. 이는 0x12이어야 합니다

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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.

TxTypeFeeDelegatedSmartContractDeployWithRatio

TxTypeFeeDelegatedSmartContractDeployWithRatio는 스마트 컨트랙트를 배포합니다. 주어진 부담 비율의 트랜잭션 수수료는 트랜잭션 수수료 납부자가 지불합니다. The following changes will be made by this transaction type.

  1. The fee payer's balance decreases by the fee ratio of the amount of the transaction fee.

  2. The sender's balance decreases by the remaining transaction fee. e.g., If the feeRatio is 30, 30% of the fee will be paid by the fee payer, and the remaining 70% of the fee will be paid by the sender.

  3. The sender's nonce increases by one.

  4. A smart contract is deployed with the code in input. The deployed address will be returned via contractAddress in the receipt.

  5. value KLAY is transferred from the sender to the recipient.

Attributes

Attribute
Type
Description

type

uint8 (Go)

TxTypeFeeDelegatedSmartContractDeployWithRatio의 유형입니다. 이는 0x2a이어야 합니다.

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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.

TxTypeFeeDelegatedSmartContractExecutionWithRatio

TxTypeFeeDelegatedSmartContractExecution executes a smart contract with the given data in input. TxTypeFeeDelegatedSmartContractExecutionWithRatio는 to가 스마트 컨트랙트 계정일 때만 실행됩니다. KLAY를 외부 소유 계정으로 전송하려면 TxTypeFeeDelegatedValueTransferWithRatio를 대신 사용하십시오. The following changes will be made by this transaction type.

  1. If to is a smart contract account, the code is executed based on input. Otherwise, this transaction will be rejected.

  2. The fee payer's balance decreases by the fee ratio of the amount of the transaction fee.

  3. The sender's balance decreases by the remaining transaction fee. e.g., If the feeRatio is 30, 30% of the fee will be paid by the fee payer, and the remaining 70% of the fee will be paid by the sender.

  4. The sender's nonce increases by one.

  5. If value was provided, value KLAY is transferred from the sender to the to smart contract. The contract should have a payable fallback function to receive KLAY.

Attributes

Attribute
Type
Description

type

uint8 (Go)

TxTypeFeeDelegatedSmartContractExecutionWithRatio의 유형입니다. 이는 0x32이어야 합니다.

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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.

TxTypeFeeDelegatedAccountUpdateWithRatio

TxTypeFeeDelegatedAccountUpdateWithRatio는 해당 계정의 키를 업데이트합니다. The given ratio of the transaction fee is paid by the fee payer. The following changes will take place by this transaction type.

  1. The fee payer's balance decreases by the fee ratio of the amount of the transaction fee.

  2. The sender's balance decreases by the remaining transaction fee. e.g., If the feeRatio is 30, 30% of the fee will be paid by the fee payer, and the remaining 70% of the fee will be paid by the sender.

  3. The sender's nonce increases by one.

  4. The account's key is updated with key.

  5. 이 트랜잭션이 실행되고 나면 추후에 계정에서 보내진 트랜잭션은 이 key에 의해 검증됩니다.

Attributes

Attribute
Type
Description

type

uint8 (Go)

TxTypeFeeDelegatedCancelWithRatio의 유형입니다. 이는 0x22이어야 합니다.

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.

key

AccountKey (Go)

AccountKey to be updated to the account.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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.

TxTypeFeeDelegatedCancelWithRatio

TxTypeFeeDelegatedCancelWithRatio는 트랜잭션 풀에서 같은 논스를 가진 트랜잭션을 취소합니다. For more details, see TxTypeCancel.

The following changes will apply by this transaction type. 1. 트랜잭션 수수료 납부자의 잔액은 트랜잭션 수수료의 주어진 수수료 부담 비율만큼 감소합니다. 2. The sender's balance decreases by the remaining transaction fee. 3. The sender's nonce increases by one.

Attributes

Attribute
Description
Type

type

uint8 (Go)

TxTypeFeeDelegatedCancelWithRatio의 유형입니다. 이는 0x3a이어야 합니다.

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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.

TxTypeFeeDelegatedChainDataAnchoringWithRatio

TxTypeFeeDelegatedChainDataAnchoringWithRatio는 수수료 부담 비율이 정해진 수수료 위임 트랜잭션이며 서비스체인 데이터를 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

Attribute
Type
Description

type

uint8 (Go)

TxTypeFeeDelegatedChainDataAnchoringWithRatio의 타입입니다. 이는 0x4a이어야 합니다.

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.

feeRatio

uint8 (Go)

Fee ratio of the fee payer. The valid range is between 1 and 99. Zero(0) is not allowed. 100 and above are not allowed as well.

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?