julien/lovepublic Fork
⑂ 32e187f
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.

Download ZIP

Merge 11-add-changelog-entry into main

rickub committed 2026-09-18T16:25:58Z Browse files
32e187f parent: bb4dfe3
modified CHANGELOG.md +21 -0
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010 ### Fixed
1111
12+- `WETHRegistry` no longer accepts a reviewed codehash on any chain that
13+ reproduces it. Canonical WETH9 has no chain-specific logic, so its bytecode
14+ is identical everywhere, and on a chain whose native gas token isn't ETH it
15+ would have registered as wETH while wrapping the wrong asset: the
16+ deposit/withdraw probe cannot tell, since "the native currency is ETH" is not
17+ observable from inside the EVM. Each of the ten allowlisted hashes is now
18+ paired with the chain IDs it was actually reviewed on. See
19+ `docs/notes/native-currency-substitution.md`.
1220 - `Love.deposit(bytes32 secretHash, uint256 wethAmount)` now reverts with
1321 `ZeroSecretHash` when called with `secretHash == bytes32(0)`. `claim` uses
1422 that same zero value as its "envelope doesn't exist" sentinel, so a
@@ -17,6 +25,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1725
1826 ### Changed
1927
28+- `WETHRegistry.isKnownImplementation` takes a second `chainId` argument, and
29+ `UnknownImplementation` carries the `chainId` it was rejected on. Its
30+ creation code changed with them, so the registry's CREATE2 address moved from
31+ `0x9Cf17430fEdEC487518416D1Cdc849b1eE9CDbA3` to
32+ `0x33dF1Cd28c9d577224F9A79dD9541275BCa70998`, and `Love.REGISTRY` with it.
33+ **Breaking:** any `Love` deployed from here lands at a different address than
34+ before. Instances already deployed are immutable and unaffected.
35+- `Fixtures.setUpChain` takes the chain ID to register on, since the registry
36+ now checks the codehash against `block.chainid`.
2037 - `Love`'s constructor no longer takes wETH. It reads it from `WETHRegistry` at
2138 a fixed address and reverts with `RegistryNotDeployed` or `WethNotRegistered`
2239 if there is nothing to read. The creation code is therefore byte-identical on
@@ -37,6 +54,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3754
3855 ### Added
3956
57+- `test_RevertWhen_ReviewedHashOnWrongChain` and
58+ `test_RevertWhen_RegisteringCanonicalWethOnWrongChain`, pinning the fix:
59+ canonical WETH9's byte-identical bytecode registers on Ethereum and reverts
60+ on Polygon PoS.
4061 - `WETHRegistry`, naming the wETH LOVE pegs to on a chain. `register()` is
4162 permissionless and payable, takes exactly 1 wei, and accepts a candidate only
4263 if its `EXTCODEHASH` is one of ten reviewed wETH implementations and a
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9 9
10 ### Fixed10 ### Fixed
11 11
12+- `WETHRegistry` no longer accepts a reviewed codehash on any chain that
13+ reproduces it. Canonical WETH9 has no chain-specific logic, so its bytecode
14+ is identical everywhere, and on a chain whose native gas token isn't ETH it
15+ would have registered as wETH while wrapping the wrong asset: the
16+ deposit/withdraw probe cannot tell, since "the native currency is ETH" is not
17+ observable from inside the EVM. Each of the ten allowlisted hashes is now
18+ paired with the chain IDs it was actually reviewed on. See
19+ `docs/notes/native-currency-substitution.md`.
12 - `Love.deposit(bytes32 secretHash, uint256 wethAmount)` now reverts with20 - `Love.deposit(bytes32 secretHash, uint256 wethAmount)` now reverts with
13 `ZeroSecretHash` when called with `secretHash == bytes32(0)`. `claim` uses21 `ZeroSecretHash` when called with `secretHash == bytes32(0)`. `claim` uses
14 that same zero value as its "envelope doesn't exist" sentinel, so a22 that same zero value as its "envelope doesn't exist" sentinel, so a
@@ -17,6 +25,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17 25
18 ### Changed26 ### Changed
19 27
28+- `WETHRegistry.isKnownImplementation` takes a second `chainId` argument, and
29+ `UnknownImplementation` carries the `chainId` it was rejected on. Its
30+ creation code changed with them, so the registry's CREATE2 address moved from
31+ `0x9Cf17430fEdEC487518416D1Cdc849b1eE9CDbA3` to
32+ `0x33dF1Cd28c9d577224F9A79dD9541275BCa70998`, and `Love.REGISTRY` with it.
33+ **Breaking:** any `Love` deployed from here lands at a different address than
34+ before. Instances already deployed are immutable and unaffected.
35+- `Fixtures.setUpChain` takes the chain ID to register on, since the registry
36+ now checks the codehash against `block.chainid`.
20 - `Love`'s constructor no longer takes wETH. It reads it from `WETHRegistry` at37 - `Love`'s constructor no longer takes wETH. It reads it from `WETHRegistry` at
21 a fixed address and reverts with `RegistryNotDeployed` or `WethNotRegistered`38 a fixed address and reverts with `RegistryNotDeployed` or `WethNotRegistered`
22 if there is nothing to read. The creation code is therefore byte-identical on39 if there is nothing to read. The creation code is therefore byte-identical on
@@ -37,6 +54,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37 54
38 ### Added55 ### Added
39 56
57+- `test_RevertWhen_ReviewedHashOnWrongChain` and
58+ `test_RevertWhen_RegisteringCanonicalWethOnWrongChain`, pinning the fix:
59+ canonical WETH9's byte-identical bytecode registers on Ethereum and reverts
60+ on Polygon PoS.
40 - `WETHRegistry`, naming the wETH LOVE pegs to on a chain. `register()` is61 - `WETHRegistry`, naming the wETH LOVE pegs to on a chain. `register()` is
41 permissionless and payable, takes exactly 1 wei, and accepts a candidate only62 permissionless and payable, takes exactly 1 wei, and accepts a candidate only
42 if its `EXTCODEHASH` is one of ten reviewed wETH implementations and a63 if its `EXTCODEHASH` is one of ten reviewed wETH implementations and a