SMART CONTRACTS, DEFI & WEB3 SECURITY - Chapter 1, Exercise 3 Solution ========================================================== What Exists at an Address Before and After Deployment PROBLEM ------- Explain, using this chapter's own deployment description and Course 1 Chapter 6's account model, exactly what kind of Ethereum account exists immediately before a contract is deployed at a given address, and what kind exists immediately afterward. SOLUTION -------- BEFORE DEPLOYMENT Immediately before a contract is deployed, the specific address it will eventually occupy generally doesn't correspond to any account at all yet - it's simply an address that hasn't been used or created on the network. (Ethereum addresses for new contracts are deterministically computed in advance from the deploying account and other details, but until the deployment transaction is actually processed, nothing real exists there.) THE DEPLOYMENT TRANSACTION ITSELF This chapter describes deployment as a real, signed transaction with no destination address - meaning it isn't sent TO an existing account the way a normal payment or function call would be. Instead, its whole purpose is to instruct the network to create something new. AFTER DEPLOYMENT Once the deployment transaction is processed and included in a block, a brand-new Contract Account (the second of the two account types Course 1 Chapter 6 introduced, alongside Externally Owned Accounts) now exists at that address. Unlike an Externally Owned Account, this new account isn't controlled by any private key at all - it's controlled entirely by its own stored code, which is exactly the compiled EVM bytecode this chapter's own deployment process produced from the original Solidity source. From that point onward, the account at this address holds two things: whatever balance of ETH it accumulates, and its own permanent, executable code - meaning anyone can now interact with it by sending transactions to that address, triggering its own functions to run. ANSWER: Before deployment, the target address generally corresponds to no real account at all. After the deployment transaction is processed, a new Contract Account exists there - controlled by its own stored, compiled bytecode rather than a private key, exactly the account type Course 1 Chapter 6 described as the genuinely new category Ethereum's account model introduced beyond ordinary private-key-controlled accounts. ---- WHY THIS WORKS AS AN ANSWER This walks through the actual before/during/after sequence rather than jumping straight to the answer, and explicitly ties the resulting account type back to Course 1's own two-category account model (EOA vs. Contract Account) to show the deployment process is really just the mechanism that produces one specific instance of that already- established second category.