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

Assign owner correctly when there are multiple transfers #1956

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Nov 21, 2024

Describe your changes and provide context

It is possible to have multiple ERC721 transfers in the same transaction. The previous implementation of owner replacement doesn't account for such scenarios and always use the last pretransfer_owner event to fill in owners for synthetic ERC721 events. This PR fixes it by assigning pretransfer_owner event to the correct transfer event based on order of appearance.

Testing performed to validate your change

unit test that involves multiple transfers in a tx

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 61.68%. Comparing base (9432bee) to head (893b496).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/receipt.go 75.00% 8 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1956      +/-   ##
==========================================
- Coverage   61.71%   61.68%   -0.03%     
==========================================
  Files         263      263              
  Lines       23425    23447      +22     
==========================================
+ Hits        14456    14463       +7     
- Misses       7963     7979      +16     
+ Partials     1006     1005       -1     
Files with missing lines Coverage Δ
app/receipt.go 78.68% <75.00%> (-0.47%) ⬇️

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@codchen codchen force-pushed the tony/fix/pretransfer-assignment branch from 59e54e7 to 893b496 Compare November 22, 2024 15:50
@codchen codchen merged commit bf789f3 into main Nov 22, 2024
47 of 49 checks passed
@codchen codchen deleted the tony/fix/pretransfer-assignment branch November 22, 2024 15:58
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