Skip to content

Conversation

@Amxx
Copy link
Collaborator

@Amxx Amxx commented Dec 3, 2025

Fixes #6043

Note: if a batch of size one is transfered, this still emits the "TransferSingle" event and not the "TransferBatch" event.

In order to change the event being emited, we would need to add a similar flag to _update ... and have the _updateWithAcceptanceCheck with flag call the _update with flag. This would require changing all the extensions that override _update to perform checks/tasks on all movement (that is the case of the Pausable and Supply extensions). Doing this change would likelly break many user overrides. IMO it should only be done if we do not keep a version without the flag. That would be breaking, so we need to wait for 6.0.

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

@changeset-bot
Copy link

changeset-bot bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: 721358d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Amxx Amxx added this to the 5.6 milestone Dec 3, 2025
uint256[] memory ids,
uint256[] memory values,
bytes memory data,
bool single
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
bool single
bool batch

Looks more natural to me (0/false/single < 1/true/batch). With that the logic below should updated yes.


batchTransferWasSuccessful();

it('calls onERC1155Received', async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
it('calls onERC1155Received', async function () {
it('calls onERC1155BatchReceived', async function () {

?

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.

[Bug] ERC1155._updateWithAcceptanceCheck ignores data considerations

2 participants