Skip to content

Conversation

@DaniSomoza
Copy link
Contributor

@DaniSomoza DaniSomoza commented Mar 12, 2025

What it solves

Resolves #1087

set Address type as 0x{string}

How this PR fixes it

This PR introduces a new type called FullAddress, which supports both standard Ethereum addresses (Address) and the ERC-3770 formatted addresses (Eip3770Address):

export type Address = AddressType // `0x${string}` from viem & abitype

// ERC-3770: Chain-specific addresses, see: https://eips.ethereum.org/EIPS/eip-3770
export type Eip3770Prefix = `${string}:`
export type Eip3770Address = `${Eip3770Prefix}${AddressType}` // `${string}:0x${string}`

export type FullAddress = Address | Eip3770Address

Additionally, tests in the api-kit package have been updated to support ERC-3770 addresses for the missing 4337 methods

@DaniSomoza DaniSomoza changed the base branch from main to development March 12, 2025 17:37
@DaniSomoza DaniSomoza changed the title Address type as 0xstring Address type as 0x{string} Mar 12, 2025
@coveralls
Copy link

coveralls commented Mar 13, 2025

Pull Request Test Coverage Report for Build 13967426741

Details

  • 39 of 44 (88.64%) changed or added relevant lines in 8 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 78.114%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/api-kit/src/SafeApiKit.ts 24 29 82.76%
Files with Coverage Reduction New Missed Lines %
packages/api-kit/src/SafeApiKit.ts 8 58.47%
Totals Coverage Status
Change from base Build 13945235243: -0.2%
Covered Lines: 904
Relevant Lines: 1082

💛 - Coveralls

@DaniSomoza DaniSomoza self-assigned this Mar 20, 2025
@DaniSomoza DaniSomoza marked this pull request as ready for review March 20, 2025 10:00
@DaniSomoza DaniSomoza requested review from dasanra and yagopv March 20, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type Safety Issue: Global Module Augmentation Weakens Address Types

5 participants