Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate CW721 events to ERC721 events #1750

Merged
merged 6 commits into from
Jul 9, 2024
Merged

Translate CW721 events to ERC721 events #1750

merged 6 commits into from
Jul 9, 2024

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Jun 28, 2024

Describe your changes and provide context

Similar to #1748 but done for 721 events. Things notable:

  • CW721 allows multiple approved spenders to exist for a given token ID, whereas ERC721 assumes there will be at most one. This might cause confusion if applications solely rely on the translated events, since an ERC721 "revoke" event is just an approve event setting spending to 0x0, which would not indicate exactly which one of the multiple CW721 spenders is revoked.
  • CW721 has a string-typed token ID, whereas ERC721 has an integer. The translation here would drop any event pertaining to tokens that have a non-integer ID

Testing performed to validate your change

unit tests

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 77.19298% with 26 lines in your changes missing coverage. Please review.

Project coverage is 61.14%. Comparing base (b3204f9) to head (b462dcf).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1750      +/-   ##
==========================================
+ Coverage   60.92%   61.14%   +0.21%     
==========================================
  Files         251      251              
  Lines       21850    21962     +112     
==========================================
+ Hits        13313    13429     +116     
+ Misses       7595     7579      -16     
- Partials      942      954      +12     
Files Coverage Δ
x/evm/keeper/log.go 38.46% <0.00%> (-4.40%) ⬇️
app/receipt.go 79.59% <80.00%> (+1.48%) ⬆️

... and 4 files with indirect coverage changes

@codchen codchen force-pushed the events-721 branch 3 times, most recently from b6d4c79 to 61ca6c6 Compare July 1, 2024 14:20
@codchen codchen force-pushed the fake-receipt branch 3 times, most recently from 086b9c4 to 077d09f Compare July 2, 2024 03:31
Base automatically changed from fake-receipt to main July 2, 2024 04:09
@codchen codchen force-pushed the events-721 branch 2 times, most recently from 71c0556 to 04aeff6 Compare July 2, 2024 06:11
@codchen codchen force-pushed the events-721 branch 3 times, most recently from 2431dae to 0137d88 Compare July 3, 2024 02:25
@codchen codchen merged commit 1c32f92 into main Jul 9, 2024
48 checks passed
@codchen codchen deleted the events-721 branch July 9, 2024 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants