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
[ ] Passes all linting checks (pre-commit and CI jobs)
[ ] New test cases have been added and are passing
[ ] Documentation has been updated
[ ] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
Having the toughest time converting
TraceFrames
fromevm_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