Skip to content

Error when attempting to fill a partially filled order using fulfillOrders() without providing an explicit unitsToFill parameter. #578

@naveen-imtb

Description

@naveen-imtb

Component

API

Have you ensured that all of these are up to date?

  • seaport-js
  • Node (minimum v16)

What version of seaport-js are you on?

4.0.2

What function is the bug in?

fulfillOrders

Operating System

macOS (Apple Silicon)

Describe the bug

When filling a partially filled order, if the unitsToFill parameter is not provided when invoking fulfillOrders this results in the transaction reverting with an overflow error. The expected behaviour is that the remaining quantity of the order is filled.

Scenario:

  • Creates a listing to sell 100 ERC1155 tokens at 1 ETH each.
  • Fill the listing partially by taking 50 units from the original order.
  • Attempt to fill the listing by invoking fulfillOrders without providing a unitsToFill value.
  • Transaction revert with overflow error.

As an extension to this, tips also need to be adjusted to cater to the scenario where an explicit unitsToFill value isn't provided.

Note: This issue is seen only in the fulfillOrders function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions