|
Ran
|
Jobs
1
|
Files
31
|
Run time
1min
|
Badge
README BADGES
|
push
github
Emit ERC-7572 ContractURIUpdated() from setContractURI (#213) ## Motivation `setContractURI` emits `ContractURIUpdated(string newContractURI)` (topic `0x905d98120a86d0ab79882dbd01ac37378`). [ERC-7572](https://eips.ethereum.org/EIPS/eip-7572) defines `ContractURIUpdated()` (topic `0xa5d4097ed738ffe43cc35a4ce305ad962`), and indexers that follow it, OpenSea's included, match only that topic. So when a SeaDrop owner calls `setContractURI` today, OpenSea doesn't refresh the collection's metadata. ## Solution - `setContractURI` in `ERC721ContractMetadata`, `ERC721ContractMetadataCloneable` and `ERC721ContractMetadataUpgradeable` emits ERC-7572's `ContractURIUpdated()` right after the existing event. `multiConfigure` sets the URI through `setContractURI`, so it emits both as well. - `ISeaDropTokenContractMetadata` declares the new event as an overload of the existing one. The original event stays, so indexers that read it keep working. - `supportsInterface` is unchanged. ERC-7572 doesn't mention ERC-165, and events don't contribute to an interface ID. The token ABIs now have two events named `ContractURIUpdated`. Code that looks an event up by its bare name (ethers v6 `contract.filters.ContractURIUpdated`, some generated wrappers) has to use the full signature, `ContractURIUpdated(string)` or `ContractURIUpdated()`. ## Deployment impact Contracts already deployed are unaffected and keep emitting only the original event. Contracts deployed from this build emit both. `ERC721SeaDropCloneable`'s runtime code changes, so a clone factory deployed from this build deploys an implementation with a different code hash. Against current `main`, keccak256 of the implementation's runtime code goes from `0x7819d8d9170293f69471ac58e5adbffd7` to `0xd72599591cc08bc678c1acc288bc66e23` (`forge inspect src/clones/ERC721SeaDropCloneable.sol:ERC721Sea... (continued)
194 of 268 branches covered (72.39%)
Branch coverage included in aggregate %.
3 of 3 new or added lines in 3 files covered. (100.0%)
1191 of 1447 relevant lines covered (82.31%)
2317.28 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | foundry - 42520708094.1 | 31 |
80.76
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|