Skip to content

@proxies:implementation

Implementation address of an ERC-1967 proxy, following the beacon when the proxy is a beacon proxy.

On-chain (@proxies:implementation!): Resolves through an implementation() call or the beacon hop, so a slot-only proxy has no on-chain form and reverts.

⚗️ Experimental — available at next.evmcrispr.com.

Returns: address

@proxies:implementation(proxy)
NameTypeDescription
proxyaddressProxy address
load proxies
# USDC's transparent proxy on mainnet
print @proxies:implementation(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)
  • Reads the ERC-1967 implementation slot directly; for beacon proxies it follows the beacon and returns its implementation().

Resolve the implementation at assertion time through the core's orElse: a direct implementation() call when the proxy exposes one, else the beacon() -> implementation() hop through the core chain.

load proxies
set $proxy 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
set $logic 0xd8da6bf26964af9d7eed9e03e53415d37aa96045
assert @implementation!($proxy) == $logic "implementation changed"
  • ERC-1967 slot-only proxies (transparent proxies without a public implementation() or beacon()) revert on both branches: those reads stay off-chain with the plain face.
  • assert, @codeHash!