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

Public transfer endpoint for CONSIGNOR to move tokens #735

Merged
merged 9 commits into from
Mar 7, 2024

Conversation

amiecorso
Copy link
Contributor

@amiecorso amiecorso commented Mar 6, 2024

NO-3614

I chose to make this a separate endpoint from the existing safeBatchTransferFrom because that calls the superclass safeBatchTransferFrom which does enforce that the sender is the owner or approved of the tokens (a limitation we need our CONSIGNOR to be exempt from)

This separate endpoint 1) leaves the security of the original safeBatchTransferFrom intact and 2) makes it simpler to reason about permission and functionality.

@amiecorso amiecorso marked this pull request as ready for review March 6, 2024 23:59
Copy link

openzeppelin-code bot commented Mar 7, 2024

Public transfer endpoint for CONSIGNOR to move tokens

Generated at commit: e0fd1f7536bf6cf763e149a33b93e3ef0f7e7444

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
2
0
8
34
45
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
1
36
37

For more details view the full report in OpenZeppelin Code Inspector

@amiecorso amiecorso requested a review from rlfarman March 7, 2024 00:04
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.8%. Comparing base (7a03b43) to head (e0fd1f7).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #735   +/-   ##
======================================
  Coverage    67.8%   67.8%           
======================================
  Files          12      12           
  Lines         787     788    +1     
  Branches      130     130           
======================================
+ Hits          534     535    +1     
  Misses        205     205           
  Partials       48      48           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* - Respects the rules of `Removal._beforeTokenTransfer`.
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

rlfarman
rlfarman previously approved these changes Mar 7, 2024
@amiecorso amiecorso dismissed rlfarman’s stale review March 7, 2024 21:56

The merge-base changed after approval.

@amiecorso amiecorso merged commit 599f58e into master Mar 7, 2024
9 checks passed
@amiecorso amiecorso deleted the amie-public-transfer branch March 7, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants