Kaia provides encapsulated transaction types to support Ethereum compatibility. Except for a single-byte type separator called "EthereumTxTypeEnvelope," Kaia's Ethereum transaction types share the same properties and RLP encoding scheme as Ethereum's design. This allows users to successfully deploy transactions generated by Ethereum development tools on the Kaia network. When using the eth namespace API, the type separator is omitted, enabling users to interact with Kaia just like they would with Ethereum.
Ethereum Transaction Types in Kaia
EthereumTxTypeEnvelope
The EthereumTxTypeEnvelope is a single-byte prefix for raw transactions that indicates Ethereum transaction types. Ethereum adopted an extensible transaction type scheme through EIP-2718, which uses a type numbering system that conflicts with Kaia's. To resolve this conflict, Kaia introduced the "EthereumTxTypeEnvelope," allowing for future separation and expansion of Ethereum transaction types.
Key details:
- EthereumTxTypeEnvelope:
0x78 - TxHashRLP:
EthereumTransactionType || TransactionPayload - RawTransaction:
EthereumTxTypeEnvelope || EthereumTransactionType || TransactionPayload
Transaction Types
TxTypeEthereumAccessList
This transaction type represents Ethereum's access list transactions as specified in EIP-2930. It's designed for compatibility and only applicable to EOAs associated with AccountKeyLegacy.
Properties
| Property | Type | Description |
|---|---|---|
| type | uint8 | Must be 0x7801 |
| chainId | *big.Int | Target chain ID |
| nonce | uint64 | Unique sender transaction identifier |
| gasPrice | *big.Int | Multiplier for calculating transaction fee |
| gas | uint64 | Maximum allowed transaction fee |
| to | *common.Address | Recipient address |
| value | *big.Int | Amount of KAIA transferred |
| data | []byte | Execution data |
| accessList | type.AccessList | List of addresses and storage keys |
| v, r, s | *big.Int | Cryptographic signature |
Encoding Details
- Signature RLP Encoding:
EthereumTransactionType || encode([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList]) - SenderTxHash RLP:
EthereumTransactionType || encode([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList, v, r, s]) - Transaction Hash RLP: Same as SenderTxHash RLP
- Raw Transaction:
EthereumTxTypeEnvelope || EthereumTransactionType || encode([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList, v, r, s])
๐ Learn more about Ethereum transaction types
TxTypeEthereumDynamicFee
This transaction type represents Ethereum's dynamic fee transactions as specified in EIP-1559, using gasTipCap and gasFeeCap instead of gasPrice.
Properties
| Property | Type | Description |
|---|---|---|
| type | uint8 | Must be 0x7802 |
| chainId | *big.Int | Target chain ID |
| nonce | uint64 | Unique sender transaction identifier |
| gasTipCap | *big.Int | Fee multiplier (excluding baseFee) |
| gasFeeCap | *big.Int | Total fee multiplier |
| gas | uint64 | Maximum allowed transaction fee |
| to | *common.Address | Recipient address |
| value | *big.Int | Amount of KAIA transferred |
| data | []byte | Execution data |
| accessList | type.AccessList | List of addresses and storage keys |
| v, r, s | *big.Int | Cryptographic signature |
Encoding Details
- Signature RLP Encoding:
EthereumTransactionType || encode([chainId, nonce, gasTipCap, gasFeeCap, gasLimit, to, value, data, accessList]) - SenderTxHash RLP:
EthereumTransactionType || encode([chainId, nonce, gasTipCap, gasFeeCap, gasLimit, to, value, data, accessList, v, r, s]) - Transaction Hash RLP: Same as SenderTxHash RLP
- Raw Transaction:
EthereumTxTypeEnvelope || EthereumTransactionType || encode([chainId, nonce, gasTipCap, gasFeeCap, gasLimit, to, value, data, accessList, v, r, s])
๐ Explore Kaia's Ethereum compatibility features
FAQs
What is EthereumTxTypeEnvelope?
It's a single-byte prefix (0x78) that separates Ethereum transaction types from Kaia's native types while maintaining compatibility.
How does Kaia handle Ethereum-style transactions?
Kaia processes Ethereum-formatted transactions through special encapsulated types (0x7801 and 0x7802) that maintain Ethereum's RLP encoding while preventing type conflicts.
Are there gas fee savings with access lists in Kaia?
No, unlike Ethereum's EIP-2930, using access lists in Kaia doesn't provide gas fee benefits since Kaia uses a fixed gas price model.
Can I use Ethereum development tools with Kaia?
Yes, tools generating standard Ethereum transactions can be used with Kaia through its compatibility layer.
What's the difference between eth and kaia namespace APIs?
The eth namespace omits type separators for Ethereum compatibility, while kaia namespace preserves full transaction details including type information.
How does dynamic fee calculation work in Kaia?
While Kaia supports the format, it uses fixed gas prices (currently 250 Gkei), so gasTipCap and gasFeeCap should match this value.