Klaytn Docs
Search…
⌃K

Working with Klaytn Transaction Types

Klaytn has various types of transaction and each type of transaction consists of different fields. Therefore, users should understand the transaction types and specify the correct one when sending and signing a transaction. Related APIs: klay_signTransaction, klay_sendTransaction, klay_signTransactionAsFeePayer, klay_sendTransactionAsFeePayer, personal_signTransaction, personal_sendTransaction.

TxTypeLegacyTransaction

TxTypeLegacyTransaction represents a type of transaction existed previously in Klaytn. This transaction type exists to support compatibility. For more information, see TxTypeLegacyTransaction.
Parameters
Name
Type
Description
from
20-byte DATA
The address from which the transaction is sent.
to
20-byte DATA
(optional when creating a new contract) 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.
value
QUANTITY
(optional) Integer of the value sent with this transaction.
data
DATA
The compiled byte code of a contract to deploy or data (function indicator and parameter values) required to call a contract.
nonce
QUANTITY
(optional) Integer of a nonce.
Example
// Request
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"klay_signTransaction", "params":[{"from":"0x77982323172e5b6182539d3522d5a33a944206d4", "to":"0xcd6bfdb523a4d030890d28bf1eb6ef36307c9aaa", "value":"0x10000", "gas":"0x1000000", "nonce":"0x2", "gasprice":"0x25000000000"}],"id":73}' https://api.baobab.klaytn.net:8651
// Result
{
"jsonrpc":"2.0",
"id":73,
"result":{
"raw":"0xf86c0286025000000000840100000094cd6bfdb523a4d030890d28bf1eb6ef36307c9aaa8301000080820fe8a056d2ddd231c3c111687ab351d339240db18cd721e5aa33c601dd4fc3927fb4d1a03443443392517aa7da082aa0a00b9ee5e3e1ee007d22e57cd9ff55b5ddbf4a64",
"tx":{
"nonce":"0x2",
"gasPrice":"0x5d21dba00",
"gas":"0x1000000",
"to":"0xcd6bfdb523a4d030890d28bf1eb6ef36307c9aaa",
"value":"0x10000",
"input":"0x",
"v":"0xfe8",
"r":"0x56d2ddd231c3c111687ab351d339240db18cd721e5aa33c601dd4fc3927fb4d1",
"s":"0x3443443392517aa7da082aa0a00b9ee5e3e1ee007d22e57cd9ff55b5ddbf4a64",
"hash":"0xb53cc9128a19c3916c0de1914725b7337bba84666c2556d8682c72ca34c6874c"
}
}
}

TxTypeValueTransfer

TxTypeValueTransfer is used when a user wants to send KLAY. For more information, see TxTypeValueTransfer.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating TxTypeValueTransfer: 8
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.
Example
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 8, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4"}], "id": 69}' http://127.0.0.1:8551
// Result
{
"id": 69,
"jsonrpc": "2.0",
"result": {
"raw": "0x08f87f0b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9df847f845824e44a05ce70c3caa0bd5ab73ef1fc11d3a8d866370b36abb153a1cd9203cd15e1f77fea01e4533af9cd3f6f6a107d76f9599f0811f5bc3c89c10e545420caa5bf99ae974",
"tx": {
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0x990dab1df932e32fcf3c03578356eacd52eb5b0e8d384ed029d1d6fa53285599",
"nonce": "0xb",
"signatures": [
{
"R": "0x5ce70c3caa0bd5ab73ef1fc11d3a8d866370b36abb153a1cd9203cd15e1f77fe",
"S": "0x1e4533af9cd3f6f6a107d76f9599f0811f5bc3c89c10e545420caa5bf99ae974",
"V": "0x4e44"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeValueTransfer",
"typeInt": 8,
"value": "0xf4"
}
}
}

TxTypeFeeDelegatedValueTransfer

Fee delegating version of TxTypeValueTransfer. For more information, see TxTypeFeeDelegatedValueTransfer.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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
The address which pays the transaction fee.
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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 9, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d"}], "id": 59}' http://127.0.0.1:8551
// Result
{
"id": 59,
"jsonrpc": "2.0",
"result": {
"raw": "0x09f8950b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9df847f845824e44a0621661c647dd66e9abd8e5188dd9b60bac91bd0e6df4788d4ff34718d004f790a06349719dc6072fec3bf6baae76c4f129cfdf7cefb8a5607ab693928559c1e5bb94cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0xed0646d9933e1611ebb7018056fd7ff74c076f7f53bfe1a817d3c677a8978e27",
"nonce": "0xb",
"signatures": [
{
"R": "0x621661c647dd66e9abd8e5188dd9b60bac91bd0e6df4788d4ff34718d004f790",
"S": "0x6349719dc6072fec3bf6baae76c4f129cfdf7cefb8a5607ab693928559c1e5bb",
"V": "0x4e44"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeFeeDelegatedValueTransfer",
"typeInt": 9,
"value": "0xf4"
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 9, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "nonce": "0x1c", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x2e6300", "gasPrice": "0x5d21dba00", "value": "0xf4", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "signatures": [{"V": "0x4e43", "R": "0x416a7d1833322359ae7b0f9aad10185f94739a81997af0abd1330ee866564957", "S": "0x1f6bd04c4ebcccced7d2f6b57be088c69070b94ad62898427e906f35b2b48b35"}]}], "id": 69}' http://127.0.0.1:8551
// Result
{
"id": 69,
"jsonrpc": "2.0",
"result": "0xd2bab65e2563fd77d8ee50ac70f6d4aff64456e36d410370a920fa54f1094043"
}

TxTypeFeeDelegatedValueTransferWithRatio

Partial fee delegating version of TxTypeValueTransfer. For more information, see TxTypeFeeDelegatedValueTransferWithRatio.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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
(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.
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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 10, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30}], "id": 42}' http://127.0.0.1:8551
// Result
{
"id": 42,
"jsonrpc": "2.0",
"result": {
"raw": "0x0af8960b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9d1ef847f845824e44a0dd413e74782985ca1de84c5cfe76d25ada70d4498e12fb1f52fc543884a4c0c9a029421d970b89bd271f5ecdbb91c9dcac70f556e38dd7516d2d711276ea0d63bc94cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"feeRatio": "0x1e",
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0xd5728b5f292944492a452129080dbd431ac5c93cf0a8787f8fbad5852c060ae2",
"nonce": "0xb",
"signatures": [
{
"R": "0xdd413e74782985ca1de84c5cfe76d25ada70d4498e12fb1f52fc543884a4c0c9",
"S": "0x29421d970b89bd271f5ecdbb91c9dcac70f556e38dd7516d2d711276ea0d63bc",
"V": "0x4e44"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeFeeDelegatedValueTransferWithRatio",
"typeInt": 10,
"value": "0xf4"
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 10, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "nonce": "0x1d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x2e6300", "gasPrice": "0x5d21dba00", "value": "0xf4", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30, "signatures": [{"V": "0x4e44", "R": "0x76377a0c1a050475fd06dfb192ef1724394a5f77ec6441764f7732d6ab0cbc4d", "S": "0xfb518b09210692bd530586cd484a9f6f653f9bb170e5da8b99d417e58692845"}]}], "id": 47}' http://127.0.0.1:8551
// Result
{
"id": 47,
"jsonrpc": "2.0",
"result": "0xdf882a5ca0874b0e80e033957b53ee4be93918a3929f7c7c3e72bd100f8af646"
}

TxTypeValueTransferMemo

TxTypeValueTransferMemo is used when a user wants to send KLAY with a specific message. For more information, see TxTypeValueTransferMemo.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 16, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4", "input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001"}], "id": 39}' http://127.0.0.1:8551
// Result
{
"id": 39,
"jsonrpc": "2.0",
"result": {
"raw": "0x10f8a40b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9da4b3f98adc0000000000000000000000000000000000000000000000000000000000000001f847f845824e44a0be0f4469cb23dbf057590a4d479b1a921e48bcb6ea95c0d94daa1a992124194ba008c27a2c04b02bea0a1d4bc58530d15d8fb89cbc36fc2f113503942b5607befa",
"tx": {
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0x3d174e8df748329a8eb0d591a514a6933c9407affc082a13ac05ed88e8dc90fd",
"input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0xb",
"signatures": [
{
"R": "0xbe0f4469cb23dbf057590a4d479b1a921e48bcb6ea95c0d94daa1a992124194b",
"S": "0x8c27a2c04b02bea0a1d4bc58530d15d8fb89cbc36fc2f113503942b5607befa",
"V": "0x4e44"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeValueTransferMemo",
"typeInt": 16,
"value": "0xf4"
}
}
}

TxTypeFeeDelegatedValueTransferMemo

Fee delegating version of TxTypeValueTransferMemo. For more information, see TxTypeFeeDelegatedValueTransferMemo.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 17, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4", "input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d"}], "id": 80}' http://127.0.0.1:8551
// Result
{
"id": 80,
"jsonrpc": "2.0",
"result": {
"raw": "0x11f8ba0b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9da4b3f98adc0000000000000000000000000000000000000000000000000000000000000001f847f845824e43a0e8daa1ec0c5fd4201cb914382104185ce2b6eab31b488616f245a1da58c6c950a028587ef4fa5c6dad2b4090a6d452692d1b8a3e90b2b6f7902a983c4a88521f6c94cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0x44050059cd96ca35461a895d2eda8fec83c725c782ca22a29be6babd0cca7348",
"input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0xb",
"signatures": [
{
"R": "0xe8daa1ec0c5fd4201cb914382104185ce2b6eab31b488616f245a1da58c6c950",
"S": "0x28587ef4fa5c6dad2b4090a6d452692d1b8a3e90b2b6f7902a983c4a88521f6c",
"V": "0x4e43"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeFeeDelegatedValueTransferMemo",
"typeInt": 17,
"value": "0xf4"
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 17, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "value": "0xf4", "input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "signatures": [{"V": "0x4e43", "R": "0xf343844adff1cde850c0215c78b7f9258ab158e125ee100888f454c91c51cf51", "S": "0x245f5e78ae1b52aafd18b86de6ca615af6676f3f3b70baba601748caaf1c813f"}], "nonce": "0x1e"}], "id": 81}' http://127.0.0.1:8551
// Result
{
"id": 81,
"jsonrpc": "2.0",
"result": "0x83b9a07b14c57d8cef09fee549f2e068aa1c39c3b51ca14c4b663aa5486a938f"
}

TxTypeFeeDelegatedValueTransferMemoWithRatio

Partial fee delegating version of TxTypeValueTransferMemo. For more information, see TxTypeFeeDelegatedValueTransferMemoWithRatio.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 18, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x76c0", "gasPrice": "0x5d21dba00", "value": "0xf4", "input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30}], "id": 38}' http://127.0.0.1:8551
// Result
{
"id": 38,
"jsonrpc": "2.0",
"result": {
"raw": "0x12f8bb0b8505d21dba008276c09444711e89b0c23845b5b2ed9d3716ba42b8a3e07581f494cd01b2b44584fb143824c1ea0231bebaea826b9da4b3f98adc00000000000000000000000000000000000000000000000000000000000000011ef847f845824e44a0c17297d552eb7e1643491076a6c3d8c5a78768d38ce32b532bff91bbffa0d7fea00f3acdb36835ff4167e995b448693cefc1c28d9f5d5b18a4e74b000ca597758594cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"feeRatio": "0x1e",
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x76c0",
"gasPrice": "0x5d21dba00",
"hash": "0xd5c1d7037b8e38781010e55ffb143caa84b5972f80c60bacd2ca324b898896cd",
"input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0xb",
"signatures": [
{
"R": "0xc17297d552eb7e1643491076a6c3d8c5a78768d38ce32b532bff91bbffa0d7fe",
"S": "0xf3acdb36835ff4167e995b448693cefc1c28d9f5d5b18a4e74b000ca5977585",
"V": "0x4e44"
}
],
"to": "0x44711e89b0c23845b5b2ed9d3716ba42b8a3e075",
"type": "TxTypeFeeDelegatedValueTransferMemoWithRatio",
"typeInt": 18,
"value": "0xf4"
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 18, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": "0x44711E89b0c23845b5B2ed9D3716BA42b8a3e075", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "value": "0xf4", "input": "0xb3f98adc0000000000000000000000000000000000000000000000000000000000000001", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30, "signatures": [{"V": "0x4e43", "R": "0x5fecba257917e6677c51d94f0d9670621650a511aae86bd1e50a01c771fb68a0", "S": "0x441a9632f499dbce3d4fc974db3b431cf8ff0a2f93a6490c018796278f6edb2b"}], "nonce": "0x1f"}], "id": 81}' http://127.0.0.1:8551
// Result
{
"id": 81,
"jsonrpc": "2.0",
"result": "0x34cd8c8aed102dad5201592eed848df66377fcbbe75befac4e8da8d43167e930"
}

TxTypeAccountUpdate

TxTypeAccountUpdate updates the key of the given account. For more information, see TxTypeAccountUpdate.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
Example
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 32, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "key": "0x01c0"}], "id": 68}' http://127.0.0.1:8551
// Result
{
"id": 68,
"jsonrpc": "2.0",
"result": {
"raw": "0x20f86c0b8505d21dba008304a38094cd01b2b44584fb143824c1ea0231bebaea826b9d8201c0f847f845824e43a0e297d840a0083b5a71e6c3c3c159699729da52e840f32dbd73074909d537924ca03408c830d52dfc60c3db82b048819a91b5537dbce8bc7ffb1e3a4bc70e0b61a2",
"tx": {
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x4a380",
"gasPrice": "0x5d21dba00",
"hash": "0x50f346ff1af194b160a2096a4f290e0a6c2b0d8d026c71babd7397a55541b1c2",
"key": "0x01c0",
"nonce": "0xb",
"signatures": [
{
"R": "0xe297d840a0083b5a71e6c3c3c159699729da52e840f32dbd73074909d537924c",
"S": "0x3408c830d52dfc60c3db82b048819a91b5537dbce8bc7ffb1e3a4bc70e0b61a2",
"V": "0x4e43"
}
],
"type": "TxTypeAccountUpdate",
"typeInt": 32
}
}
}

TxTypeFeeDelegatedAccountUpdate

Fee delegating version of TxTypeAccountUpdate. For more information, see TxTypeFeeDelegatedAccountUpdate.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 33, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "key": "0x01c0", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d"}], "id": 85}' http://127.0.0.1:8551
// Result
{
"id": 85,
"jsonrpc": "2.0",
"result": {
"raw": "0x21f8820b8505d21dba008304a38094cd01b2b44584fb143824c1ea0231bebaea826b9d8201c0f847f845824e43a04063c2566f292e294e9e7526e6709a7efda29c131ad2f8d99d500a5ed203f5f6a0682bf0b33bfdfccfa3a810b1190c9c0e04a347733f5207d670e53fb550f22d4894cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x4a380",
"gasPrice": "0x5d21dba00",
"hash": "0x0cda98d0d42afb2bfc95e256246cb86967ed815c34c8c6058172db46d28e5c70",
"key": "0x01c0",
"nonce": "0xb",
"signatures": [
{
"R": "0x4063c2566f292e294e9e7526e6709a7efda29c131ad2f8d99d500a5ed203f5f6",
"S": "0x682bf0b33bfdfccfa3a810b1190c9c0e04a347733f5207d670e53fb550f22d48",
"V": "0x4e43"
}
],
"type": "TxTypeFeeDelegatedAccountUpdate",
"typeInt": 33
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 33, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "key": "0x01c0", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "signatures": [{"V": "0x4e43", "R": "0x87da8ac5c398bcf379d3034d72d239c8de167cafe240da13019606aad628aa8b", "S": "0x3d11215843cbc25cdf3076e4ead6272e20d72b22e0b9d498bfcd1ceff497baf4"}], "nonce": "0x20"}], "id": 78}' http://127.0.0.1:8551
// Result
{
"id": 78,
"jsonrpc": "2.0",
"result": "0x63f91622a4225953cf100b334f14e85c761278a5e5401f35b6f8a8303968e0fe"
}

TxTypeFeeDelegatedAccountUpdateWithRatio

Partial fee delegating version of TxTypeAccountUpdate. For more information, see TxTypeFeeDelegatedAccountUpdateWithRatio.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 34, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "key": "0x01c0", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30}], "id": 78}' http://127.0.0.1:8551
// Result
{
"id": 78,
"jsonrpc": "2.0",
"result": {
"raw": "0x22f8830b8505d21dba008304a38094cd01b2b44584fb143824c1ea0231bebaea826b9d8201c01ef847f845824e43a07b86231816847655d02b68993189dcbaaae5d5168a8c1bf90ba735c1c26f4ef1a07c3e7750d0c9a3f03240ccc53125a94a7df8fce074f043d6556491869892ab9b94cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"feeRatio": "0x1e",
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x4a380",
"gasPrice": "0x5d21dba00",
"hash": "0x876819fa8192f83e72b463d15b0d09bd8db4f6d3d12235f1fc2786d074cbe05e",
"key": "0x01c0",
"nonce": "0xb",
"signatures": [
{
"R": "0x7b86231816847655d02b68993189dcbaaae5d5168a8c1bf90ba735c1c26f4ef1",
"S": "0x7c3e7750d0c9a3f03240ccc53125a94a7df8fce074f043d6556491869892ab9b",
"V": "0x4e43"
}
],
"type": "TxTypeFeeDelegatedAccountUpdateWithRatio",
"typeInt": 34
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 34, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "gas": "0x4a380", "gasPrice": "0x5d21dba00", "key": "0x01c0", "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "feeRatio": 30, "signatures": [{"V": "0x4e44", "R": "0xd285969e88c3cc92471bda4bbcdce2d23eaa9bdcc47a64421de4858b7a51fd04", "S": "0x5b8123f9666580c51fdbd5a8b1d67bf1ae774e5a8e3e1ebfbf4f2024e94e82cc"}], "nonce": "0x21"}], "id": 100}' http://127.0.0.1:8551
// Result
{
"id": 100,
"jsonrpc": "2.0",
"result": "0x549ee50b4f7ab804300028b3db9e9307217ffd5873ddf090413b15ffbf6c484f"
}

TxTypeSmartContractDeploy

TxTypeSmartContractDeploy deploys a smart contract to the given address. For more information, see TxTypeSmartContractDeploy.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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
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.
Example
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 40, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": null, "gas": "0x4a380", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e2200029", "humanReadable": false, "codeFormat": 0}], "id": 78}' http://127.0.0.1:8551
// Result
{
"id": 78,
"jsonrpc": "2.0",
"result": {
"raw": "0x28f9036b0b8505d21dba008304a380808094cd01b2b44584fb143824c1ea0231bebaea826b9db902fb608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e22000298080f847f845824e44a0552594bd948e5ac9afd4db267f5f39136343faea957f91b44bc90c26c29b42c2a05b16e9ba9105bc1af84552e3d299c4fe1e3d76a521c64616d1f2ae842ddf389b",
"tx": {
"codeFormat": "0x0",
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x4a380",
"gasPrice": "0x5d21dba00",
"hash": "0x75c5d9923189be1ac6d2eb4739bcb2f0aadd3b8324e49b6228fdbc0baa074bc5",
"humanReadable": false,
"input": "0x608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e2200029",
"nonce": "0xb",
"signatures": [
{
"R": "0x552594bd948e5ac9afd4db267f5f39136343faea957f91b44bc90c26c29b42c2",
"S": "0x5b16e9ba9105bc1af84552e3d299c4fe1e3d76a521c64616d1f2ae842ddf389b",
"V": "0x4e44"
}
],
"to": null,
"type": "TxTypeSmartContractDeploy",
"typeInt": 40,
"value": "0x0"
}
}
}

TxTypeFeeDelegatedSmartContractDeploy

Fee delegating version of TxTypeSmartContractDeploy. For more information, see TxTypeFeeDelegatedSmartContractDeploy.
Parameters
Name
Type
Description
typeInt
Integer
The integer indicating 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.
Example 1 (klay_signTransaction)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_signTransaction", "params": [{"typeInt": 41, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": null, "gas": "0x4a380", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e2200029", "humanReadable": false, "codeFormat": 0, "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d"}], "id": 30}' http://127.0.0.1:8551
// Result
{
"id": 30,
"jsonrpc": "2.0",
"result": {
"raw": "0x29f903810b8505d21dba008304a380808094cd01b2b44584fb143824c1ea0231bebaea826b9db902fb608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e22000298080f847f845824e43a081d4349641adefcbcf5176b8ebeadc87210181630764bbe953c21a8af12174aca040816a4b6350101e9c7717e2711b8e52a0b0f900be23c6fdae73ede97979156894cd01b2b44584fb143824c1ea0231bebaea826b9dc0",
"tx": {
"codeFormat": "0x0",
"feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"feePayerSignatures": [],
"from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d",
"gas": "0x4a380",
"gasPrice": "0x5d21dba00",
"hash": "0x6698cb063e03f86f1efc7037691f689f9c868324d3711be0254646a08b31ccd5",
"humanReadable": false,
"input": "0x608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e2200029",
"nonce": "0xb",
"signatures": [
{
"R": "0x81d4349641adefcbcf5176b8ebeadc87210181630764bbe953c21a8af12174ac",
"S": "0x40816a4b6350101e9c7717e2711b8e52a0b0f900be23c6fdae73ede979791568",
"V": "0x4e43"
}
],
"to": null,
"type": "TxTypeFeeDelegatedSmartContractDeploy",
"typeInt": 41,
"value": "0x0"
}
}
}
Example 2 (klay_sendTransactionAsFeePayer)
// Request
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "klay_sendTransactionAsFeePayer", "params": [{"typeInt": 41, "from": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "to": null, "gas": "0x4a380", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x608060405234801561001057600080fd5b506040516020806102fb8339810180604052602081101561003057600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160026000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508060ff166003816100fd919061010c565b50600f6000819055505061015f565b815481835581811115610133578183600052602060002091820191016101329190610138565b5b505050565b61015c91905b80821115610158576000808201600090555060010161013e565b5090565b90565b61018d8061016e6000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063b3f98adc14610040575b600080fd5b34801561004c57600080fd5b5061007c6004803603602081101561006357600080fd5b81019080803560ff16906020019092919050505061007e565b005b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16806100e657506003805490508260ff1610155b156100f1575061015e565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548160ff021916908360ff160217905550806000015460038360ff1681548110151561014257fe5b9060005260206000200160000160008282540192505081905550505b5056fea165627a7a72305820dad6d3e144a160eb6e34d8d99084ed29d207271e201aaac513007f652a26e2200029", "humanReadable": false, "codeFormat": 0, "feePayer": "0xcd01b2b44584fb143824c1ea0231bebaea826b9d", "signatures": [{"V": "0x4e44", "R": "0x25aaa9dcd863ec742299c7204d7720277ae39a277232a3b1ad61d4b665c89da9", "S": "0x4c00c144ac183f6b61224f4721e7e0d2c5f583e5793175cf35c04bdfb46e1b16"}], "nonce": "0x22"}], "id": 84}' http://127.0.0.1:8551
// Result
{
"id": 84,
"jsonrpc"