Skip to main content

Transaction Types

KalyChain supports multiple transaction formats, each with different features and use cases.

Overview

Transaction types are specified by the transactionType parameter and affect:

  • Available parameters
  • Fee calculation
  • Gas optimization capabilities

FRONTIER Transactions (Legacy)

Type identifier: 0x0 or omitted

Legacy transactions use the original Ethereum transaction format from before EIP-2718 typed transactions.

Parameters

ParameterTypeDescription
nonceIntegerTransaction sequence number
gasPriceIntegerWei per gas unit
gasLimitIntegerMaximum gas units
toAddressRecipient (null for deployment)
valueIntegerWei to transfer
dataBytesInput data
v, r, sSignatureTransaction signature
chainIdIntegerNetwork identifier

Example

{
"nonce": "0x1",
"gasPrice": "0x3b9aca00",
"gasLimit": "0x5208",
"to": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD2b",
"value": "0xde0b6b3a7640000",
"data": "0x",
"chainId": "0xf30"
}

Use Cases

  • Simple transfers
  • Compatibility with older tooling
  • When gas price stability is acceptable

ACCESS_LIST Transactions (EIP-2930)

Type identifier: 0x1

Introduced in EIP-2930, these transactions include an access list specifying storage slots the transaction will access.

Parameters

All legacy parameters, plus:

ParameterTypeDescription
accessListArrayAddresses and storage keys to access

Access List Structure

{
"accessList": [
{
"address": "0xContractAddress",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000000000000000000000000000002"
]
}
]
}

Benefits

  • Gas Savings — Pre-declaring accessed storage reduces warm access costs.
  • Predictable Execution — Transaction specifies exactly what it will access.

When to Use

  • Complex DeFi interactions touching multiple contracts.
  • Batch operations accessing known storage slots.
  • Gas optimization for high-value transactions.

EIP-1559 Transactions

Type identifier: 0x2

Introduced in EIP-1559, these transactions use a dynamic fee market with a base fee that adjusts based on network demand.

Parameters

Access list parameters, plus new fee parameters (replacing gasPrice):

ParameterTypeDescription
maxPriorityFeePerGasIntegerMaximum tip to validator
maxFeePerGasIntegerMaximum total fee (base + priority)

Fee Calculation

The transaction pays:

fee = gasUsed × effectiveGasPrice

where effectiveGasPrice = min(baseFee + maxPriorityFeePerGas, maxFeePerGas)
ComponentDestination
Base FeeBurned (removed from supply)
Priority FeePaid to block validator

Example

{
"type": "0x2",
"nonce": "0x1",
"maxPriorityFeePerGas": "0x3b9aca00",
"maxFeePerGas": "0x77359400",
"gasLimit": "0x5208",
"to": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD2b",
"value": "0xde0b6b3a7640000",
"data": "0x",
"accessList": [],
"chainId": "0xf30"
}

Benefits

  • More Predictable Fees — Base fee adjusts smoothly.
  • Reduced Overpayment — Pay only what's needed.
  • Better UX — Wallets can estimate fees more accurately.

When to Use

  • General use — recommended for most transactions.
  • When fee predictability is important.
  • Modern wallets default to EIP-1559.

API Object Formats

Different API responses use transaction type-specific formats:

Transaction Object

Returned by eth_getTransactionByHash, etc.

Transaction Receipt Object

Returned by eth_getTransactionReceipt.

Transaction Call Object

Used in eth_call and eth_estimateGas.

Transaction Type Selection

ScenarioRecommended TypeReason
Simple transferEIP-1559Better fee prediction
Complex DeFiEIP-2930Gas optimization
Legacy compatibilityFRONTIERMaximum compatibility
High-value transactionEIP-2930Optimize gas costs

Further Reading