Magicians: Pre-ERC, an adoption profile and reference kernel for EOAs adopting code via SETCODEFROM
18:02 (nezu511), with 27 posts and 30 likes that day. EIP-8298 lets an EOA adopt account code at its own address, and EIP-8151 makes ecrecover stop returning addresses that hold regular code. Combined, the secp256k1 key can no longer send transactions or pass ecrecover for that account, and no assets need to move. Adoption is one-way, with no return to empty code, so the adopted code and the adopting transaction must be right the first time. The author found seven failure modes, most irreversible; for example, code that falls back to `ecrecover(...) == address(this)` locks the account out the moment it is adopted. On chains with an inclusion path that skips the sender-code check, such as OP Stack deposits, this only holds once the account has migrated where that path originates.
