Klaytn은 eth namespace APIs를 지원하며, 개발자들은 이더리움 기반의 SDKs 혹은 도구들을 사용하는 프로젝트를 쉽게 Klaytn으로 옮겨올 수 있습니다. (예를들어, 이더리움 도구의 엔드포인트 URL을 바꾸어 Klaytn node를 가리킬 수 있습니다.)
하지만 Klaytn과 Ethereum의 근본적인 디자인 차이가 존재하기 때문에, 몇몇 API들은 완전한 기능이 지원되지 않습니다. (예를들어, 몇몇 필드들은 항상 zero value를 가집니다.)
⚠️ Klaytn은 baseFeePerGas 스킴을 가지고 있지 않기 때문에, 해당 필드는 항상 0x0 값을 가집니다.
difficulty
(added)
⚠️ Klaytn 헤더에서 해당 필드는 blockScore에 해당하며, 0x1로 값이 고정되어 있습니다. This is because Klaytn's consensus mechanism is not based on PoW, indicating the technical concept of block difficulty is not applicable to Klaytn core.
extraData
extraData
⚠️ 해당 필드는 빈 값을 나타내며 항상 0x를 값으로 가집니다. Owing to the fact that Klaytn's extraData contains consensus data such as validators addresses, validators signatures, and proposer signature, it is not applicable to eth namespace API.
gasLimit
(added)
⚠️ Klaytn은 GasLimit이 없기 때문에 해당 필드는 임의의 숫자인 0xe8d4a50fff(=999999999999 in decimal)를 값으로 가집니다. At the time of writing, this figure is 30 times higher than the block gas limit of Ethereum. 더 자세한 내용은 계산 비용를 참조하십시오.
gasUsed
gasUsed
✅ 해당 블록의 트랜잭션들에 사용된 총 가스양과 동일한 스칼라 값입니다.
governanceData(생략됨)
⚠️ Ethereum 블록 헤더에는 해당 필드가 존재하지 않기 때문에 생략합니다.
hash
hash
✅ 블록의 해시입니다.
logsBloom
logsBloom
✅ 블록안의 로그들에 대한 블룸 필터입니다. 아직 보류 중인 블록이면 null입니다.
miner
(added)
⚠️ 해당 필드는 블록 제안자의 주소를 반환합니다. 클레이튼의 합의 메커니즘은 PBFT이기 때문에, 채굴자 대신 블록 제안자를 가집니다.
mixHash
(added)
⚠️ Klaytn의 합의 메커니즘은 PoW기반이 아니기 때문에, 해당 필드는 항상 zeroHash(0x00...)를 값으로 가집니다.
nonce
(added)
⚠️ Klaytn의 합의 메커니즘은 PoW기반이 아니기 때문에, 해당 필드는 항상 zeroNonce(0x00...)를 값으로 가집니다.
number
number
✅ 블록 번호를 가집니다.
parentHash
parentHash
✅ 부모 블록의 해시값을 가집니다.
receiptsRoot
receiptsRoot
✅ 블록의 receipts 트라이 루트의 해시입니다.
reward(생략됨)
⚠️ This field is omitted because this field does not exist in Ethereum Block Header.
sha3Uncles
(added)
⚠️ Klaytn은 엉클블록이 없기 때문에, 해당 필드는 항상 빈 블록 헤더를 포함하는 목록의 RLP-encoded 바이트의 Keccak256해시인 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347를 값으로 가집니다.
size
size
✅ 블록의 바이트 크기입니다.
stateRoot
stateRoot
✅ 블록의 상태 트라이의 루트 해시입니다.
timestamp
timestamp
✅ 블록이 생성되었을 때의 Unix 타임스탬프입니다.
timestampFoS(생략됨)
⚠️ This field is omitted because this field does not exist in Ethereum Block Header.
totalDifficulty
(added)
⚠️ The total difficulty of the chain until the querying block.
Klaytn에는 많은 유형의 트랜잭션 타입이 있고, 데이터 구조의 필드는 유형에 따라 변합니다.
따라서 다양한 유형의 Klaytn 트랜잭션이 어떻게 Ethereum 트랜잭션으로 변환되는지 확인하여야 합니다. 몇몇 필드는 변환 과정 중 무시되거나 zero 혹은 더미 값으로 추가될 수 있습니다. 이는 변환 과정 중 일부 중요한 정보(클레이튼의 관점에서)가 손실된다는 것을 의미합니다.
본 문서에서는 EIP-2718 이전의 EthereumLegacyTransaction을 이더리움 트랜잭션 형식으로 정의하고 있음을 참고하십시오.
eth namespace JSON-RPC apis를 통해 Klaytn 트랜잭션들을 쿼리할 때, Klaytn 트랜잭션은 이더리움 기본 트랜잭션 형식으로 반환될 것입니다.
본 문서에서는 변환 과정을 상세히 기술합니다 (Klaytn 트랜잭션 -> 이더리움 기본 트랜잭션).
Please read the description ⚠️ carefully.
The ✅ icon in the description denotes that the field used in the same way as in Ethereum.
공통 영역
공통 영역은 다양한 Klaytn 트랜잭션 종류와 무관합니다. 이 장에서는 공통 영역들이 어떻게 이더리움 기본 트랜잭션으로써 제공되는지를 기술합니다.
Ethereum 기본 트랜잭션 영역
Klaytn 트랜잭션 영역
Description
blockHash
blockHash
✅ 블록 해시.
blockNumber
blockNumber
✅ 블록 번호.
from
from
✅ 발신자의 주소.
gas
gas
✅ 발신자가 지불한 가스.
gasPrice
gasPrice
⚠️ Klaytn의 맥락에서는 단가로도 알려져 있으며, 해당 값은 거버넌스 프로세스를 통해 시스템에서 결정됩니다.
⚠️ This field is omitted because this field does not exist in Ethereum Legacy Transaction.
to
(covered in below sections)
The description of this field is covered in the detailed transaction items below.
transactionIndex
transactionIndex
⚠️ 거의 이더리움과 동일하지만, 이더리움과 다르게 Klaytn은 트랜잭션이 보류 중인 상태에서 그대로 정수를 반환합니다.
value
(covered in below sections)
The description of this field is covered in the detailed transaction items below.
type
type(변환됨)
⚠️ Klaytn에서 type 은 트랜잭션 타입을 문자열로 반환하지만 (예: "LegacyTransaction"), 이더리움과 일치하도록 16진수로 변환되었습니다 (예: 0x0). Transaction types that are only valid in Klaytn always return 0x0.
typeInt(생략됨)
⚠️ This field is omitted because this field does not exist in Ethereum Legacy Transaction.
v
(added)
⚠️ Klaytn은 다중서명을 지원하므로 Klaytn의 트랜잭션은 하나 이상의 서명을 가질 수 있습니다. signatures[0].V는 v 영역의 값으로 사용됩니다.
r
(added)
⚠️ Klaytn supports MultiSig so transaction in Klaytn can have more than one signature. signatures[0].R은 r 영역의 값으로 사용됩니다.
s
(added)
⚠️ Klaytn supports MultiSig so transaction in Klaytn can have more than one signature. signatures[0].S는 s 영역의 값으로 사용됩니다.
Regardless of various Klaytn FeeDelegation transaction type, there are common fields. (Please remind that fields of Klaytn Transaction Receipt are various based on transaction types.)
이 장은 수수료 위임의 공통 영역(위에서 다룬 공통 영역을 제외하고)이 어떻게 이더리움 트랜잭션 영수증으로써 제공되는지를 기술합니다.
Ethereum Transaction Receipt Field
Klaytn FeeDelegation Transaction Receipt Field
Description
feePayer(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
feePayerSignatures(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Regardless of various Klaytn PartialFeeDelegation transaction type, there are common fields. (Please remind that fields of Klaytn Transaction Receipt are various based on transaction types.)
이 장은 부분 수수료 위임의 공통 영역(위에서 다룬 공통 영역을 제외하고)이 어떻게 이더리움 트랜잭션 영수증으로써 제공되는지를 기술합니다.
Ethereum Transaction Receipt Field
Klaytn PartialFeeDelegation Transaction Receipt Field
Description
feeRatio(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Different fields for each transaction type
레거시 트랜잭션 영수증
Ethereum Transaction Receipt Field
Klaytn LegacyTransaction Receipt Field
Description
input(생략됨)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
to
to
✅ Address of the receiver. null when its a contract creation transaction.
value(생략됨)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Klaytn LegacyTransaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
ValueTransfer 트랜잭션 영수증
Ethereum Transaction Receipt Field
Klaytn ValueTransfer Transaction Receipt Field
Description
to
to
✅ Address of the receiver.
value(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Klaytn ValueTransfer Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
ValueTransferMemo 트랜잭션 영수증
Ethereum Transaction Receipt Field
Klaytn ValueTransferMemo Transaction Receipt Field
Description
input(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
to
to
✅ Address of the receiver.
value(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Klaytn ValueTransferMemo Transaction은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
SmartContractDeploy Transaction Receipt
Ethereum Transaction Receipt Field
Klaytn SmartContractDeploy Transaction Receipt Field
Description
codeFormat(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
humanReadable(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
input
⚠️ Ethereum 트랜잭션 영수증에는 해당 필드가 존재하지 않기 때문에 생략합니다.
to
to
✅ Address of the receiver. This field always has value null because this transaction is a contract creation transaction.
value
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt
Klaytn SmartContractDeploy Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
SmartContractExecution Transaction Receipt
Ethereum Transaction Receipt Field
Klaytn SmartContractExecution Transaction Receipt Field
Description
input
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
to
to
✅ Address of the smart contract.
value
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
Klaytn SmartContractExecution Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
AccountUpdate Transaction Receipt
Ethereum Transaction Receipt Field
Klaytn AccountUpdate Transaction Receipt Field
Description
key(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
to
(added)
⚠️ 해당 필드는 Klaytn AccoutUpdate 트랜잭션 영수증에 존재하지 않고, from을 필드의 값으로 주는 것이 가장 의미에 부합하기 때문에, from과 항상 같은 주소를 값으로 가집니다.
Klaytn AccountUpdate Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
Cancel Transaction Receipt
Ethereum Transaction Receipt Field
Klaytn Cancel Transaction Receipt Field
Description
to
(added)
⚠️ 해당 필드는 Klaytn Cancel 트랜잭션 영수증에 존재하지 않고, from을 필드의 값으로 주는 것이 가장 의미에 부합하기 때문에, from과 항상 같은 주소를 값으로 가집니다.
Klaytn Cancel Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.
ChainDataAnchoring Transaction Receipt
Ethereum Transaction Receipt Field
Klaytn ChainDataAnchoring Transaction Receipt Field
Description
input(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
inputJSON(omitted)
⚠️ This field is omitted because this field does not exist in Ethereum Transaction Receipt.
to
(added)
⚠️ 해당 필드는 Klaytn ChainDataAnchoring 트랜잭션 영수증에 존재하지 않고, from을 필드의 값으로 주는 것이 가장 의미에 부합하기 때문에, from과 항상 같은 주소를 값으로 가집니다.
Klaytn ChainDataAnchoring Transaction Receipt은 아래와 같이 Ethereum 트랜잭션 영수증으로써 제공됩니다.