julien/lovepublic Fork 0
ffa47162b24bdcfe17d608b0671ae87f5461ad88
Commits
Clone
git clone https://git.rickub.com/julien/love.git
git clone ssh://git@rickub.com/julien/love.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

README.md · 22 lines · 1.1 KBmarkdown Blame HistoryRaw
read weth from the registry instead of a constructor arg ffa4716 julienbrg 9h ago1# Fixtures
2
3Runtime bytecode of two wETH implementations on the allowlist, pulled straight
4off mainnets so the tests exercise real code rather than a mock that resembles
5it. `vm.etch` puts one of these at an address and its `EXTCODEHASH` is then, by
6construction, the value `WETHRegistry` is looking for — which is the only way
7to test the allowlist without weakening it for tests.
8
9| file | source | bytes | codehash |
10| --- | --- | --- | --- |
11| `weth9-op-legacy.hex` | Base, `0x4200000000000000000000000000000000000006` | 2041 | `0x8a3a1f6a9f9dce633117adee5b458245835a8645a8c8726a26382a4622508b1c` |
12| `weth9-canonical.hex` | Ethereum, `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` | 3124 | `0xd0a06b12ac47863b5c7be4185c2deaad1c61557033f56c7d4ea74429cbb25e23` |
13
14Refetch either with:
15
16```shell
17cast code 0x4200000000000000000000000000000000000006 --rpc-url https://base-rpc.publicnode.com
18```
19
20Both hashes appear in `script/weth-codehashes.sh` output and in the allowlist in
21`src/WETHRegistry.sol`, so a fixture that has drifted shows up as a test
22failure rather than as a silent pass.