ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
254 stars 652 forks source link

ethapi/receipt: Use hexutil for JSON marshalling #315

Closed trianglesphere closed 1 month ago

trianglesphere commented 1 month ago

Description

This switches big.Int to hexutil.Big and uint32 to hexutil.Uint64 for marshalling the post-ecotone fields. Hexutil is what is expected on the read side.

I had to switch from uint32 to uint64 for the scalar fields in the JSON because there is no hexutil.Uint32. This conversion is safe & internally it still uses a uint32 type.

Tests

Tested locally