Skip to content

HIP-1340: EOA Code Delegation#1608

Draft
0xivanov wants to merge 3 commits intomainfrom
HIP-1340-EOA-Code-Delegation
Draft

HIP-1340: EOA Code Delegation#1608
0xivanov wants to merge 3 commits intomainfrom
HIP-1340-EOA-Code-Delegation

Conversation

@0xivanov
Copy link
Copy Markdown
Contributor

Description:
Implements HIP-1340 (EIP-7702) to enable EOA code delegation, allowing externally owned accounts to delegate code execution to smart contracts.

AccountCreateTransaction

  • SetDelegationAddress(address interface{}) *AccountCreateTransaction - Sets the delegated contract address (accepts hex string with/without 0x prefix, or 20-byte slice)
  • GetDelegationAddress() []byte - Returns the delegation address, or nil if not set

AccountUpdateTransaction

  • SetDelegationAddress(address interface{}) *AccountUpdateTransaction - Sets or clears the delegation address (accepts hex string, 20-byte slice, or nil to clear)
  • GetDelegationAddress() []byte - Returns the delegation address, or nil if not set
  • Setting to 20 zero bytes or nil clears any existing delegation

AccountInfo

  • DelegationAddress []byte - New field exposing the account's delegation address (immutable, nullable)

Related issue(s):

Fixes #1606

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov self-assigned this Jan 20, 2026
@0xivanov 0xivanov added the enhancement New feature or request label Jan 20, 2026
@lfdt-bot
Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 93.68421% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdk/account_info.go 50.00% 2 Missing and 1 partial ⚠️
sdk/account_update_transaction.go 94.54% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
sdk/account_create_transaction.go 95.92% <100.00%> (+0.50%) ⬆️
sdk/status.go 99.87% <100.00%> (+<0.01%) ⬆️
sdk/account_info.go 62.50% <50.00%> (-0.77%) ⬇️
sdk/account_update_transaction.go 90.06% <94.54%> (+0.99%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HIP-1340: EOA Code Delegation

2 participants