• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 18192665576
89%
main: 89%

Build:
Build:
LAST BUILD BRANCH: feat/evm-revert-decoding
DEFAULT BRANCH: main
Ran 02 Oct 2025 12:22PM UTC
Jobs 1
Files 961
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Oct 2025 12:15PM UTC coverage: 89.209% (+0.001%) from 89.208%
18192665576

Pull #2730

github

katspaugh
feat: Allow migration from unsupported to supported Safe mastercopies

Enables Safes with unsupported base contracts to migrate to official mastercopies via both relay transactions and normal transaction proposals.

## Changes

### Relay Transactions
- Modified `LimitAddressesMapper.isOfficialMastercopy()` to detect migration transactions
- Added `LimitAddressesMapper.isMigrationToOfficialMastercopy()` to validate changeMasterCopy calls to official singletons
- Updated `SafeDecoder` to support deprecated `changeMasterCopy` function (v1.2.0 ABI)
- Added `changeMasterCopyEncoder` test helper

### Transaction Proposals (safeTxHash calculation)
- Added `getVersionFromMastercopy()` to detect Safe version from mastercopy address
- Added `detectVersionFromMigrationTransaction()` to extract target version from migration transactions
- Modified `getSafeTxHash()` to handle null versions by detecting migration transactions
- When Safe.version is null, attempts to infer version from changeMasterCopy target

## How It Works

For Safes with unsupported mastercopies (version = null):
1. System detects if transaction is self-call to changeMasterCopy
2. Validates target mastercopy is an official L1 or L2 singleton
3. Determines the target version from mastercopy address
4. Uses detected version for safeTxHash calculation or relay validation

## Test Coverage

- Added 5 tests for null version migration scenarios in safe.spec.ts
- Added 3 tests for relay migration scenarios in limit-addresses.mapper.spec.ts
- All 987 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request #2730: feat: Allow migration from unsupported to supported Safe mastercopies

3814 of 4694 branches covered (81.25%)

Branch coverage included in aggregate %.

53 of 57 new or added lines in 4 files covered. (92.98%)

2 existing lines in 2 files now uncovered.

12737 of 13859 relevant lines covered (91.9%)

528.86 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
85.71
-14.29% src/domain/contracts/decoders/safe-decoder.helper.ts
3
92.86
-5.5% src/domain/common/utils/safe.ts

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.68
0.58% src/domain/relay/limit-addresses.mapper.ts
1
93.67
-2.53% src/routes/notifications/v1/notifications.controller.ts
Jobs
ID Job ID Ran Files Coverage
1 run-test:cov - 18192665576.1 02 Oct 2025 12:22PM UTC 1921
90.3
GitHub Action Run
Source Files on build 18192665576
  • Tree
  • List 961
  • Changed 264
  • Source Changed 6
  • Coverage Changed 264
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #18192665576
  • Pull Request #2730
  • PR Base - main (#18192642063)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc