|
Ran
|
Jobs
1
|
Files
24
|
Run time
1min
|
Badge
README BADGES
|
push
github
v2: Emit ERC-7572 ContractURIUpdated() from setContractURI (#214) ## Motivation The `v2` counterpart of #213. `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 an owner of a v2 ERC-721 or ERC-1155 token calls `setContractURI` today, OpenSea doesn't refresh the collection's metadata. ## Solution - `setContractURI` in `ERC721ContractMetadata`, `ERC1155ContractMetadata` and `ERC1155ContractMetadataCloneable` emits ERC-7572's `ContractURIUpdated()` right after the existing event. The configurers' `multiConfigure` sets the URI through the token's `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. `ERC1155SeaDropCloneable`'s runtime code changes, so a 1155 clone factory deployed from this build deploys an implementation with a different code hash. Against current `v2`, keccak256 of the implementation's compiled runtime code goes from `0x26626e1343d157f8ced56269d36fbf0e3` to `0x24ae19262df1195b66fe0cb9105f3d62768... (continued)
344 of 384 branches covered (89.58%)
Branch coverage included in aggregate %.
3 of 3 new or added lines in 3 files covered. (100.0%)
1529 of 1726 relevant lines covered (88.59%)
6548.64 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | foundry - 42520689744.1 | 24 |
88.77
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|