Skip to content

[Bug] ERC1155._updateWithAcceptanceCheck ignores data considerations #6043

@adraffy

Description

@adraffy

ERC1155 incorrectly routes a safeBatchTransferFrom (batched) to checkOnERC1155Received (not-batched) when .length == 1

💻 Environment

Latest

📝 Details

if (ids.length == 1) {
should be
if (ids.length == 1 && data.length == 0) {
_updateWithAcceptanceCheck() should pass a boolean whether it was invoked via single or batch and route accordingly.

As-is, data payloads must be special cased for .length == 1 and safeBatchTransferFrom should not be called with .length == 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions