A contract's memory is its entire world model, and it is usually nine lines near the top. Read Uniswap V2's token end to end and learn to tell what is stored, what is baked in, and what can never be known.
Your third contract, and your second token. This is the ERC20 that every Uniswap V2 pool is built on: hold some and you hold a share of a pool. Ninety four lines, complete.
You have read a token before, so a lot of this will look familiar. Watch for the places it makes different choices from WETH9, because those differences are where the interesting reading is. This lesson is about one thing above all: what a contract chooses to remember.
Line 1 reads `=0.5.16`. Not a caret, not a range: an equals sign, naming exactly one compiler version and refusing every other. You have now seen all three styles, a range, a caret and a pin.
Two imports follow. One is an interface, the other a library called SafeMath. The name is a clue about the era. You learned that the 0.8 series made arithmetic revert on overflow. This is 0.5, where it did not, so contracts did that work by hand.
Line 6 is inheritance, the word you met last lesson: this contract takes on everything an interface declares. Line 7 is something new. Function first: a statement that attaches a library's functions to a type, so they can be written as if the type owned them.
The name: using for. After line 7, any `uint` in this file can be written as `x.add(y)`. It is the same library function either way, just spelled to read like a method. You will meet this everywhere.
Three values, and all three carry a word you have not met. Function first: a marker for a value fixed when the contract is compiled, which can therefore never change and never needs to be looked up. The name: constant.
The name of this token, its symbol, and its eighteen decimals were decided before deployment and are true of every pool that will ever exist. Before reading on: if these are state variables, where does their data live?