betterERC
Docs/Building

Chain requirements

One hard dependency, what it rules out, and why no chain support matrix is published here.

All docs

This framework requires EIP-1153 transient storage, which means Cancun or later. The reentrancy guard around the transfer hook is what motivated it, but the requirement is not confined to that guard: the compiler is configured for Cancun, so it emits Cancun-era opcodes throughout and a pre-Cancun chain would fail on ordinary paths rather than only on the guard.

A chain that does not qualify needs a lower target and a storage-slot reentrancy guard in place of the transient one. That is a fork of the repository, not a configuration switch.

No support matrix, on purpose

Chains adopt opcodes on their own schedule, and a list published here would age into a list of chains somebody once guessed about. Confirm that your target implements EIP-1153 and run a smoke deployment against it — that check belongs to whoever deploys, and it takes one transaction.

The guard runs on every clone

A runtime clone inherits every module, including the hook, so the reentrancy guard runs on every transfer regardless of whether that token installed the hook extension. Gating it on the hook being set was measured and costs more than it saves: the storage read needed to decide exceeds the transient write and read it would skip.

This is the one place where the shared-runtime design charges a token for a capability it did not ask for. It is roughly a hundred gas, and it is a deliberate trade rather than an oversight.