Basic
레거시 트랜잭션
LegacyTransaction
은 레거시 트랜잭션을 의미합니다. Klaytn 계정은 AccountKeyLegacy을 사용해야만 LegacyTransaction
을 실행할 수 있습니다. transactionObject
는 LegacyTransaction
을 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
LegacyTransaction
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 LegacyTransaction
를 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of LegacyTransaction
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.legacyTransaction.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.legacyTransaction({...})
, please change it to caver.transaction.legacyTransaction.create({...})
.
properties
Name | Type | Description |
---|---|---|
gas | string | 트랜잭션에서 사용하도록 허락된 최대 트랜잭션 수수료입니다. |
value | string | (선택 사항, default: |
from | string | (선택 사항) 발신자의 주소입니다. 미입력시 서명에 사용되는 키링 주소로 설정됩니다. |
to | string | (선택 사항, default: |
input | string | (선택 사항) 스마트 컨트랙트의 배포와 실행에 사용되는 트랜잭션에 첨부된 데이터입니다. |
signatures | Array | (선택 사항) 서명의 배열입니다. 기본 트랜잭션은 하나의 서명만 받을 수 있습니다. |
nonce | string | (선택 사항) 발신자의 트랜잭션을 고유하게 식별하기 위해 사용되는 값입니다. 미입력시 논스 설정을 위해 |
gasPrice | string | (선택 사항) 발신자가 지불할 토큰양을 구하기 위한 승수입니다. 미입력시 gasPrice 설정을 위해 |
chainId | string | (선택 사항) Klaytn 네트워크의 체인 ID입니다. 미입력시 chainId 설정을 위해 |
Example
ValueTransfer
ValueTransfer
는 KLAY 전송 트랜잭션을 나타냅니다. transactionObject
는 ValueTransfer
를 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
ValueTransfer
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 ValueTransfer
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of ValueTransfer
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.valueTransfer.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.valueTransfer({...})
, please change it to caver.transaction.valueTransfer.create({...})
.
properties
Name | Type | Description |
---|---|---|
value | string | peb로 나타낸 전송될 KLAY 양입니다. You can use |
from | string | 발신자의 주소입니다. |
to | string | 전송되는 KLAY를 받을 계정 주소입니다. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
signatures | Array | (optional) An array of signatures. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
ValueTransferMemo
ValueTransferMemo
는 KLAY 전송 메모 트랜잭션을 나타냅니다. transactionObject
는 ValueTransferMemo
를 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
ValueTransferMemo
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 ValueTransferMemo
트랜잭션을 생성할 때 transactionObject
에 선택적으로 제공될 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of ValueTransferMemo
from RLP-encoded strings. 아래 예시를 참고해주세요. NOTE: caver.transaction.valueTransferMemo.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.valueTransferMemo({...})
, please change it to caver.transaction.valueTransferMemo.create({...})
.
properties
Name | Type | Description |
---|---|---|
value | string | The amount of KLAY in peb to be transferred. You can use |
from | string | The address of the sender. |
to | string | The account address that will receive the transferred value. |
input | string | 트랜잭션에 첨부되는 데이터입니다. 메시지는 이 속성으로 전달되어야 합니다. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
signatures | Array | (optional) An array of signatures. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
AccountUpdate
AccountUpdate
는 계정 업데이트 트랜잭션을 나타냅니다. transactionObject
는 AccountUpdate
를 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
AccountUpdate
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 AccountUpdate
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of AccountUpdate
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.accountUpdate.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.accountUpdate({...})
, please change it to caver.transaction.accountUpdate.create({...})
.
properties
Name | Type | Description |
---|---|---|
from | string | The address of the sender. |
account | 계정 업데이트를 위해 필요한 정보를 포함하고 있는 계정 인스턴스입니다. | |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
signatures | Array | (optional) An array of signatures. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
각 AccountKey
에 대해 계정 인스턴스를 생성하는 방법은 Getting Started - Account Update 또는 caver.account.create를 참고하세요.
Example
SmartContractDeploy
SmartContractDeploy
는 스마트 컨트랙트 배포 트랜잭션을 나타냅니다. transactionObject
는 SmartContractDeploy
를 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
SmartContractDeploy
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 SmartContractDeploy
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of SmartContractDeploy
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.smartContractDeploy.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.smartContractDeploy({...})
, please change it to caver.transaction.smartContractDeploy.create({...})
.
properties
Name | Type | Description |
---|---|---|
from | string | The address of the sender. |
input | string | Data attached to the transaction. 배포될 스마트 컨트랙트의 바이트 코드와 그 아규먼트들입니다. caver.abi.encodeContractDeploy를 통해 얻을 수 있습니다. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
value | string | (선택 사항, default: |
to | string | (선택 사항, default: |
humanReadable | boolean | (선택 사항, default: |
codeFormat | string | (선택 사항, default: |
signatures | Array | (optional) An array of signatures. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
SmartContractExecution
SmartContractExecution
는 스마트 컨트랙트 실행 트랜잭션을 나타냅니다. transactionObject
는 SmartContractExecution
를 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
SmartContractExecution
은 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 SmartContractExecution
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of SmartContractExecution
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.smartContractExecution.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.smartContractExecution({...})
, please change it to caver.transaction.smartContractExecution.create({...})
.
properties
Name | Type | Description |
---|---|---|
from | string | The address of the sender. |
to | string | 실행할 스마트 컨트랙트 계정의 주소입니다. |
input | string | 트랜잭션 실행에 이용되며 트랜잭션에 첨부되는 데이터입니다. 호출할 함수와 전달될 파라미터들을 나타내는 엔코딩된 문자열입니다. caver.abi.encodeFunctionCall를 통해 얻을 수 있습니다. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
value | string | (optional, default: |
signatures | Array | (optional) An array of signatures. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
Cancel
LegacyTransaction
은 취소 트랜잭션을 의미합니다. transactionObject
는 Cancel
트랜잭션을 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
Cancel
은 트랜잭션 풀에서 같은 논스를 가진 트랜잭션 실행을 취소합니다.
Cancel
는 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 Cancel
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of Cancel
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.cancel.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.xcancelxx({...})
, please change it to caver.transaction.cancel.create({...})
.
properties
Name | Type | Description |
---|---|---|
from | string | The address of the sender. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
signatures | Array | (optional) An array of signatures. |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
ChainDataAnchoring
ChainDataAnchoring
은 체인 데이터 앵커링 트랜잭션을 나타냅니다. transactionObject
는 ChainDataAnchoring
트랜잭션을 생성하기 위해 아래와 같은 속성들을 가질 수 있습니다.
ChainDataAnchoring
은 멤버변수로서 아래와 같은 속성들을 가지고 있습니다. 선택 사항
인 속성들은 사용자가 ChainDataAnchoring
트랜잭션을 생성할 때 transactionObject
에 선택적으로 주어질 수 있는 속성들을 뜻합니다.
NOTE: You can create an instance of ChainDataAnchoring
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.chainDataAnchoring.create
is supported since caver-js v1.6.1.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.chainDataAnchoring({...})
, please change it to caver.transaction.chainDataAnchoring.create({...})
.
properties
Name | Type | Description |
---|---|---|
from | string | The address of the sender. |
input | string | 서비스체인의 데이터입니다. |
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
signatures | Array | (optional) An array of signatures. |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
Example
EthereumAccessList
EthereumAccessList
represents an Ethereum access list transaction. A Klaytn account can execute a EthereumAccessList
only with AccountKeyLegacy. The transactionObject
can have properties below to create a EthereumAccessList
.
EthereumAccessList
has the properties below as its member variables. Properties marked as optional
refer to properties that can be optionally given in transactionObject
when the user creates EthereumAccessList
.
NOTE: You can create an instance of EthereumAccessList
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.ethereumAccessList
is supported since caver-js v1.8.0.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.ethereumAccessList({...})
, please change it to caver.transaction.ethereumAccessList.create({...})
.
properties
Name | Type | Description |
---|---|---|
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
value | string | (optional, default: |
from | string | (optional) The address of the sender. If omitted, the keyring address used for signing will be set. |
to | string | (optional, default: |
input | string | (optional) Data attached to the transaction, used for smart contract deployment/execution. |
signatures | Array | (optional) An array of signatures. An ethereum access list transaction can have only one signature. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, |
gasPrice | string | (optional) A multiplier to get how much the sender will pay in tokens. If omitted, |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, |
accessList | Array | (optional) As an EIP-2930 access list that contains all storage slots and addresses read and written by the transaction. |
Example
EthereumDynamicFee
EthereumDynamicFee
represents an Ethereum dynamic fee transaction. A Klaytn account can execute a EthereumDynamicFee
only with AccountKeyLegacy. The transactionObject
can have properties below to create a EthereumDynamicFee
.
EthereumDynamicFee
has the properties below as its member variables. Properties marked as optional
refer to properties that can be optionally given in transactionObject
when the user creates EthereumDynamicFee
. And note that EthereumDynamicFee
does not use gasPrice
, it uses maxPriorityFeePerGas
and maxFeePerGas
.
NOTE: You can create an instance of EthereumDynamicFee
from RLP-encoded strings. Please refer to the below example. NOTE: caver.transaction.ethereumDynamicFee
is supported since caver-js v1.8.0.
NOTE: As of caver-js v1.8.1-rc.4, creating transactions is only supported using the create
function. If you've been creating transactions using a constructor like new caver.transaction.ethereumDynamicFee({...})
, please change it to caver.transaction.ethereumDynamicFee.create({...})
.
properties
Name | Type | Description |
---|---|---|
gas | string | The maximum amount of transaction fee the transaction is allowed to use. |
value | string | (optional, default: |
from | string | (optional) The address of the sender. If omitted, it will be set to the keyring address used for signing. |
to | string | (optional, default: |
input | string | (optional) Data attached to the transaction, used for smart contract deployment/execution. |
signatures | Array | (optional) An array of signatures. An ethereum dynamic fee transaction can have only one signature. |
nonce | string | (optional) A value used to uniquely identify a sender’s transaction. If omitted, it will be set to |
maxPriorityFeePerGas | string | (optional) Gas tip cap for the transaction in peb. Since Klaytn has a fixed gas price, it should be set to the same value as |
maxFeePerGas | string | (optional) A maximum amount to pay for the transaction to execute. Since Klaytn has a fixed gas price, it should be set to the same value as |
chainId | string | (optional) The chain id of the Klaytn network. If omitted, it will be set to |
accessList | Array | (optional) As an EIP-2930 access list that contains all storage slots and addresses read and written by the transaction. |
Example
Last updated