From d0d93a9e0d2a0cc615c6b9feebca52e02b5ca4dd Mon Sep 17 00:00:00 2001 From: Felipe Alvarado Date: Thu, 16 Jan 2025 13:16:07 +0100 Subject: [PATCH] Update address field type --- app/routers/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routers/models.py b/app/routers/models.py index 207be36..6d32427 100644 --- a/app/routers/models.py +++ b/app/routers/models.py @@ -75,8 +75,8 @@ class DataDecoderInput(BaseModel): data: str = Field( ..., pattern=r"^0x[0-9a-fA-F]*$", description="0x-prefixed hexadecimal string" ) - to: str | None = Field( - None, pattern=r"^0x[0-9a-fA-F]{40}$", description="Optional to address" + to: ChecksumAddress | None = Field( + None, pattern=r"^0x[0-9a-fA-F]$", description="Optional to address" ) chainId: int | None = Field( None, gt=0, description="Optional Chain ID as a positive integer"