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

safe-global / safe-client-gateway / 14131637198

28 Mar 2025 02:50PM UTC coverage: 90.473% (-0.1%) from 90.577%
14131637198

push

github

web-flow
Add datasource for Safe Decoder Service (#2313)

The new [Safe Decoder Service](https://safe-decoder.safe.global/docs) improves upon the decoder of the Safe Transaction Service. As such, we intend to migrate to it.

This lays the foundation of usage, by creating a datasource (with manager) and base repository for validating the responses:

- Add `safeDataDecoder.baseUri` (test) configuration
- Add `DataDecoderApiManager` interface, implementation and module
- Add `DataDecoderApi` interface, implementation and module
- Add validation schemas for `DataDecoded` and `Contract, with inferred types and builders
- Add base `DataDecoderRepository` for accessing/validating datasource responses
- Add appropriate test coverage of service and schemas

3207 of 3846 branches covered (83.39%)

Branch coverage included in aggregate %.

46 of 68 new or added lines in 8 files covered. (67.65%)

10980 of 11835 relevant lines covered (92.78%)

535.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/domain/data-decoder/v2/data-decoder.repository.interface.ts
1
import type { Contract } from '@/domain/data-decoder/v2/entities/contract.entity';
2
import type { DataDecoded } from '@/domain/data-decoder/v2/entities/data-decoded.entity';
3
import type { Page } from '@/domain/entities/page.entity';
4

NEW
5
export const IDataDecoderRepository = Symbol('IDataDecoderRepository');
×
6

7
export interface IDataDecoderRepository {
8
  getDecodedData(args: {
9
    chainId: string;
10
    data: `0x${string}`;
11
    to: `0x${string}`;
12
  }): Promise<DataDecoded>;
13

14
  getContracts(args: {
15
    chainIds: Array<string>;
16
    address: `0x${string}`;
17
  }): Promise<Page<Contract>>;
18
}
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

© 2025 Coveralls, Inc