OpenZeppelin eliminates the isContract feature and promotes a shift toward greater adaptability and improved user experiences in the Ethereum ecosystem.
Smart contract development service OpenZeppelin recently removed a widely used smart contract feature called isContract to advance the ecosystem toward greater flexibility and improved user experiences.
The isContract function returns true if an Ethereum address (ETH) belongs to a smart contract account instead of an external ownership account (EOA). Many developers of decentralized applications (dapps) rely on them for security purposes, such as preventing bots from creating non-fungible tokens (NFTs).
However, as Ambire Wallet co-founder and CEO Ivo Georgiev noted that he welcomed the feature’s removal, relying on isContract breaks compatibility with account abstraction wallets like Ambire, Argent, and Safe. These wallets use smart contracts to manage users’ funds while removing certain complexities from the end user.
According to Georgiev, better ways exist to prevent issues such as NFT mining abuse and security vulnerabilities. The presence of isContract has led to the damaging myth that smart contracts cannot function as user accounts.
You might also like: Ethereum’s account abstraction explained
In response, OpenZeppelin removed the feature to push developers to reconsider assumptions about smart contracts and user accounts. This controversial move could accelerate the adoption of account abstraction and its associated benefits.
Safe – a decentralized custody protocol formerly known as Gnosis Safe – developer Misha highlighted legitimate use cases of isContract, such as ensuring added Safe modules are valid contracts. However, Georgiev argued that there are better solutions that do not exclude important account abstraction techniques.
The OpenZeppelin documentation warns that isContract should not be relied upon as the sole determination of contract or EOA status. According to him, with smart programming, bots can return false positives or negatives.
This debate represents an important step forward as Ethereum builders rethink outdated assumptions and sow the seeds for the next generation of easy-to-use decentralized applications. Removing isContract forces developers to find alternative solutions, which ultimately benefits end users by stopping discrimination against abstracted accounts.
Read more: Vitalik Buterin shares insights on Ethereum’s account abstraction journey