What are Accounts?
The global state of Ethereum is comprised of accounts that interact with one another through a message-passing framework. The most basic interaction is that of sending some value - like MATIC tokens, Polygon's native token or $ETH, the native token of the Ethereum blockchain.
Each account is identified by a 20-byte hex identifier which is called an address - which is generated from the public key of the account.
There are two types of accounts: Externally Owned Account and Contract Owned Accounts.
Externally Owned Accounts
EOA are accounts controlled by a private key, with the ability of sending tokens and messages.
- They can send transactions (ether transfer or trigger contract code),
- are controlled by private keys,
- and have no associated code.
Contract Owned Accounts
Contract Owned Account are accounts that have an associated smart contract code with it and their private key is not owned by anyone.
- They have associated code,
- their code execution is triggered by transactions or messages (calls) received from other contracts,
- and when this code is executed - it performs operations of arbitrary complexity (Turing completeness) - manipulates its own persistent storage and can call other contracts.