Skip to content

Commit 6083cfe

Browse files
lukasz-hashgraphkpachhaimgarbsNana-EC
authored
HIP-1340: EOA Code Delegation (#1340)
Signed-off-by: Lukasz Gasior <lukasz.gasior@swirldslabs.com> Signed-off-by: Michael Garber <michael.garber@hashgraph.com> Co-authored-by: Kiran Pachhai <kiran.pachhai@hashgraph.com> Co-authored-by: Michael Garber <michael.garber@hashgraph.com> Co-authored-by: Nana Essilfie-Conduah <56320167+Nana-EC@users.noreply.github.com>
1 parent 023eb54 commit 6083cfe

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

HIP/hip-1340.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
hip: 1340
33
title: EOA Code Delegation
44
author: Lukasz Gasior (@lukasz.gasior), Luke Lee (@luke.lee)
5-
working-group: TBD
5+
working-group: Fernando Paris(@Ferparishuertas), Luis Mastrangelo(@acuarica), Nana Essilfie-Conduah (@Nana-EC)
66
type: Standards Track
77
category: Service
88
needs-hiero-approval: Yes
99
needs-hedera-review: Yes
1010
hedera-review-date:
1111
hedera-acceptance-decision:
12-
status: Review
12+
status: Last Call
13+
last-call-date-time: 2026-02-09T07:00:00Z
1314
discussions-to: https://github.com/hiero-ledger/hiero-improvement-proposals/pull/1340
1415
created: 2025-11-13
15-
updated: 2026-01-21
16+
updated: 2026-01-26
1617
---
1718

1819
## Abstract
@@ -87,7 +88,7 @@ message Account {
8788
}
8889
```
8990

90-
For EVM compatibility, Hedera Smart Contract Service will assemble the correct Delegation Indicator (i.e. prefix the `delegation_address` with `0xef0100`) for any bytecode queries of an EOA.
91+
For EVM compatibility, Hiero Smart Contract Service will assemble the correct Delegation Indicator (i.e. prefix the `delegation_address` with `0xef0100`) for any bytecode queries of an EOA.
9192

9293
For external observers, for example those using ContractGetBytecode queries, the code of an EOA will no longer be fixed to the account facade proxy code (the impact on the facade proxy mechanism has been described in more detail below). It will be either empty (no delegation) or an EVM-compatible Delegation Indicator.
9394

@@ -117,7 +118,7 @@ message AccountInfo {
117118

118119
#### Updating Code Delegation of an EOA
119120

120-
We propose to enable two ways of setting/updating the Code Delegation. One using Hedera-specific API, and another one using a new EVM transaction type following the specification of EIP-7702.
121+
We propose to enable two ways of setting/updating the Code Delegation. One using Hiero-specific API, and another one using a new EVM transaction type following the specification of EIP-7702.
121122

122123
##### Updating Code Delegation Via CryptoCreate or CryptoUpdate Transaction
123124

@@ -229,7 +230,7 @@ The following checks will be applied before executing the EVM code of the target
229230
- targetting a system account address results in a no-op code execution
230231
- targetting an existing EOA with empty code results in a no-op code execution
231232
- targetting an existing EOA, which itself contains code delegation results in literal execution of the delegation indicator (which will fail since `0xef` is a banned op code)
232-
- targetting an existing contract with non-empty code results in the execution of its EVM code, with the exception of calls matching one of Hedera Account Service proxy methods (described in detail below)
233+
- targetting an existing contract with non-empty code results in the execution of its EVM code, with the exception of calls matching one of Hiero Account Service proxy methods (described in detail below)
233234

234235
In case Code Delegation points to another delegation, creating a potential chain or loop of delegations, only the first one will be resolved and the code of the target address will be interpreted literally, even if it's a Delegation Indicator.
235236

@@ -240,7 +241,7 @@ native `ContractCallTransaction` and native `ContractCreateTransaction`.
240241

241242
### Example User Flows
242243

243-
Below we present two complete example user flow diagrams: one utilizing an EVM type 4 transaction (e.g. when the user uses standard Ethereum-compatible tools) and another one demonstrating the Code Delegation feature using solely Hedera-native operations.
244+
Below we present two complete example user flow diagrams: one utilizing an EVM type 4 transaction (e.g. when the user uses standard Ethereum-compatible tools) and another one demonstrating the Code Delegation feature using solely Hiero-native operations.
244245

245246
Ethereum-compatible example utilizing an EVM type 4 transaction:
246247

@@ -272,7 +273,7 @@ Execution Logic Changes:
272273

273274
### Impact on Proxy/Facade Calls
274275

275-
HIP-218, followed by HIP-719 (later extended by HIP-755 and HIP-906) introduced the concept of proxy/facade calls, where a call can be made directly to an EVM address of a Hedera-native entity (e.g. an HTS token or an account).
276+
HIP-218, followed by HIP-719 (later extended by HIP-755 and HIP-906) introduced the concept of proxy/facade calls, where a call can be made directly to an EVM address of a Hiero-native entity (e.g. an HTS token or an account).
276277
The implementation of this facility currently relies on an intermediate, hardcoded and dynamic piece of EVM code that is being run when such a call is made.
277278
While functional, this has two main downsides:
278279

@@ -332,7 +333,7 @@ Hooks have a dedicated storage namespace, so the fact that Code Delegation might
332333

333334
Mirror Node will be impacted in the following ways:
334335

335-
- `CryptoCreate` / `CryptoUpdate` transaction body will be updated
336+
- `CryptoCreate` / `CryptoUpdate` transaction body parsing in the imported will be updated
336337
- A new field will be added to the `Account` entity
337338
- EOA storage slots will be mutable
338339
- The code (as returned by ContractGetBytecode) of HTS tokens and HSS schedule addresses will be updated to a Delegation Indicator targetting a corresponding System Contract address
@@ -561,16 +562,16 @@ to
561562

562563
The security is in the hands of the user - EOA owner - as they are the ones deciding which contract code they wish to delegate the execution to. If any System Contract is called within the delegated contract code, it will have full EOA rights, as it is executed in the context of EOA. This complies to the V2 security model, as it's only the user who can set up the delegation in the first place.
563564

564-
In summary, there are no new threats or risks for Hedera, aside the inherent risks of the EIP-7702 Code Delegation adoption within the Ethereum Ecosystem.
565+
In summary, there are no new threats or risks for Hiero networks, aside the inherent risks of the EIP-7702 Code Delegation adoption within the Ethereum Ecosystem.
565566
There is a considerable amount of educational materials (articles, blog posts) in the Ethereum community that explain the inherent risks of EIP-7702 and establish best practices for using this feature.
566567

567568
Code Delegation directly to System Contracts will be forbidden for regular EOA accounts (no-op, as described in the appropriate section above) and will only be permited for the following native entities: Token Proxy Account, Schedule Proxy Account to facilitate the proxy/facade mechanism described earlier.
568569

569570
## How to Teach This
570571

571-
Hedera will support EIP-7702-like EOA Code Delegation, with the following modifications:
572-
- Hedera's account creation cost will be charged when setting Code Delegation for new accounts
573-
- Users can use either Ethereum-compatible tools or Hedera native transactions to modify their Code Delegations
572+
Hiero will support EIP-7702-like EOA Code Delegation, with the following modifications:
573+
- Hiero's account creation cost will be charged when setting Code Delegation for new accounts
574+
- Users can use either Ethereum-compatible tools or Hiero native transactions to modify their Code Delegations
574575
- Delegations to functions matching the signatures of HAS will not work (HAS calls have precedence)
575576
- HTS/HSS proxy/facade calls remain unchanged from user’s perspective
576577

0 commit comments

Comments
 (0)