runtime_bytecode, which is what’s stored on-chain for future contract interactions.
➡ Hyperledger Besu EVM
➡ Pectra Hard Fork
➡ Past Hard Forks
➡ Solidity Variables and Opcodes
Ethereum Virtual Machine (EVM)
The Ethereum Virtual Machine (EVM) is a run-time environment for executing smart contracts written in EVM native programming languages, like Solidity. The source code must be compiled into bytecode for the EVM to execute a given smart contract. On Hedera, users can interact with the EVM-compatible environment in several ways. They can submitContractCreate, EthereumTransaction, or make eth_sendRawTransaction RPC calls with the contract bytecode directly. These various paths allow developers to deploy and manage smart contracts efficiently.
When the EVM receives the bytecode, it will be further broken down into operation codes (opcodes). The EVM opcodes represent the specific instructions it can perform. Each opcode is one byte and has its own gas cost associated with it. The cost per opcode for the Ethereum Pectra hard fork (Prague EVM execution layer) can be found here.
Smart Contract Opcode Example
Example: compiled contract bytecode disassembled into opcodes
Example: compiled contract bytecode disassembled into opcodes
Deployment Options
SDK You can use a Hedera SDK to deploy your smart contract bytecode to the network. This approach does not require using any EVM tools like Hardhat or an instance of the Hedera JSON-RPC Relay. Hardhat Hardhat can be used to deploy your smart contract by pointing to a community-hosted JSON-RPC Relay. However, EVM tools do not support features that are native to Hiero Contracts like:- Admin Key
- Contract Memo
- Automatic Token Associations
- Auto Renew Account ID
- Staking Node ID or Account ID
- Decline Staking Rewards
ContractCreateTransaction API using one of the Hedera SDKs.
Deploy A Smart Contract Using Hardhat Hedera Json Rpc Relay
Deploying Large Contracts
Hedera supports jumbo Ethereum transactions (HIP-1086) for large bytecode payloads, letting you includecallData directly in ethereumData without using the File Service (callDataFileId). The exact ceilings are network-configurable parameters, not fixed protocol constants; current values are on the order of ~24KB for contract creation (the EIP-170 code-size limit) and ~128KB for contract calls. Check the active network configuration for the precise limits.
However, jumbo transactions:
- Can’t be included in batch transactions (
TransactionList). - Are subject to network throttling based on bytes per second and per-node limits.
Bytecode and Gas Essentials
When deploying contracts, gas must cover both intrinsic gas and the cost of executing deployment code. Intrinsic gas includes a base fee (21,000) plus a per-byte cost forcallData:
- 4 gas per zero byte
- 16 gas per non-zero byte
Example
If your contract bytecode is 10KB, with 20% (2KB) as zero bytes and 80% (8KB) as non-zero bytes:- gas for zero bytes: 4 × 2,048 = 8,192
- gas for non-zero bytes: 16 × 8,192 = 131,072
- total intrinsic gas = 21,000 + 8,192 + 131,072 = 160,264
21000 + 10 × (zero + 4 × non_zero). For this example that floor is 21,000 + 10 × (2,048 + 4 × 8,192) = 369,160 gas, well above the 160,264 intrinsic figure. The deployment pays whichever is greater: the intrinsic plus execution total, or the floor. In practice deployment execution includes the code-deposit charge (200 gas per byte of runtime bytecode, roughly 2M gas for a 10KB contract), which pushes the standard total far past the floor, so the floor mainly matters for calldata-heavy transactions with little execution work.
Ensure you adjust gasLimit (RLP) and maxGasAllowance (wrapper) to cover this total gas.
📣 Learn more on the Gas and Fees page,
EthereumTransaction SDK page, and the Understanding Hedera’s EVM Differences and Compatibility page.Hyperledger Besu EVM on Hedera
The Hedera network nodes utilize the HyperLedger Besu EVM Client written in Java as an execution layer for Ethereum-type transactions. The codebase is up to date with the current Ethereum Mainnet hard forks. The Besu EVM client library is used without hooks for Ethereum’s consensus, networking, and storage features. Instead, Hedera hooks into its own Hashgraph consensus, Gossip communication, and Virtual Merkle Trees components for greater fault tolerance, finality, and scalability. The Besu EVM client is configured to support the Pectra hard fork of the Ethereum Mainnet (activated May 7, 2025), with some modifications. Pectra was originally introduced on Hedera under HIP-1340 (EOA Code Delegation) and HIP-1341 (Support for Ethereum Pectra Release).Pectra Hard Fork
The smart contract platform has been upgraded to support the visible EVM changes introduced in the Pectra hard fork (Prague execution layer + Electra consensus layer). The applicable EIPs adopted on Hedera are:| EIP | Title | Summary |
|---|---|---|
| EIP-2537 | BLS12-381 curve precompiles | Adds precompiles at addresses 0x0b–0x11 for efficient BLS signature/pairing operations. |
| EIP-7623 | Increase calldata cost (floor) | Introduces a calldata gas floor: 21000 + 10 × (zero_bytes + 4 × non_zero_bytes). |
| EIP-7702 | Set EOA account code | Adds a new transaction type (Type 4) allowing EOAs to delegate execution to a contract. See EOA Code Delegation. |
21,000. The associated cost of input data is 16 gas for each byte of data that is not zero and 4 gas for each byte of data that is zero. Under Pectra (EIP-7623), an additional floor of 21000 + 10 × (zero + 4 × non_zero) applies to calldata-heavy transactions. The amount of intrinsic gas consumed is charged in relation to the data supplied when making a contract call to the function parameters of external contracts. The gas schedule and the fees table can be found in the gas section of this documentation page.
Supported Ethereum Transaction Types
EthereumTransaction accepts RLP-encoded payloads for all of the following types:
| Type | Spec | Description |
|---|---|---|
0 | Legacy (EIP-155) | Pre-Berlin legacy transactions. |
1 | EIP-2930 | Optional access_list to pre-warm storage slots and addresses. |
2 | EIP-1559 | max_fee_per_gas + max_priority_fee_per_gas (priority fee is ignored on Hedera; fees are fixed by the network). |
4 | EIP-7702 (Pectra) | Adds an authorization_list for EOA code delegation. See EOA Code Delegation. |

Blobs supported on Hedera?
Hedera does not provide blobs under EIP-4844 (Cancun), nor under the Pectra blob-throughput EIPs (EIP-7691, EIP-7840). HIP-866 defines how Hedera behaves without blob support. To preserve compatibility and future design space, Hedera acts as if blobs are not being added. This allows existing contracts that depend on blob behavior to function without blobs. Blobs are prevented from entering the system by prohibiting “Type 3” transactions, which enable blobs. This keeps blobs out of the EVM’s concern without affecting other desirable interactions on Hedera. With jumboEthereumTransaction support (HIP-1086) on Hedera, large callData payloads are the preferred path for rollup-style data.
Past Hard Forks
Hedera tracks Ethereum mainnet hard forks and adopts the EIPs that apply to the Smart Contract Service. The table below summarizes recent forks and the practical differences between them on Hedera.| Fork (Ethereum activation) | First adopted on Hedera | Headline changes on Hedera |
|---|---|---|
| Pectra (May 7, 2025) | HIP-1340, HIP-1341 | • EIP-2537: BLS12-381 precompiles (0x0b–0x11). • EIP-7623: calldata gas floor. • EIP-7702: new Type 4 EthereumTransaction and authorization_list enabling EOA code delegation. |
| Cancun (Mar 13, 2024) | Mainnet release v0.50 | • New opcodes TLOAD/TSTORE (transient storage), MCOPY, BLOBHASH, BLOBBASEFEE. • SELFDESTRUCT semantics updated per EIP-6780. • Blob support (EIP-4844) not adopted; Type 3 transactions are rejected (HIP-866). |
| Shanghai (Apr 12, 2023) | Mainnet release v0.38 | • PUSH0 opcode. • Updated INITCODE cost for contract creation. |
What changed from Cancun to Pectra?
If you previously targeted Cancun, the practical differences on Hedera are:- New transaction type: Type 4. The
EthereumTransactionHAPI message now accepts RLP-encoded Type 4 payloads carrying anauthorization_list. Each authorization sets adelegation_addresson the signing EOA, causing future EVM calls to that EOA to execute the target contract’s bytecode in the EOA’s storage context (similar toDELEGATECALL). Full details in EOA Code Delegation. - EOA bytecode is no longer always empty. Pre-Pectra,
eth_getCode(eoa)always returned empty. After Pectra, an EOA with delegation set returns the Delegation Indicator0xef0100 || <20-byte target address>. EOAs may now also have non-empty storage slots and emit logs. - Calldata floor (EIP-7623). Calldata-heavy transactions must now pay at least
21000 + 10 × (zero_bytes + 4 × non_zero_bytes). Standard contract calls (where execution gas dominates) are unaffected. - BLS12-381 precompiles (EIP-2537). Seven new precompiles at addresses
0x0b–0x11for G1/G2 add, multi-scalar multiplication, pairing check, and field-to-curve mapping. These make BLS aggregation, threshold signatures, and zk-friendly cryptography native (no Solidity gymnastics). - HTS/HSS facade calls re-implemented as Delegation Indicators. Token and Schedule “proxy” accounts now return a fixed Delegation Indicator pointing at the corresponding system contract instead of dynamic synthesized bytecode. User-visible behavior is unchanged, but tools that inspect the bytecode of these proxy accounts will now see a consistent
0xef0100...-prefixed value rather than a customDELEGATECALLshim. - HAS precedence rules. When an EOA has a code delegation set, calls whose 4-byte selector matches a Hedera Account Service facade function (
hbarAllowance,hbarApprove,setUnlimitedAutomaticAssociations) are routed to HAS and take precedence over the user’s delegation. Be aware of potential selector collisions when designing a smart-account delegate.
Blobs (EIP-4844 / EIP-7691 / EIP-7840) remain unsupported on Hedera. Type 3 transactions are rejected.
Solidity Variables and Opcodes
The table below defines the mapping of Solidity variables and operation codes to Hedera. The full list of supported Opcodes for the Pectra hard fork (Prague EVM execution layer) can be found here.| Solidity | Opcode | Hedera |
|---|---|---|
address | The address is a mapping of shard.realm.number (0.0.10) into a 20 byte Solidity address. The address can be a Hedera account ID or contract ID in Solidity format. | |
block.basefee | BASEFEE | The BASEFEE opcode will return zero. Hedera does not use the Fee Market mechanism this is designed to support. |
block.chainid | CHAINID | The CHAINID opcode will return 295(hex 0x0127) for mainnet, 296( hex 0x0128) for testnet, 297( hex 0x0129) for previewnet, and 298 (0x12A) for development networks. |
block.coinbase | COINBASE | The COINBASE operation will return the funding account (Hedera transaction fee collecting account 0.0.98). |
block.number | The index of the record file (not recommended, use block.timestamp). | |
block.timestamp | The transaction consensus timestamp. | |
block.difficulty | Always zero. | |
block.gaslimit | GASLIMIT | The GASLIMIT operation will return the gasLimit of the transaction. The transaction gasLimit will be the lowest of the gas limit requested in the transaction or a global upper gas limit configured for all smart contracts. |
msg.sender | The address of the Hedera contract ID or account ID in Solidity format that called this contract. For the root level or for delegate chains that go to the root, it is the account ID paying for the transaction. | |
msg.value | The value associated to the transaction associated in tinybar. | |
tx.origin | The account ID paying for the transaction, regardless of depth. | |
tx.gasprice | Fixed (varies with the global fee schedule and exchange rate). | |
selfdestruct(address payable recipient) | SELFDESTRUCT | Address will not be reusable due to Hedera’s account numbering policies. On SELFDESTRUCT the contracts HBAR and HTS tokens are transferred to the recipients. If the recipient does not exist or does not have an allowance for any of the HTS tokens, this opcode will fail. |
<address>.code | Precompile and system-contract addresses (including the HTS system contract at 0x167) report no code. Under Pectra (HIP-1340), HTS token and HSS schedule proxy addresses, and EOAs with a code delegation set, report a 23-byte 0xef0100… Delegation Indicator instead of empty code. See EOA Code Delegation. | |
<address>.codehash | Precompile contract addresses will report the empty code hash. | |
PRNG system contract (0x169) | There is no PRNG opcode. Per HIP-351, contracts call getPseudorandomSeed() on the PRNG system contract at 0x169, which returns a 256-bit seed derived from the n-3 record running hash. | |
delegateCall | Contracts may no longer use delegateCall() to invoke system contracts. Contracts should instead use the call() method. | |
blobVersionedHashesAtIndex | BLOBHASH | The BLOBHASH operation will return all zeros at all times. |
blobBaseFee | BLOBBASEFEE | The BLOBBASEFEE operation will return1 at all times. |
Limitation on fallback() / receive() Functions in Hiero Contracts
When developing smart contracts on Hedera, it’s important to understand that the fallback() and receive() functions do not get triggered when a contract receives HBAR via a crypto transfer.
In Ethereum, these functions act as “catch-all” mechanisms when a contract receives Ether. In Hedera, however, contract balances may change through native HAPI operations, independent of EVM message calls, making it impossible to maintain balance-related invariants with just the fallback() or receive() methods.
Impacted Variables
msg.sender: The address initiating the contract call.msg.value: The amount of HBAR sent along with the call.
Key Points
- Developers should implement explicit functions to handle HBAR transfers.
- To disable native operations entirely, consider submitting a Hedera Improvement Proposal (HIP).
FAQs
Can I use Solidity functions directly with the Hedera EVM?
Can I use Solidity functions directly with the Hedera EVM?
Yes, you can use Solidity functions directly with the Hedera EVM. However, refer to the Solidity Variables and Opcodes table to understand any modifications to opcode descriptions that better reflect their behavior on the Hedera network.
Can I deploy large contracts with big bytecode?
Can I deploy large contracts with big bytecode?
Yes. Hedera supports jumbo Ethereum transactions (HIP-1086), which carry
callData directly in ethereumData and remove the need to upload bytecode to the File Service in most cases. Note that jumbo transactions cannot be included in a TransactionList (batch); each one must be submitted individually. See Deploying Large Contracts for the current size ceilings and throttling details.How does gas work when deploying a contract?
How does gas work when deploying a contract?
Gas covers intrinsic costs (base + per-byte of
callData) and execution costs (opcodes run by the EVM). Ensure your gasLimit and maxGasAllowance cover the total. See the gas and fees page for details.How does Hedera handle <code>fallback()</code> and <code>receive()</code> functions?
How does Hedera handle <code>fallback()</code> and <code>receive()</code> functions?
Hedera does not trigger
fallback() or receive() functions on HBAR transfers. Balances may change through native operations, so use explicit functions to handle HBAR. Learn more.Can I deploy contracts using only Hardhat?
Can I deploy contracts using only Hardhat?
Yes, but Hardhat cannot set Hedera-native properties like admin key or token associations. For these, use the Hedera SDK.
What should I do if my contract relies on blob-related opcodes?
What should I do if my contract relies on blob-related opcodes?
Are there any special considerations for using updated EVM opcodes on Hedera?
Are there any special considerations for using updated EVM opcodes on Hedera?
Yes, while the Hedera EVM supports the updated opcodes from the Pectra hard fork (including Cancun-era
TLOAD/TSTORE/MCOPY and Pectra-era BLS12-381 precompiles), you should know the intrinsic gas costs and input data charges specific to Hedera, including the EIP-7623 calldata floor. Refer to the gas schedule and fees table for more information.Can I use EIP-7702 (Type 4) transactions on Hedera?
Can I use EIP-7702 (Type 4) transactions on Hedera?
Yes. Hedera supports Type 4
EthereumTransaction payloads under HIP-1340. You can also configure EOA code delegation via native CryptoCreate / CryptoUpdate transactions. See the EOA Code Delegation page for both paths and the HAS precedence rules.