Klaytn은 다양한 트랜잭션 타입을 지원하며 각 트랜잭션은 서로 다른 필드를 가집니다. 따라서 사용자들은 트랜잭션 타입을 반드시 먼저 이해한 다음 트랜잭션 전송 및 서명 시 올바른 타입을 사용해야 합니다. 관련 API: klay_signTransaction, klay_sendTransaction, klay_signTransactionAsFeePayer, klay_sendTransactionAsFeePayer, personal_signTransaction, personal_sendTransaction.
TxTypeLegacyTransaction
TxTypeLegacyTransaction은 Klaytn에 있는 기존 트랜잭션 타입입니다. 이 트랜잭션 타입은 호환을 위해 존재합니다. 더 자세한 정보는 TxTypeLegacyTransaction을 참고하십시오.
(선택사항이며, 기본 설정은 90000입니다.) 트랜잭션 실행을 위해 설정한 가스양의 정숫값입니다. 사용되지 않은 가스는 발신자에게 환불됩니다. 입력한 가스가 트랜잭션을 실행하기에 충분하지 않다면 트랜잭션은 거부됩니다.
gasPrice
QUANTITY
(선택사항이며, 기본 설정은 25000000000 Peb입니다.) 가스 가격의 정숫값입니다. 트랜잭션 수수료는 gas와 gasPrice를 곱한 값입니다.
value
QUANTITY
(optional) Integer of the value sent with this transaction.
data
DATA
배포할 컨트랙트를 컴파일하면 얻는 바이트코드, 또는 컨트랙트를 호출할 때 필요한 함수 지시자(function indicator)와 파라미터 값(parameter values)들입니다.
nonce
QUANTITY
(선택사항) 논스의 정숫값입니다.
typeInt
정수
TxTypeValueTransfer를 가리키는 정수값 8입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
트랜잭션을 수신할 주소입니다.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
트랜잭션을 통해 전송하고자 하는 송금액의 정숫값입니다.
typeInt
Integer
TxTypeFeeDelegatedValueTransfer를 가리키는 정수값 9입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
feePayer
20-byte DATA
트랜잭션 수수료 납부자의 주소입니다.
signatures
DATA
(선택 사항 - 오직 klay_sendTransactionAsFeePayer API에만 적용됨) 서명 객체들이 담긴 배열입니다. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedValueTransferWithRatio를 가리키는 정수값 10입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(선택사항이며, 기본 설정은 25000000000 Peb입니다.) 지불된 가스당 가스 가격의 정숫값입니다.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
feePayer
20-byte DATA
트랜잭션 수수료 납부자의 주소.
feeRatio
QUANTITY
트랜잭션 수수료 납부자의 부담 비율입니다. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. 수수료 비율의 범위는 1 ~ 99이며, 이 범위를 벗어나면 트랜잭션이 수락되지 않습니다.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeValueTransferMemo를 가리키는 정수값 16입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
typeInt
Integer
TxTypeFeeDelegatedValueTransferMemo를 가리키는 정수값 17입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
feePayer
20-byte DATA
The fee payer address of the transaction.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedValueTransferMemoWithRatio를 가리키는 정수값 18입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
feePayer
20-byte DATA
The fee payer address of the transaction.
feeRatio
QUANTITY
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeAccountUpdate를 가리키는 정수값 32입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
key
DATA
from 계정의 RLP 인코딩된 새로운 계정 키입니다. 계정 키에 관한 자세한 정보는 Account Key에서 확인하세요.
typeInt
Integer
TxTypeFeeDelegatedAccountUpdate를 가리키는 정수값 33입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
key
DATA
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
feePayer
20-byte DATA
The fee payer address of the transaction.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedAccountUpdateWithRatio를 가리키는 정수값 34입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
key
DATA
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
feePayer
20-byte DATA
The fee payer address of the transaction.
feeRatio
QUANTITY
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeSmartContractDeploy를 가리키는 정수값 40입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
humanReadable
Boolean
Human-Readable Address이면 true를 반환하고, 그렇지 않으면 false를 반환합니다. 현재, 이 값은 반드시 false이어야 합니다. Human-readable한 주소는 추후 지원될 예정입니다.
codeFormat
QUANTITY
스마트 컨트랙트 코드의 코드 형식입니다. 0값은 EVM을 가리킵니다.
typeInt
Integer
TxTypeFeeDelegatedSmartContractDeploy를 가리키는 정수값 41입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
humanReadable
Boolean
true if the address is humanReadable, false if the address is not humanReadable. Currently, the value should be false. Human-readable addresses will be supported later.
codeFormat
QUANTITY
The code format of smart contract code. The value 0 indicates EVM.
feePayer
20-byte DATA
The fee payer address of the transaction.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedSmartContractDeployWithRatio를 가리키는 정수값 42입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
humanReadable
Boolean
true if the address is humanReadable, false if the address is not humanReadable. Currently, the value should be false. Human-readable addresses will be supported later.
codeFormat
QUANTITY
The code format of smart contract code. The value 0 indicates EVM.
feePayer
20-byte DATA
The fee payer address of the transaction.
feeRatio
QUANTITY
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeSmartContractExecution을 가리키는 정수값 48입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
typeInt
Integer
TxTypeFeeDelegatedSmartContractExecution를 가리키는 정수값 49입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
feePayer
20-byte DATA
The fee payer address of the transaction.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedSmartContractExecutionWithRatio를 가리키는 정수값 50입니다.
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
The address to which the transaction is directed.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
value
QUANTITY
Integer of the value sent with this transaction.
input
DATA
The data sent along with the transaction.
feePayer
20-byte DATA
The fee payer address of the transaction.
feeRatio
QUANTITY
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeCancel을 가리키는 정수값 56입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
typeInt
Integer
TxTypeFeeDelegatedCancel를 가리키는 정수값 57입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
feePayer
20-byte DATA
The fee payer address of the transaction.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
typeInt
Integer
TxTypeFeeDelegatedCancelWithRatio를 가리키는 정수값 58입니다.
from
20-byte DATA
The address from which the transaction is sent.
gas
QUANTITY
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
gasPrice
QUANTITY
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
nonce
QUANTITY
(optional) Integer of a nonce.
feePayer
20-byte DATA
The fee payer address of the transaction.
feeRatio
QUANTITY
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
DATA
(optional - only for klay_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.