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

safe-global / safe-core-sdk / 15781738432

20 Jun 2025 02:56PM UTC coverage: 78.249% (-0.04%) from 78.287%
15781738432

Pull #1231

github

web-flow
Merge 951f3c2e2 into aea722aa6
Pull Request #1231: Prepare release

261 of 409 branches covered (63.81%)

Branch coverage included in aggregate %.

54 of 58 new or added lines in 5 files covered. (93.1%)

1 existing line in 1 file now uncovered.

919 of 1099 relevant lines covered (83.62%)

4.8 hits per line

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

80.0
/packages/api-kit/src/utils/config.ts
1
const TRANSACTION_SERVICE_URL = 'https://api.safe.global/tx-service'
1✔
2

3
type NetworkShortName = {
4
  shortName: string
5
  chainId: bigint
6
}
7

8
export const networks: NetworkShortName[] = [
1✔
9
  { chainId: 1n, shortName: 'eth' },
10
  { chainId: 10n, shortName: 'oeth' },
11
  { chainId: 56n, shortName: 'bnb' },
12
  { chainId: 100n, shortName: 'gno' },
13
  { chainId: 130n, shortName: 'unichain' },
14
  { chainId: 137n, shortName: 'pol' },
15
  { chainId: 146n, shortName: 'sonic' },
16
  { chainId: 196n, shortName: 'okb' },
17
  { chainId: 232n, shortName: 'lens' },
18
  { chainId: 324n, shortName: 'zksync' },
19
  { chainId: 480n, shortName: 'wc' },
20
  { chainId: 1101n, shortName: 'zkevm' },
21
  { chainId: 5000n, shortName: 'mantle' },
22
  { chainId: 8453n, shortName: 'base' },
23
  { chainId: 10200n, shortName: 'chi' },
24
  { chainId: 42161n, shortName: 'arb1' },
25
  { chainId: 43111n, shortName: 'hemi' },
26
  { chainId: 57073n, shortName: 'ink' },
27
  { chainId: 80094n, shortName: 'berachain' },
28
  { chainId: 59144n, shortName: 'linea' },
29
  { chainId: 42220n, shortName: 'celo' },
30
  { chainId: 43114n, shortName: 'avax' },
31
  { chainId: 84532n, shortName: 'basesep' },
32
  { chainId: 534352n, shortName: 'scr' },
33
  { chainId: 11155111n, shortName: 'sep' },
34
  { chainId: 1313161554n, shortName: 'aurora' }
35
]
36

37
export const getNetworkShortName = (chainId: bigint): string => {
1✔
38
  const network = networks.find((n) => n.chainId === chainId)
75✔
39
  if (!network) {
3!
NEW
40
    throw new Error(`Network with chainId ${chainId} not found`)
×
41
  }
42
  return network.shortName
3✔
43
}
44

45
export const getTransactionServiceUrl = (chainId: bigint) => {
1✔
46
  return `${TRANSACTION_SERVICE_URL}/${getNetworkShortName(chainId)}/api`
3✔
47
}
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