Skip to content

Remove MetaBoard.hash() — no longer needed #106

@thedavidmeister

Description

@thedavidmeister

`MetaBoard.hash(bytes calldata)` (src/concrete/MetaBoard.sol:18-26) was added to let indexers compute keccak256 over event data without needing the hash in the event log. The subgraph migrated to `crypto.keccak256` from `@graphprotocol/graph-ts` in `7fcb543` (closed #44), and modern subgraph runtimes everywhere expose native keccak256, so the original justification (the comment at line 15-17) no longer applies.

The function is `pure` and costs nothing at runtime, but it's dead surface area in the contract.

Removing it is not free — it changes the contract bytecode, which changes the deterministic deploy address (`0xfb8437…6928`). Every consumer that hardcodes the address would need to update, and the network-by-network deploy would have to be repeated. Re-deploying onto a new address while keeping the old one alive is the only forward-compatible path.

Options:

  1. Leave it — keep the function indefinitely (current state).
  2. Remove and re-deploy — bump to MetaBoard v2 at a new deterministic address; integrators migrate.

Filing this so the trade-off is captured. Recommendation: option 1 unless there's a separate reason to roll v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions