@@ -41,6 +41,7 @@ EthJson.automaticSerialization(seq, true)
4141EthJson .automaticSerialization (bool , true )
4242EthJson .automaticSerialization (float64 , true )
4343EthJson .automaticSerialization (array , true )
44+ EthJson .automaticSerialization (int , true )
4445
4546# ------------------------------------------------------------------------------
4647# eth_api_types
@@ -66,6 +67,14 @@ BlobScheduleObject.useDefaultSerializationIn EthJson
6667ConfigObject .useDefaultSerializationIn EthJson
6768EthConfigObject .useDefaultSerializationIn EthJson
6869
70+ OverrideAccount .useDefaultSerializationIn EthJson
71+ BlockOverrides .useDefaultSerializationIn EthJson
72+ BlockStateCall .useDefaultSerializationIn EthJson
73+ SimulationRequest .useDefaultSerializationIn EthJson
74+ CallError .useDefaultSerializationIn EthJson
75+ SimulateCallResult .useDefaultSerializationIn EthJson
76+ SimulateBlockResult .useDefaultSerializationIn EthJson
77+
6978# ------------------------------------------------------------------------------
7079# engine_api_types
7180# ------------------------------------------------------------------------------
@@ -565,6 +574,18 @@ proc writeValue*(w: var JsonWriter[EthJson], v: StorageValuesRequest)
565574 w.writeMember (x.address.to0xHex, x.data)
566575 w.endObject ()
567576
577+ proc writeValue * (w: var JsonWriter [EthJson ], v: Table [Hash32 , Hash32 ])
578+ {.gcsafe , raises : [IOError ].} =
579+ w.beginObject ()
580+ for k, val in v:
581+ w.writeMember (k.to0xHex, val)
582+ w.endObject ()
583+
584+ proc readValue * (r: var JsonReader [EthJson ], val: var Table [Hash32 , Hash32 ])
585+ {.gcsafe , raises : [IOError , SerializationError ].} =
586+ for k,v in readObject (r, Hash32 , Hash32 ):
587+ val[k] = v
588+
568589func `$` * (v: Quantity ): string {.inline .} =
569590 encodeQuantity (distinctBase (v))
570591
0 commit comments