@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
Syntax
Section titled “Syntax”@proxies:implementation(proxy)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
proxy | address | Proxy address |
Examples
Section titled “Examples”load proxies
# USDC's transparent proxy on mainnetprint @proxies:implementation(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)- Reads the ERC-1967 implementation slot directly; for beacon proxies it
follows the beacon and returns its
implementation().
See Also
Section titled “See Also”On-chain face (@implementation!)
Section titled “On-chain face (@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.
Examples
Section titled “Examples”load proxies
set $proxy 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2set $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.
See Also
Section titled “See Also”assert,@codeHash!