prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Gas price editable from the Chain model
  Please make the Gas Price editable directly via Chain configs.
  Like we did for Features and Wallets.
  Thanks!
  
  </issue>
  <code>
  [start of src/chains/admin.py]
  1 from django.contrib import admin
  2 from django.db.models import Model
  3 
  4 from .models import Chain, Feature, GasPrice, Wallet
  5 
  6 
  7 class FeatureInline(admin.TabularInline[Model]):
  8     model = Feature.chains.through
  9     extra = 0
  10     verbose_name_plural = "Features enabled for this chain"
  11 
  12 
  13 class WalletInline(admin.TabularInline[Model]):
  14     model = Wallet.chains.through
  15     extra = 0
  16     verbose_name_plural = "Wallets enabled for this chain"
  17 
  18 
  19 @admin.register(Chain)
  20 class ChainAdmin(admin.ModelAdmin[Chain]):
  21     list_display = (
  22         "id",
  23         "name",
  24         "rpc_uri",
  25         "safe_apps_rpc_uri",
  26         "relevance",
  27     )
  28     search_fields = ("name", "id")
  29     ordering = (
  30         "relevance",
  31         "name",
  32     )
  33     inlines = [FeatureInline, WalletInline]
  34 
  35 
  36 @admin.register(GasPrice)
  37 class GasPriceAdmin(admin.ModelAdmin[GasPrice]):
  38     list_display = (
  39         "chain_id",
  40         "oracle_uri",
  41         "fixed_wei_value",
  42         "rank",
  43     )
  44     search_fields = ("chain_id", "oracle_uri")
  45     ordering = ("rank",)
  46 
  47 
  48 @admin.register(Wallet)
  49 class WalletAdmin(admin.ModelAdmin[Wallet]):
  50     list_display = ("key",)
  51 
  52 
  53 @admin.register(Feature)
  54 class FeatureAdmin(admin.ModelAdmin[Feature]):
  55     list_display = ("key",)
  56
  [end of src/chains/admin.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/src/chains/admin.py b/src/chains/admin.py
  --- a/src/chains/admin.py
  +++ b/src/chains/admin.py
  @@ -4,6 +4,12 @@
   from .models import Chain, Feature, GasPrice, Wallet
   
   
  +class GasPriceInline(admin.TabularInline[Model]):
  +    model = GasPrice
  +    extra = 0
  +    verbose_name_plural = "Gas prices set for this chain"
  +
  +
   class FeatureInline(admin.TabularInline[Model]):
       model = Feature.chains.through
       extra = 0
  @@ -30,7 +36,7 @@
           "relevance",
           "name",
       )
  -    inlines = [FeatureInline, WalletInline]
  +    inlines = [FeatureInline, GasPriceInline, WalletInline]
   
   
   @admin.register(GasPrice)
  
verification_info: {"golden_diff": "diff --git a/src/chains/admin.py b/src/chains/admin.py\n--- a/src/chains/admin.py\n+++ b/src/chains/admin.py\n@@ -4,6 +4,12 @@\n from .models import Chain, Feature, GasPrice, Wallet\n \n \n+class GasPriceInline(admin.TabularInline[Model]):\n+    model = GasPrice\n+    extra = 0\n+    verbose_name_plural = \"Gas prices set for this chain\"\n+\n+\n class FeatureInline(admin.TabularInline[Model]):\n     model = Feature.chains.through\n     extra = 0\n@@ -30,7 +36,7 @@\n         \"relevance\",\n         \"name\",\n     )\n-    inlines = [FeatureInline, WalletInline]\n+    inlines = [FeatureInline, GasPriceInline, WalletInline]\n \n \n @admin.register(GasPrice)\n", "issue": "Gas price editable from the Chain model\nPlease make the Gas Price editable directly via Chain configs.\r\nLike we did for Features and Wallets.\r\nThanks!\n", "before_files": [{"content": "from django.contrib import admin\nfrom django.db.models import Model\n\nfrom .models import Chain, Feature, GasPrice, Wallet\n\n\nclass FeatureInline(admin.TabularInline[Model]):\n    model = Feature.chains.through\n    extra = 0\n    verbose_name_plural = \"Features enabled for this chain\"\n\n\nclass WalletInline(admin.TabularInline[Model]):\n    model = Wallet.chains.through\n    extra = 0\n    verbose_name_plural = \"Wallets enabled for this chain\"\n\n\n@admin.register(Chain)\nclass ChainAdmin(admin.ModelAdmin[Chain]):\n    list_display = (\n        \"id\",\n        \"name\",\n        \"rpc_uri\",\n        \"safe_apps_rpc_uri\",\n        \"relevance\",\n    )\n    search_fields = (\"name\", \"id\")\n    ordering = (\n        \"relevance\",\n        \"name\",\n    )\n    inlines = [FeatureInline, WalletInline]\n\n\n@admin.register(GasPrice)\nclass GasPriceAdmin(admin.ModelAdmin[GasPrice]):\n    list_display = (\n        \"chain_id\",\n        \"oracle_uri\",\n        \"fixed_wei_value\",\n        \"rank\",\n    )\n    search_fields = (\"chain_id\", \"oracle_uri\")\n    ordering = (\"rank\",)\n\n\n@admin.register(Wallet)\nclass WalletAdmin(admin.ModelAdmin[Wallet]):\n    list_display = (\"key\",)\n\n\n@admin.register(Feature)\nclass FeatureAdmin(admin.ModelAdmin[Feature]):\n    list_display = (\"key\",)\n", "path": "src/chains/admin.py"}]}