livepeer / protocol

Livepeer protocol
MIT License
154 stars 45 forks source link

pm: Add fundDepositAndReserveFor() in TicketBroker #510

Closed yondonfu closed 2 years ago

yondonfu commented 2 years ago

What does this pull request do? Explain your changes. (required)

This PR adds a fundDepositAndReserveFor() function to the TicketBroker. This function contains the same logic as fundDepositAndReserve() except it uses the msg.value provided by msg.sender to fund the deposit and reserve for the specified address. This function is required for finalizing the migration on L2 for a TicketBroker sender with a deposit and reserve on L1 [1].

[1] See https://github.com/livepeer/arbitrum-lpt-bridge/pull/30

Specific updates (required)

How did you test each of these updates (required)

Updated unit tests.

Does this pull request close any open issues?

Fixes #502

Checklist: