A smart contract is code plus persistent state living at an address. Anyone can call its functions; the code enforces the rules. Below is a real ERC-20 token contract. Pick who's calling, call a function, and watch the state and events change. Break a rule (send more than you hold) and the call reverts: nothing changes.
| balanceOf | tokens |
|---|