[Ethereum] ny difference between address that have Smart Contract and “normal” one?

addressespublic-keywallets

Is there any difference between address that have smart contract on it, and "normal" address (address that You can create private and public key pair)?

For more context, this is the problem I'm thinking about:

Let's assume that Smart Contract has address 0xfoo, and we – either by pure random chance, or we generated somehow collision – also generated address 0xfoo.

Can I now access ether and/or tokens that are on 0xfoo Smart Contract address? Or there is some mechanism in EVM to block transactions from "Smart Contract Address"?

Best Answer

The only difference between a smart contract address and a "normal" address is that the smart contract address contains (the smart contract) code. Other than that, they work the same.

If there is, for example, a contract on 0xfoo and by random chance you get the private key for this address, you can transfer Ether and tokens from this address like any other address. If the contract itself is a token contract, that does not mean you can transfer those tokens, unless the contract itself is the owner of those tokens (when balanceOf(0xfoo) > 0).