Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Dec 15, 2025

Why this should be merged

This PR consolidates pointer creation helpers across the codebase by replacing the type-specific pointer calls such as utils.NewUint64 or newTrue() with a single generic utils.PointerTo[T any] function. It also makes types more clear when required, or ensures lint will fail on unnecessary type casting.

See ava-labs/coreth#1263 (comment) for the original context.

Closes #4567

How this works

  • Adds generic utils.PointerTo[T any](x T) *T to the shared graft/evm/utils module
  • Replaces all old typed pointer calls with new PointerTo calls
  • Removes utilstest.PointerTo in favor of the utils version
  • Removes one-off pointer helpers (newTrue()) and replaces with utils.PointerTo

How this was tested

CI

Need to be documented in RELEASES.md?

No

@JonathanOppenheimer JonathanOppenheimer self-assigned this Dec 15, 2025
@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner December 15, 2025 22:59
@JonathanOppenheimer JonathanOppenheimer added DO NOT MERGE This PR must not be merged in its current state cleanup Code quality improvement evm Related to EVM functionality labels Dec 15, 2025
@JonathanOppenheimer JonathanOppenheimer marked this pull request as draft December 15, 2025 23:01
@JonathanOppenheimer JonathanOppenheimer changed the title refactor: align PointerTo functions refactor: align PointerTo functions Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code quality improvement DO NOT MERGE This PR must not be merged in its current state evm Related to EVM functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants