Skip to content

Commit 96b5b42

Browse files
refactor: update Bytecode serialization schema to use format_ser_schema
1 parent be80e88 commit 96b5b42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ethereum_test_vm/bytecode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from pydantic import GetCoreSchemaHandler
66
from pydantic_core.core_schema import (
77
PlainValidatorFunctionSchema,
8+
format_ser_schema,
89
no_info_plain_validator_function,
9-
to_string_ser_schema,
1010
)
1111

1212
from ethereum_test_base_types import Bytes, Hash
@@ -232,5 +232,5 @@ def __get_pydantic_core_schema__(
232232
"""Provide Pydantic core schema for Bytecode serialization and validation."""
233233
return no_info_plain_validator_function(
234234
cls,
235-
serialization=to_string_ser_schema(),
235+
serialization=format_ser_schema("0x{}"),
236236
)

0 commit comments

Comments
 (0)