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

safe-global / safe-config-service / 8047818546

26 Feb 2024 10:56AM CUT coverage: 99.89%. Remained the same
8047818546

push

github

fmrsabino
Bump service version from 2.71.0 to 2.72.0

4541 of 4546 relevant lines covered (99.89%)

1.0 hits per line

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

100.0
/src/chains/admin.py
1
from django.contrib import admin
1✔
2
from django.db.models import Model
1✔
3

4
from .models import Chain, Feature, GasPrice, Wallet
1✔
5

6

7
class GasPriceInline(admin.TabularInline[Model, Model]):
1✔
8
    model = GasPrice
1✔
9
    extra = 0
1✔
10
    verbose_name_plural = "Gas prices set for this chain"
1✔
11

12

13
class FeatureInline(admin.TabularInline[Model, Model]):
1✔
14
    model = Feature.chains.through
1✔
15
    extra = 0
1✔
16
    verbose_name_plural = "Features enabled for this chain"
1✔
17

18

19
class WalletInline(admin.TabularInline[Model, Model]):
1✔
20
    model = Wallet.chains.through
1✔
21
    extra = 0
1✔
22
    verbose_name_plural = "Wallets enabled for this chain"
1✔
23

24

25
@admin.register(Chain)
1✔
26
class ChainAdmin(admin.ModelAdmin[Chain]):
1✔
27
    list_display = (
1✔
28
        "id",
29
        "name",
30
        "rpc_uri",
31
        "safe_apps_rpc_uri",
32
        "relevance",
33
    )
34
    search_fields = ("name", "id")
1✔
35
    ordering = (
1✔
36
        "relevance",
37
        "name",
38
    )
39
    inlines = [FeatureInline, GasPriceInline, WalletInline]
1✔
40

41

42
@admin.register(GasPrice)
1✔
43
class GasPriceAdmin(admin.ModelAdmin[GasPrice]):
1✔
44
    list_display = (
1✔
45
        "chain_id",
46
        "oracle_uri",
47
        "fixed_wei_value",
48
        "rank",
49
    )
50
    search_fields = ("chain_id", "oracle_uri")
1✔
51
    ordering = ("rank",)
1✔
52

53

54
@admin.register(Wallet)
1✔
55
class WalletAdmin(admin.ModelAdmin[Wallet]):
1✔
56
    list_display = ("key",)
1✔
57

58

59
@admin.register(Feature)
1✔
60
class FeatureAdmin(admin.ModelAdmin[Feature]):
1✔
61
    list_display = ("key",)
1✔
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