go-ethereum/eth/tracers/js
Daniel Liu fe337141c1
eth/tracers/js: fix type inconsistencies #28488 (#1343)
This change fixes two type-inconsistencies in the JS tracer:

- In most places we return byte arrays as a `Uint8Array` to the tracer. However it seems we missed doing the conversion for `ctx` fields which are passed to the tracer during `result`. They are passed as simple arrays. I think Uint8Arrays are more suitable and we should change this inconsistency. Note: this will be a breaking-change. But I believe the effect is small. If we look at our tracers we see that these fields (`ctx.from`, `ctx.to`, etc.) are used in 2 ways. Passed to `toHex` which takes both array or buffer. Or the length was measured which is the same for both types.
- The `slice` taking in `int, int` params versus `memory.slice` taking `int64, int64` params. I suggest changing `slice` types to `int64`. This should have no effect almost in any case.

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2025-09-09 15:52:57 +08:00
..
internal/tracers eth/tracers, core/vm: remove time from trace output and tracing interface #26291 (#1311) 2025-09-09 09:26:10 +08:00
bigint.go eth/tracers: package restructuring #23857 (#1266) 2025-08-29 05:26:36 +08:00
goja.go eth/tracers/js: fix type inconsistencies #28488 (#1343) 2025-09-09 15:52:57 +08:00
tracer_test.go eth/tracers/native: prevent panic for LOG edge-cases #26848 (#1324) 2025-09-09 11:40:55 +08:00