1

I understand both how to read the _IMPLEMENTATION_SLOT and how to get the implementation address of a proxy, provided I know the contract is a proxy.

What I'm wondering is: how do I determine if any given contract is an ERC-1967 provided just the contract address and the ABI?

For example, the Supepe contract is a transparent proxy and doesn't have an implementation(address) function. Without explicitly knowing that it is a transparent proxy, how would I determine that it is? I don't want to assume just because it has an Upgraded event that it's a proxy, since other contracts could have the same event without being a proxy.

1 Answer 1

1

ERC-1967 only standardizes storage slots. The ABI could be empty. You can read the implementation storage slot for that address, and if it has a non-zero value you can assume it's a proxy for most purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.