ApeWorX / ethpm-types

Implementation of EIP-2678
Apache License 2.0
14 stars 8 forks source link

fix: issue where objects using HexBytes could not serialize [APE-1226] #82

Closed antazoey closed 1 year ago

antazoey commented 1 year ago

What I did

Having the toughest time converting TraceFrames from evm_trace into JSON. Figured it was best to fix at the source so this wouldnt happen anywhere else.

How I did it

Create a custom dumps method that handles HexBytes

How to verify it

Create a model with a sub-dict using HexBytes as its keys Make sure can call .json() on that model.

Checklist

antazoey commented 1 year ago

This will likely be needed for the work @Ninjagod1251 is doing